Issues while importing large datatable to excel

Hi,

I am trying to create an excel using the datatable using below code.

worksheet.Cells.ImportDataTable(dt, true, 0, 0, dt.Rows.Count, dt.Columns.Count, true, “mm/dd/yyyy”);

But even after 1 hour or so, the excel is not being generated. Can you please suggest what should I do?

Thanks,
Nik


Hi Nik,


Thank you for contacting Aspose support.

I am afraid it is hard to detect the problem cause without knowing how much data does DataTable has, what are the field types, what version of Aspose.Cells for .NET are you currently using and so on. It would be of great help in isolating the problem cause if you can provide more details as mentioned above. Moreover, if you are using any older revision of the API, we would strongly recommend you to give a try to the latest version of Aspose.Cells for .NET 8.4.1.

Hi Babar,


My datatable has about 500000 records and around 40 columns of different datatypes

Thanks

Hi Nik,


Thank you for the details.

I have evaluated your presented scenario (importing 50k rows & 40 columns from a dynamically generated DataTable) while using the most recent revision of Aspose.Cells for .NET 8.4.1.2, and I was unable to spot any issue. The spreadsheet was generated fine, however, due to the amount of data. If you are facing issues, that could be due to any problem in your current version of the API so I would strongly recommend you to give a try to the latest version, and let us know of your feedback.