Quote (carteblanche @ Jul 10 2013 04:29pm)
i've always built excel via XML instead of using those objects. or is that what the poi library does?
if the problem occurs when writing the stream, use a buffered stream writer to only write a little bit at a time. but if it says heap space, then i think you're creating too many objects. look for whatever loops you're using. perhaps you can improve it. alternatively, if this is in xml, you might have to write to disk more frequently to clear that data from memory. eg write 10,000 (or whatever) rows at a time to disk, then free the memory and continue
or why are you writing your own program to do it anyway? is it possible to just create a result set from the manipulation and export that in your DBMS?
The POI library uses objects which is lame because of the heap space and more importantly, you can only use versions 2003 and lower.
Does using XML not require building objects, but just printing directing to the file (almost like Excel.out.print(<cell>asdf</cell>))? If so that would be perfect for me. I also did some more calculations and my program will write ~200k lines which is too long for a excel 2003 table.
I'm not quite sure about your last question. My end product needs to be an excel file, not part of a db.