Bug 65574 - Update xlsx file when its is already created
Summary: Update xlsx file when its is already created
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 5.0.0-FINAL
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2021-09-16 09:35 UTC by Alberto Gavazzi
Modified: 2021-10-09 14:49 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Gavazzi 2021-09-16 09:35:25 UTC
i am java developer and i want report a problem in Apache POI Library.
the bug that I wanted to report deals with the problem of updating the worksheet when the file is written to disk and it is possible to update the worksheet written the first time, losing the first change made because the file is created again with only the latest changes
I ask you for a detailed analysis of the problem and to correct it as soon as possible
Thank you 
Comment 1 PJ Fanning 2021-09-16 09:42:18 UTC
POI is a volunteer project. If you don't like how the code works, you can always submit a patch and the volunteers will look at it on its merits.

This does not sound like a bug to me but if you provide a reproducible test case, someone will look at it.
Comment 2 Alberto Gavazzi 2021-09-16 09:54:21 UTC
Thanks for the reply
I am afraid you did not understand the severity of the bug because what I have reported causes loss of information that may be important
Comment 3 Andreas Beeker 2021-09-16 10:56:35 UTC
We have unit test to check if successive changes are saved to disc - just look for the many invocations of "writeOutAndReadBack" in the test classes. So there was someone who did a detailed analysis for such cases.

Therefore you need to put more detail in your bug report before we can analyze it.
Something like adding ...
* an attachment of your first save
* modifications from first to second save - preferably as junit test
* an attachment of your second save
* describe what content you still expect to be there - i.e. what has been lost?

Be aware that POI is not keeping track of the content of the file. Once it's read into memory - especially if you modified those parts - those parts will be cached and not read again. So if you would like to react on external modifications, you'll need to verify the file timestamps yourself and reload the workbook.
Comment 4 Dominik Stadler 2021-10-09 14:49:15 UTC
No response on request, so closing for now, please reopen with more information if this is still an issue for you.