Re: emulate saveAs

2018-11-12 Thread Andreas Reichel
Does not SXSSF Workbook have a constructor based on an existing XSSF (template) Workbook? This will allow to create a new SXSSF workbook, add a sheet with content and then to write out the new file w/o tampering with the existing template? Best regardsAndreas On Mon, 2018-11-12 at 20:54 -0700, Rob

Re: emulate saveAs

2018-11-12 Thread Greg Woolsey
I see your point now - in fact, POIXMLDocument line 234 inside write(OutputStream) has this comment: //force all children to commit their changes into the underlying OOXML Package // TODO Shouldn't they be committing to the new one instead? which indicates someone at some point

Re: emulate saveAs

2018-11-12 Thread Rob Sargent
I believe I’ll have to resort to that, thanks. Is this not a missing feature? > On Nov 12, 2018, at 8:03 PM, Greg Woolsey wrote: > > Or copy the original file first, with standard Java tools, then open, edit, > and write the copy with POI. > > On Mon, Nov 12, 2018, 13:34 Andreas Beeker >>

Re: emulate saveAs

2018-11-12 Thread Greg Woolsey
Or copy the original file first, with standard Java tools, then open, edit, and write the copy with POI. On Mon, Nov 12, 2018, 13:34 Andreas Beeker Hi Rob, > > although this is more memory consuming, how about opening your template > file via (File-)InputStream and using Workbook.write(new >

Re: emulate saveAs

2018-11-12 Thread Andreas Beeker
Hi Rob, although this is more memory consuming, how about opening your template file via (File-)InputStream and using Workbook.write(new FileOutputStream(..))? Andi On 12.11.18 22:25, Rob Sargent wrote: How does one read in an excel file then "save as" new file? I'm transforming xlsx input