Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
export to excel: out of memory
posted

Hi,

We use the control UltraGridExcelExporter to export the UltraGrid to excel 2007. The data source of the grid is very big, from 10, 000 to  100, 000 records. We found that it could export about 13,000 records. But when I export it second time, it throw out the out of memory exception.

Our code is like this:

 Infragistics.Excel.Workbook workbook = new Infragistics.Excel.Workbook(WorkbookFormat.Excel2007);

 Infragistics.Excel.Worksheet worksheet = workbook.Worksheets.Add(getSheetText(_reportCommandName));

...

this.grdExcelExporter.Export(ultGrdReports, worksheet);

workbook.Save(fileName);

The out of memory is threw out at the workbook save statement.

I checked in task manager, the export consume much memory.Could you help me and give me some advice on how to resolve this issue?

thanks,

Chance