We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Writing 1 milllion rows in a single xlsx file in chunks

Hi ,

I am reading 3 million rows (three 1 million rows in parallel) from DB at one go and writing into three xlsx files in the same parallel thread using Aspose.LightCells.
However, sometimes the application is throwing System Out of Memory exception when having so much of data in the memory.
This is happening when the main assembly is running under “AnyCPU” in x64 machine, but on changing that to “x64” explicitly things started working fine.

So we want to change our approach to avoid such exceptions. Our idea is for 1 parallel execution if we get 1 million rows in chunks like 200K rows 5 times from DB and write into the same xlsx file.

I tried with merging which took more than an hour to generate 1 xlsx file.

So what is the best way to write 1 milllion rows in a single xlsx file in chunks?


Hi Ranadeep,

Thanks for your posting and using Aspose.Cells.

Since, you are writing large number of rows, so it will definitely take some time. However, we have logged this issue in our database for investigation. We will look into it and give you advice how to improve writing large number of rows speedily. Once, there is some update for you, we will let you know asap.

This issue has been logged as CELLSNET-43344.

Hi Ranadeep,

Thanks for using Aspose.Cells.

We are afraid we need the your sample project to look into the issue.
Commonly, if user is creating the xlsx file with LightCells mode, it should
not cause memory issue even with million rows data.