[HELP]How to pipe uploaded xlsx file's data to an js object in mem instead of to file on disk? #323

Closed
opened 2015-11-18 14:27:02 +00:00 by morfies · 2 comments
morfies commented 2015-11-18 14:27:02 +00:00 (Migrated from github.com)

Hi, my usecase is supporting import&export for certain search page.
As for export:
Currently I am able to retrieve query result, form the data into a workbook object and then use XLSX to writeFile to a xlsx file on server and then send this file back to browse for user to download.(This works, but I donot want to generate a file on server);
As for import:
Browser upload the xlsx file through fileupload, and node server receive the file by busboy middleware, but again, how can I just pipe the file data to XLSX directly and then I can parse this data into json, eventually put the uploaded data to mysql?
Thanks very much if you can give me some advice on this.

Hi, my usecase is supporting import&export for certain search page. As for export: Currently I am able to retrieve query result, form the data into a workbook object and then use XLSX to writeFile to a xlsx file on server and then send this file back to browse for user to download.(This works, but I donot want to generate a file on server); As for import: Browser upload the xlsx file through fileupload, and node server receive the file by busboy middleware, but again, how can I just pipe the file data to XLSX directly and then I can parse this data into json, eventually put the uploaded data to mysql? Thanks very much if you can give me some advice on this.
whytheday commented 2015-11-28 05:25:49 +00:00 (Migrated from github.com)

Looks like there is an example in the readme: https://github.com/SheetJS/js-xlsx#writing-workbooks

Looks like there is an example in the readme: https://github.com/SheetJS/js-xlsx#writing-workbooks
reviewher commented 2017-03-25 16:18:56 +00:00 (Migrated from github.com)

Related: https://github.com/SheetJS/js-xlsx/issues/604 It sounds like you are facing a similar issue.

Related: https://github.com/SheetJS/js-xlsx/issues/604 It sounds like you are facing a similar issue.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#323
No description provided.