Forums Register Login

Write Excel file line-by-line?

+Pie Number of slices to send: Send
Hi, All,

I'm attempting to write a report generator that will read data from a database and create and write it to an excel file. I have it working at the moment, but the solution I found (Apache POI) requires holding the entire excel document in memory prior to writing it.  This is fine for smaller reports, but the business requirements allow for arbitrary-sized reports (eg, generate list of all records in a given table), and I'm worried about memory usage. I've seen references to an ability to write XLSX files line-by-line, but I can't find any information on how that might be done. Does anyone have any recommendations? (Note: I've tried writing csv files, but since we have large numbers in our database, we've run into the issue that Excel automatically zeroes out any digits beyond the 15th of a long number.)
(1 cow) 2
+Pie Number of slices to send: Send
SXSSF.
That's probably the one you're looking for.
+Pie Number of slices to send: Send
 

Dave Tolls wrote:SXSSF.
That's probably the one you're looking for.



yep, that looks like it will do it!  Thanks muchly!
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 726 times.
Similar Threads
insert CSV values from file to MySQL
How 2 Get reports
generate large excel using zip stream
Aspose.Total Product Family Q2 2010 Released
Specify Number of Significant Digits & Get Paper Size of a Worksheet inside Java Apps
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:32:21.