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

Free Support Forum - aspose.com

Out of Memory while using workSheet.Cells.ImportDataTable(dtInput- True- "A1")

Hi Team,


I am facing out of memory issue while dumping data from datatable to excel.

It has 1 Million data and i tried the below code:

Dim workbook As New Aspose.Cells.Workbook(FileFormatType.Xlsx)
workbook.Settings.MemorySetting = MemorySetting.MemoryPreference
Dim workSheet As Aspose.Cells.Worksheet = workbook.Worksheets(0)
workSheet.Name = fileName
workSheet.Cells.ImportDataTable(dtInput, True, “A1”)
I am using trial version of Aspose.Cells 8.0 and wanted to buy license for this.

Regards,
Niveditha

Hi,


When you do import or create large DataSet, this would surely demand certain amount of memory for the big process. Well, you may try to set some memory preference options via Aspose.Cells APIs, see the document for your reference:
http://www.aspose.com/docs/display/cellsnet/Optimizing+Memory+Usage+while+Working+with+Big+Files+having+Large+Datasets

I think you may add a new worksheet (instead of default worksheet) and try to set the option:
wb.Settings.MemorySetting = MemorySetting.MemoryPreference;
then you may import the large dataset of DataTable or create the big matrix.

Let us know if I can be of any further help.

Thank you.