Quantcast
Viewing all articles
Browse latest Browse all 1621

Commented Issue: NPOI 2.0 Unable to Export 70k Rows [11160]

<p>Hi,</p>
<p>&nbsp;</p>
<p>I am using NPOI 2.0 Alpha to export data from a work system as we wanted to get round the Excel 97-2003 65K row limitation. </p>
<p>&nbsp;</p>
<p>I have implemented it today but it seems to be unable to export 70k rows and falls over with an OutOfMemory exception.</p>
<p>&nbsp;</p>
<p>The file is only 70k rows by around 20/25 columns of text - no formatting is present.</p>
<p>&nbsp;</p>
<p>I understand XML requires large amounts of memory but the limitation doesn&#39;t seem to be down to my machine (it has plenty of RAM spare), instead it seems to be down to one of the internal structures that NPOI is using (memory stream or byte array perhaps?).</p>
<p>&nbsp;</p>
<p>I have attached a stack trace to demonstrate.</p>
<p>&nbsp;</p>
<p>Could someone advise if there is a way round this? Alternatively, where can i find the NPOI 2.0 source code for download so i can step through and try and find a solution myself?</p>
<p>&nbsp;</p>
<p>If this can be solved it&#39;d be a real bonus as this will likely be a common problem.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Thanks in advance,</p>
<p>&nbsp;</p>
<p>u33db</p>

Comments: ** Comment from web user: u33db **

Thanks for the response.

I have managed to find a workaround in the meantime.

Basically I use the NPOI XSSF objects to create an XLSX template file (column headers etc but no data) and save that to the file system. I then use the Open XML SDK to open this and write the data in using a SAX like approach.

This works (albeit slowly) so may be of help to anyone with the same problem.

If a full NPOI solution can be implemented sometime in the future that would be great as the Open XML SDK really isn't as user friendly as NPOI.


Viewing all articles
Browse latest Browse all 1621

Trending Articles