Hello,
Currently running on 15.1 and continue to get OutOfMemoryException trying to export less than 65,000 rows (including just trying to export one column).
var exporter = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter(); exporter.Export( Grid, FileName, WorkbookFormat.Excel2007 );
Dion
Hi Dion,
Thanks you for posting in our forums!
Given the little information around your scenario that I have so far, I was not able to reproduce the out of memory exception you refer to. In my sample application, I successfully exported 65 000 rows both synchronously and asynchronously using Infragistics Windows Forms 2015.1 and setting export format to be Excel2007.
For further reference, please run the attached sample application on your machine and let me know how it behaves. Feel free to modify it, in order to shed some light around your specific scenario and what might cause the out of memory exception to occur.
Thank you for the quick response. It appears our implementation is very much the same as yours. The one glaring difference is the application I am trying to export from is very large and takes up quite a bit of memory. I am running memory maps to look at the overall footprint, however, initial research has us well below the 2gig limit.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Infragistics.Win.UltraWinGrid.CellsCollection.OnSubObjectPropChanged(PropChangeInfo propChange) at Infragistics.Shared.SubObjectBase.NotifyPropChange(PropChangeInfo trigger) at Infragistics.Shared.SubObjectBase.set_Tag(Object value) at Infragistics.Win.UltraWinGrid.UltraGridRow.CopyRowPropertiesFrom(UltraGridRow source, RowPropertyCategories rowProperties) at Infragistics.Win.UltraWinGrid.UltraGrid.CopyPropertiesToPrintRow(UltraGridRow printRow) at Infragistics.Win.UltraWinGrid.UltraGrid.FireInitializeRow(InitializeRowEventArgs e) at Infragistics.Win.UltraWinGrid.UltraGridRow.FireInitializeRow() at Infragistics.Win.UltraWinGrid.RowsCollection.FireInitializeRow(IList rows) at Infragistics.Win.UltraWinGrid.RowsCollection.InitNonGroupByRows(IList fireInitializeRowOnTheseRows) at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRowsHelper(IList boundList) at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows() at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty() at Infragistics.Win.UltraWinGrid.RowsCollection.get_Count() at Infragistics.Win.UltraWinGrid.RowsCollection.GetSpecialRowsHelper(Type rowType, List`1 list, Boolean top, UltraGridRow[] rowsToRecycle) at Infragistics.Win.UltraWinGrid.RowsCollection.GetSpecialRowsHelper(List`1 list, Boolean top, UltraGridRow[] rowsToRecycle) at Infragistics.Win.UltraWinGrid.RowsCollection.CalcSpecialAndFixedRowsHelper(List`1& outSpecialRows, List`1& outFixedRows, Boolean top, UltraGridRow[] rowsToRecycle) at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureSpecialAndFixedRowsCacheCalculated() at Infragistics.Win.UltraWinGrid.RowsCollection.GetFixedRows(Boolean top) at Infragistics.Win.UltraWinGrid.RowsCollection.HasFixedRows(Boolean top) at Infragistics.Win.UltraWinGrid.UltraGridLayout.get_ScrollBoundsResolved() at Infragistics.Win.UltraWinGrid.RowScrollRegion.EnsureScrollRegionFilled(Boolean calledFromRegenerateVisibleRows) at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo) at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible) at Infragistics.Win.UltraWinGrid.ScrollRegionBase.WillScrollbarBeShown() at Infragistics.Win.UltraWinGrid.ViewStyleBase.AddBandHeaders(ColScrollRegion csr, UltraGridBand band) at Infragistics.Win.UltraWinGrid.ViewStyleSingle.RecreateHeaderList(ColScrollRegion csr) at Infragistics.Win.UltraWinGrid.ColScrollRegion.RegenerateVisibleHeaders() at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper() at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics() at Infragistics.Win.UltraWinGrid.UltraGridLayout.ApplyLoadedBands() at Infragistics.Win.UltraWinGrid.UltraGrid.PrepareForExport(UltraGridLayout exportLayout, Boolean async) at Infragistics.Win.UltraWinGrid.AsyncExportOperation.ProcessPhasePrepareForExport() at Infragistics.Win.UltraWinGrid.AsyncExportOperation.ProcessCurrentPhase() at Infragistics.Win.UltraWinGrid.AsynchronousExportManager.ProcessExport() at Infragistics.Win.UltraWinGrid.AsynchronousExportManager.AddExportOperation(UltraGrid grid, IUltraGridExporterAsynch exporter) at Infragistics.Win.UltraWinGrid.UltraGrid.ExportAsync(IUltraGridExporterAsynch exporter) at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.ExportHelper(UltraGrid grid, Worksheet worksheet, Int32 startRow, Int32 startColumn, Boolean asynch) at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.ExportAsync(UltraGrid grid, String fileName, WorkbookFormat workbookFormat)