https://bz.apache.org/bugzilla/show_bug.cgi?id=59252

--- Comment #6 from Marcel M. <marcel.moehr...@mail.de> ---
I just hit this bug in 5.0.0.
A (wasteful) workaround is to write to a NullOutputStream to trigger the in
place update of the File:


try (Workbook wb = WorkbookFactory.create(new File("foo"));
     OutputStream out = OutputStream.nullOutputStream()) {
    ...
    wb.write(out);
}


This is especially interesting because the doc for
WorkbooFactory.create(InputStream) encourages the use of the File version:

"Note also that loading from an InputStream requires more memory than loading
from a File, so prefer {@link #create(File)} where possible."

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to