Created attachment 32934 [details] Sample program When adding a comment to a specific cell using Cell.setCellComment(), it seems like it's corrupting the .xlsx file. Excel shows a message explaining that the content is not readable, and removes the comment in section "/xl/comments1.xml" To reproduce the problem I used the snippet available at https://poi.apache.org/spreadsheet/quick-guide.html#CellComments. The full source to reproduce the problem is attached down below. By the tests I have made, it only happens with SXSSF and Microsoft Excel. If I use XSSF (Non-streamed) or HSSF, the message is not displayed in Excel. Also, if opening the "corrupted" .xlsx with LibreOffice, no message is shown and the comment is displayed correctly. Also, this behaviour started since we updated from version 3.9 to version 3.12 to fix some problems we had with images, and in version 3.9 it works perfetly. I also tested it in version 3.13-beta1-20150723 and the problem persists. I did not test in 3.10 and 3.11 Apache POI full version: poi-3.12-20150511 Microsoft Excel version: Microsoft Excel 2010 (14.0.7153.5000) SP2 MSO
This sounds related to bug 57571, can you try the workaround posted there.
This seems to have been caused by changes for bug 54920, we need to find out how to solve this for both cases...
I guess I missed that bug. The workaround specified there works fine for me, seems like both bugs are the same
This is now fixed again via r1692483, it was a regression that was introduced in 2013 as part of fixing Bug 54920.