poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Asenov <mAse...@velti.com>
Subject RE: flush workbook from time to time
Date Fri, 23 Apr 2010 14:44:27 GMT
Hi, Mark, thanks for the quick reply.

I don't know exactly what format we're exporting into, but I think it's the .xls one. In code
we're using HSSFWorkbook class. Anyway, the whole thing is not written by me, so I'm unaware
of more details about it.

Every single contact expands from 2 to up to 20 horizontal cells, but commonly in 4-5 horizontal
cells.

The point is that in the UI when the user clicks on 'export' we're supposed to supply him
with the exported file. Delaying is not a problem, unless it's 7-8 mins for a workbook of
2000 contacts :-) I hope there's a way to work around this...

Best,
Martin


-----Original Message-----
From: MSB [mailto:markbrdsly@tiscali.co.uk] 
Sent: Friday, April 23, 2010 5:17 PM
To: user@poi.apache.org
Subject: Re: flush workbook from time to time


Can I ask which version of the file format you are targetting please, the
binary (.xls) or OOXML (.xlsx) one? If it is the latter, then it may be
worthwhile looking at Yegor's BigGridDemo program - sorry but I do not have
the link at hand currently - where he streams the contents of a file into a
template to create large worksheets without encountering out of memory
exceptions. It is not a fully fledged utility but rather a proof that you
may - and that is may - be able to adapt to handle your current requirement.
I do not know if you would be able to modify the program to, for example,
fill rows 0 to 2000 with data and then fill rows 2001 to 4000 with data at a
later date but I feel it could be worth looking into.

Aside from that, there is no way to currently stream the document out bit by
bit I am sorry to say. It should be possible and has, I believe, been
discussed by the developers but would require some programming effort and no
one has stepped up to sponsor the work.

Yours

Mark B


Martin Asenov wrote:
> 
> Hello, everyone!
> 
> I've got some DB which contains some contacts. I'm using the Apache POI in
> order to export that DB to an Excel file. Anyway, let's presume the
> contacts are 2000. When I start creating the workbook, the contacts are
> inserted pretty quick, but when the workbook begins to get bigger and
> bigger, things are terribly slowed down.
> 
> Is there a way to flush the workbook from time to time? I didn't see such
> opportunity in the API.
> 
> Best,
> Martin
> 
> 

-- 
View this message in context: http://old.nabble.com/flush-workbook-from-time-to-time-tp28341613p28341925.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message