OpenXml, Isolated Storage and large file sizes

1

I am using OpenXML to generate an Excel document within a web application. It is working great for files < ~10mb

For files generated with sizes great than 10mb I am getting the following exception...

While I have some discussion of this issue on the web (some about using other packaging libraries) I have yet to resolve our problem. Others seen and resolved this issue?

I really like the idea of using OpenXml (however I hate the idea of moving to another solution due to this issue alone)

Solutions?

System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, StringHandleOnStack retRootDir) at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder.GetCurrentStore()

c#
asp.net
excel
openxml-sdk
asked on Stack Overflow Jan 14, 2014 by David

3 Answers

0

I'm opening package using this
WordprocessingDocument package = WordprocessingDocument.Open(inputFileName, true); I am able to process files more than 30mb.

I think you are using MemoryStream to process it.

Refer this. http://www.kevinrohrbaugh.com/blog/tag/openxml

Hope this helps!

answered on Stack Overflow Jan 15, 2014 by Mohamed Alikhan
0

I was having issues generating Excel files with 75 columns and 130,000 rows. I'm returning them from a web server. I tried to use Openxml, was pretty slick at first, but it seems to have a lot if issues that don't seem to be getting fixed. I was able to get it to work by only putting 8000 lines on a sheet and using a macro to combine the sheets when it was opened, this caused another set of issues. I struggled with this for a couple of months, it seems lots of people have this issue.

Since the new excel files are just a zipped up bunch of xml files I could not figure out why no one is unzipping this and replacing the sheet with their own populated with data and zip it backup. I was down to my last straw so decided to try it, I looked up .Net compression and writing large xml files. Within 2 hrs I had my first working test populating from the db.

I am generating excel files with 75 columns and 130,00 rows, 1 minutes to query the data and 3 1/2 minutes to generate the report. When I was using the Openxml these would take 7 - 8 minutes and would eat up all the memory of not careful. I really had to tweak the app pool to keep it all running.

answered on Stack Overflow Aug 28, 2014 by Sean Marcellus
0

Check this link.

https://maheshkumar.wordpress.com/2014/10/21/

Just come to know through my colleague about this fix- wanted to share. We finally have a fix for this long standing issue where applications using Open XML SDK (or System.IO.Packaging) would hang in multithreaded scenarios while working with large files.(10MB limit related bug).

Hotfix rollup 2996566 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Windows 8.1 and Windows Server 2012 R2 support.microsoft.com/kb/2996566 Hotfix rollup 2996567 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Windows 8 and Windows Server 2012 support.microsoft.com/kb/2996567 Hotfix rollup 2996568 for the .NET Framework 4.5, 4.5.1, and 4.5.2 on Vista SP2, Windows Server 2008 SP2, Windows 7 SP1, and Windows Server 2008 R2 SP1 support.microsoft.com/kb/2996568

answered on Stack Overflow May 21, 2015 by saideena

User contributions licensed under CC BY-SA 3.0