mgcrea / node-xlsx

NodeJS excel file parser & builder
Other
2.92k stars 273 forks source link

how to export big data #84

Closed DerekYeung closed 5 years ago

DerekYeung commented 6 years ago

I tried to export 50-100 million rows of data to prompt memory overflow. each row has 20 columns.

<--- JS stacktrace --->

==== JS stack trace =========================================

2: arguments adaptor frame: 3->1

Security context: 00000214D71CFB49 3: map [native array.js:~994] [pc=000000FB17F60BB4] (this=000000AF8C3FFA41 <JS Array[2]>,bq=000001AF083612A1 <JS Function (SharedFunctionInfo 000000F656BB9349)>,br=00000214D7104381 ) 4: arguments adaptor frame: 1->2 5: wxt_helper [M:\seer\frontend\trunk\node_modules\xlsx\xlsx.js:~2131] [pc=000000FB17F3C577] (this=000000D4A3979AA1 <JS...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

geraldotomaz commented 6 years ago

I have the same problem

DerekYeung commented 6 years ago

@geraldotomaz I'm use Stream resolve the problem

geraldotomaz commented 6 years ago

@DerekYeung Thank you for reply. i'm tested like this: fs.createWriteStream(filepath, buffer, () => { res.download(filepath) })

But not work

ashokduraik commented 5 years ago

@geraldotomaz I'm use Stream resolve the problem

Could you please tell the more details about how did you use that Stream option. I am facing the same issue.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.