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
We use infragistcs net advantage winform v2009.1. When export to excel 2003, there is no such out of memory, but to excel 2007, it throw out the exception.
Eric
Hello Chance,
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
What version of the controls are you using?
There are always going to be some physical memory limitations on the size of the file you can export, but we have made some improvements in this area over the years. So you may get better results with a newer version of NetAdvantage, assuming you are using an older version.