Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Jun 08, 2017 1:28 pm

Hi,

I am using version: 7.8.26.7040 of SpireXLS.

The CurrentWorkbook.LoadFromFile method is giving an OutOfMemory Exception while trying to load a very large file (500mb CSV).

Can you tell me what options there are to overcome this issue?

Many Thanks
Philip

philipbrown77
 
Posts: 2
Joined: Thu Jun 08, 2017 1:24 pm

Fri Jun 09, 2017 3:08 am

Dear Philip,

Thanks for your inquiry.
The OutOfMemory Exception is generally caused by Memory usage, and Memory usage is mainly dependent on the complexity and size of the documents you were trying. If you're loading huge documents into Spire.XLS, more memory would be required. This is because during processing, the document needs to be held wholly in memory.
As for your issue, Firstly we sugget you use the latest Spire.XLS Pack Hotfix Version:7.12.27 to check if the issue is solved. If the issue still happens, please tell us the OS information and uplaod the input file on the tool, such as OneDrive. Then provide the link here or send it to us(support@e-iceblue.com) via email for investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Jun 12, 2017 3:37 pm

Hi Betsy,

Thank you for the reply. We have tried the hotfix but still have the issue.

I have sent and email to your support address, with a sample project and sample file.

Please let me know if there is anything further that i can try?

Regards
Philip

philipbrown77
 
Posts: 2
Joined: Thu Jun 08, 2017 1:24 pm

Tue Jun 13, 2017 6:26 am

Dear Philip,

Thanks for your information.
I have received the email and reproduced the issue on my side, and posted it to our Dev team. Once there is any news, we will inform you. So sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jun 13, 2017 7:50 am

Dear Philip,

After further investigation, we found that the file will not be opened successfully by MS Excel, see the screenshot on attachment.

Then we found the file has 1799255 rows, but the maximum limit for the version07 or above is 1048576 rows. Please kindly note that our Spire.XLS is MS Excel standard-based. So you will get “Specified argument was out of the range of valid values” exception when the memory is enough.

In addition, as I said before, if you're loading huge document into Spire.XLS' DOM, more memory would be required. This is because during processing, the document needs to be held wholly in memory. Usually, Spire.XLS needs 10 times more memory than the original document size to build a DOM in the memory. You will get the “OutOfMemory” exception when the Memory usage is not enough.

For your issue, we suggest you reduce the size of your document.

Sincerely,
Betsy
E-iceblue support team
Attachments
MS Excel.png
MS Excel.png (14.61 KiB) Viewed 3631 times
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS