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

Free Support Forum - aspose.com

Export large data from array to Excel-Out of Memory Exception

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am exporting an array to excel sheet, when I try to export more than 5000 rows from an array to excel then I am getting an out of memory exception. The number of columns here is 49, so totally it comes to 5000 * 49 = 2, 45, 000 records.

While searching for a work around, in appose forum some experts suggested to use new version of the aspose dll (Please go through the out of memory exception if I try to export above 5500 rows. Here is the piece of code that I used for export functionality.

'Array used for exporting the data

Dim aAttcode As Array

'Code for setting size of an array

aAttcode = sheet.Cells.ExportArray(0, 0, dsans.Tables(0).Rows.Count, dtques.Rows.Count)

'Fill array with the data from data table

For iIndex1 = 0 to dsans.Tables (0).Rows.Count – 1

aAttcode.SetValue (sSting, iIndex1, iCurrentColumn)


'Exporting the data from array to excel sheet

sheet.Cells.ImportTwoDimensionArray (aAttcode, 0, 0)

I am getting the error when I try to export the two dimensional array to excel sheet. Is there any other way to export more rows from an array into excel sheet, in our requirement, it should be able to export 12000 rows (12,000 * 49 =. 5, 88,000)?



Please create a sample console demo application (runnable), zip it and post it here (with all the files) to reproduce the issue. Also mentioned your system configurations, e.g OS, CPU, RAM, .NET framework. etc. and other details. You may also attach some screen shots for it.

Thank you.