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

Free Support Forum - aspose.com

.NET Aspose.cells Convert time Web Server Hangs(Memory Usage high) with 140K records

I am using the Aspose.Cells for .NET, version 7.0.4.0. I am having around 140K records from database and 15 columns.


Our web server hangs or short of memory when following line of code executes.

My code is as follows:
w.Cells.ImportDataTable(dt, true, 0, 0);
w.PageSetup.PaperSize = PaperSizeType.PaperLetter;

Can you please help us to fix this issue? or any alternative solution? This is kind of very urgent issue.

WE have also tried :
w.Cells.ImportDataReader(dr, 0, 0,true); but NO Luck.

Thanks
1 Like

Hi,


Please download and use the latest fix/version: Aspose.Cells for .NET v7.3.0.5.
In the latest versions, we have made enhancements for bigger processes.Please try it and let us know the result.

Also, since you are filling a very large dataset 140K rows with certain cols ==> 140K * 15 records , so this would be huge process and may demand more memory (approximately 10 times of the saved file). So, make sure that you have sufficient amount of memory reserved for the process.

Thank you.

Amjad,

We are facing more and more major issue with Aspose. Our client is very upset with use due to none of the project are working because of “Out of memory” issue. As I told you the we have the 7.3.0.0 on Production and having lots of issues now. The Old version 7.0.4.0 was little more stable.

As you know that we are fetching 150K records with 68 columns in it.

Please see the below ERROR we got it from production server.

Error Msg: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Src: System.Web

Stack: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.sapreports_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Target: HandleError

Dump: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Aspose.Cells.Row.GetCell(Int32 , Boolean , Boolean ) at Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean isFieldNameShown, Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32 columnNumber, Boolean insertRows, String dateFormatString, Boolean convertStringToNumber) at Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean isFieldNameShown, Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32 columnNumber, Boolean insertRows, String dateFormatString) at Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean isFieldNameShown, Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32 columnNumber, Boolean insertRows) at Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean isFieldNameShown, Int32 firstRow, Int32 firstColumn) at FST.components.Export2007New.Report8SAPa(HttpResponse response, Int32 CustomerId, Int32 VendorId, Boolean ShowLucentData) at FST.SAPReports.lnkRpt11a_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.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) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.sapreports_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)v

Hi,

Regarding memory issue, if you are putting 150K with 68 columns in a single sheet, you will surely need more RAM for this huge list of data. If you do not have sufficient RAM for this big process, the error will be thrown surely. Also, if you are able to save the Excel file in any case, with huge data/contents, it will be huge and MS Excel will also take some time to be opened in it. If you do not have sufficient amount of RAM, you 'd better split your data into multiple worksheets in the workbook.

May be you could use LightCells APIs to place this huge data list if possible and save to XLSX file format, see the topic (It is for JAVa but you may use it in .NET accordingly): http://www.aspose.com/docs/display/cellsjava/Using+LightCells+API

I have also attached a simple program using Aspose.Cells for .NET's LightCells APIs for reference, so you may create your own code using LightCells APIs.

Also, , we recommend you you to try the latest version: Aspose.Cells for .NET v7.3.1.3 if it makes any difference, you may test it on your local machine, if it works better then you may update over your production server.

If you still could not evaluate, kindly create a sample project, zip it and post it here to show the issue, we will check it soon.


Thank you.



Thanks,