Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I am having memory leaks trying to implement an ASP.NET Application, using OPEN XML SDK 2.x to upload and read .xlsx files with >255 columns.

The current development machine where its hosted runs out of memory as it reads the data in a List object in c#.

Any help is appreciated.
Posted
Comments
Herman<T>.Instance 18-Sep-12 3:25am    
do you do open file of do you use filestream?
A list is quite consuming. is it the > 255 columns or the number of rows that is the problem?
AU Jase 18-Sep-12 21:57pm    
I need to use XMLReader but not using DOM, but using SAX (Simple API XML), do you have suggestions?
Herman<T>.Instance 20-Sep-12 10:34am    
EPPLUS

1 solution

The only compromise I have found is to use a desktop app downloadable from the server ASP.NET which converts the .xlsx to CSV with the Open XML SDK. Then upload the comma delimited CSV to the server for processing into a datatable.

Benefits are:

No System.OutofMemory exceptions.
Response time and server load greatly improved.

The downside is, the file is in raw text format, may need an encryption/decryption scheme to guarantee security.

Also need to resolve concurrency issues.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900