hey,
Hi,
Well, if you want to fill 1000000 * 256 records in a single worksheet and save/create Excel file, the process would surely require huge amount of memory and it does take some time to be completed. So, make sure that you got sufficient amount of memory for the task. Also, the generated Excel file (e.g XLSX) would be huge in size. Aspose.Cells for .NET is capable of importing exporting huge list of data and can perform the task if you got sufficient resources. I think it would be better if you could split your data into multiple worksheets, it would surely enhance the performance to certain extent.
Here is my sample code for filling 200000 * 15 records in a worksheet to save the Excel file, it works fine. It took me about 2 minutes to perform this task(on my normal configured PC - Core 2 Duo" processor (2.00Ghz) with 2GB RAM with Win7 OS), the generated XLSX file has about 30MB size.
Sample code:
DateTime start = DateTime.Now;
Workbook workbook = new Workbook();
Worksheet ws = workbook.Worksheets[0];
for (int row = 0; row < 200000; row++)
{
for (int col = 0; col < 15; col++)
{
ws.Cells[row, col].PutValue(“row” + row.ToString() + " col" + col.ToString());
}
}
workbook.Save(“e:\test2\Test_Aspose.xlsx”);
DateTime end = DateTime.Now;
TimeSpan time = end - start;
MessageBox.Show(time.TotalSeconds.ToString()); //120 seconds
I am using latest version/fix v5.3.0.x.
Thank you.
thanks for your reply.
Hi,
Thanks for your feedback. I have forwarded your comment.
By the way, all processes are cached on harddisk if virtual memory is enabled.
that’s true, but even if virtual memory is being used, .net processes cannot have clr objects (such as arrays) bigger than 2 GB … so,unless you are truly caching the data yourself(for example,by saving the used cells data on temporary files) , it will probably crash …
Hi,
Thanks, I will keep a note of your comment.
thanks …
Hi,
No, you will have to wait for us to give you feedback. Thanks for your understanding.
ok…