We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

OutOfMemory exception when read big excel files

Thread ID:

Created:

Updated:

Platform:

Replies:

108656 May 6,2013 04:09 AM Apr 22,2016 07:51 AM Windows Forms 6
loading
Tags: XlsIO
Pavel Ajtkulov
Asked On May 6, 2013 04:09 AM

Hi.

Alas, we have to work with big excel files (size > 250 Mb). This files are plain (without charts, images, etc) and contains about 170 sheets with 130*500 numeric cells.

Is it possible to work with that big files?

On ExcelEngine.Excel.Workbooks.OpenReadOnly(tempFileName) I've got an OutOfMemoryException. 

   at Syncfusion.CompoundFile.XlsIO.Native.ILockBytes.WriteAt(UInt64 ulOffset, Byte[] pv, UInt32 cb, UInt32& pcbWritten)
   at Syncfusion.CompoundFile.XlsIO.Native.CompoundFile.Open(Stream stream)
   at Syncfusion.CompoundFile.XlsIO.Native.CompoundFile..ctor(Stream stream)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateCompoundFile(Stream stream)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelOpenType openType, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.OpenReadOnly(String strFileName, ExcelOpenType openType, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.OpenReadOnly(String strFileName)
   at Usp.Sip.Common.ExcelData.Dao.SyncfusionSpreadsheetDao.Open(String fileName) in 

Pavel Ajtkulov
Replied On May 6, 2013 04:10 AM

Syncfusion version = 10.4.0.53 

Manikandan M [Syncfusion]
Replied On May 9, 2013 02:55 AM

Hi Pavel,

 

Thanks for Syncfusion products.

 

We suspect that “OutOfMemoryException is thrown when opening file” could be a defect. Could you please create the new incident with following details which would help us to analysis the issue?

      1.       System configuration.

      2.       Project scenario

      3.       Files which throws exception.

 

Please let us know if you need any clarifications.

 

Thanks,

Manikandan M.


Pavel Ajtkulov
Replied On May 15, 2013 07:58 AM

Hi, Manikandan.

Excuse me for delay.

Please, tell me your email, or send it to ajtkulov@gmail.com. There are some private datas.

Are there memory limitations on file open procedure?
I can open excel files (fileSize < 100Mb) using Syncfusion, but I've got MemoryException on fileSize=250Mb. Indeed, I need open fileSize=500Mb...

Manikandan M [Syncfusion]
Replied On May 20, 2013 01:13 AM

Hi Pavel,

 

We highly regret for delay in getting back to you.

 

In Essential XlsIO, we will be using the system memory for content preservation until it is saved to the file. If we are dealing with large amount of data XlsIO component requires more system memory to preserve the details. For any workbook, XlsIO approximately uses 10 times more that file size. Whereas it depends on data’s of workbook.

So as we requested earlier, Could you please post this question through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents so that we can  analysis and provide you a solution for this problem and you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. Thank you for your participation in Syncfusion’s Community Forums”.

Also we have a NDA (Non-Disclosure agreement).  We use your documents/projects for issue reproducing and testing purpose only and we will not disclose this document to anyone else.


Please let us know if you have any questions.

 

Regards,

Manikandan M.


Manikandan M [Syncfusion]
Replied On May 20, 2013 01:16 AM

Hi Pavel,

 

We highly regret for delay in getting back to you.

 

In Essential XlsIO, we will be using the system memory for content preservation until it is saved to the file. If we are dealing with large amount of data XlsIO component requires more system memory to preserve the details. For any workbook, XlsIO approximately uses 10 times more that file size. Whereas it depends on data’s of workbook.

So as we requested earlier, Could you please post this question through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents so that we can  analysis and provide you a solution for this problem and you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. Thank you for your participation in Syncfusion’s Community Forums”.

Also we have a NDA (Non-Disclosure agreement).  We use your documents/projects for issue reproducing and testing purpose only and we will not disclose this document to anyone else.


Please let us know if you have any questions.

 

Regards,

Manikandan M.

 


Dilli Babu Nandha Gopal [Syncfusion]
Replied On April 22, 2016 07:51 AM

Hi, 
 
XlsIO consumes 4 times of memory that of a workbook in the latest version (14.1v). However, the memory consumption depends on the usage of unique data, styles, charts and images in a workbook. 
 
In XlsIO library, the memory consumption has been gradually improved since 12.2v. In addition, to handle larger data with less memory consumption, we recommend to use any of the following options. 
 
  • ParseWorksheetsOnDemand – To parse worksheets on demand (Refer: Accessing worksheets)
  • ImportOnSave – To import data while serializing the document (Refer: Importing Data Table)
  • IMigrantRange – An optimal method of writing values with better memory (Refer: Range Access)
  • SetText(), SetNumber(), SetFormulas(), SetBoolean() methods in Worksheet class to set the values directly.
 
To know more about these optimization technique, you can refer the following online documentation link. 
 
 
Regards, 
Dilli babu. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;