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
20
Excel Export : System.OutOfMemoryException
posted

Hi

Urgent help would be appreciated.

I am using Infragistics.excel to export the data to Excel 2003. While exporting 85000 records from a

 datatable I am getting following exception:

Exception of type 'System.OutOfMemoryException' was thrown at Infragistics.Excel.WorkbookFontData.Clone() at

 Infragistics.Excel.GenericCacheElement.FindExistingOrAddToCache[T](T newElement, GenericCachedCollection`1 collection)

at Infragistics.Excel.GenericCacheElementProxy`1.SetCollection(GenericCachedCollection`1 rootCollection)

at Infragistics.Excel.WorksheetCellFormatData.OnRemovedFromRootCollection()

at Infragistics.Excel.GenericCachedCollection`1.Remove(T element)

at Infragistics.Excel.GenericCacheElement.Release[T](T element, GenericCachedCollection`1 collection)

 at Infragistics.Excel.GenericCacheElementProxy`1.BeforeSet()

at Infragistics.Excel.WorksheetCellFormatProxy.set_Alignment(HorizontalCellAlignment value)

at Humana.Medicare.Mamba.Utility.ExportToExcel.FillExcelRowsData(DataTable sourceDataTable,

Workbook& excelWorkbook, Worksheet& excelWorksheet, Boolean isHorizontalDirection)

at Humana.Medicare.Mamba.Utility.ExportToExcel.GenerateExcelFile(String fileName, DataSet sourceDataSet)

at Humana.Medicare.Mamba.Web.ImportExport.Pages.ExportMAData.ExportButton_Click(Object sender, EventArgs e)

at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

 at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

  • 44743
    posted

    Try upgrading to the latest SR for the version you are using. There have been a few memory improvements to support large amounts of data. If you still have the problem, I would need to see a sample to try to reproduce the issue. With the current information, I'm not sure what the problem is.