I've noticed that a certain problem appeared with version 5.2.5, while versions 5.2.3 and 5.2.4 work properly. When I create an XSSFWorkbook like this: org.apache.poi.ss.usermodel.Workbook workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook(); then fill it will the createSheet Method and so on, and later use the write Method to write to a simple FileOutputStream, like this: java.io.OutputStream stream = new java.io.FileOutputStream(new java.io.File(filename)); workbook.write(stream); the writing fails. There is a .xlsx file, but it is corrupt, so that I cannot open it, with 0 kb being displayed as its apparent size. I do not get any exception, the write operation just fails silently. The code in which this operation fails is written in Groovy (currently 2.5). It worked for a long time, and an update to POI 5.2.5 causes the problem, while a downgrade to 5.2.4 fixes it.
As this seems to mostly only affect you while others do use 5.2.5 successfully it may be related to something that you are doing when writing the file. Can you provide a minimal reproducer code-snippet which can be used to reproduce this behavior?
I agree with Dominik, we need more info. I'm not able to trigger this with plain Java: XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet sheet = workbook.createSheet(); Row row = sheet.createRow(0); Cell c = row.createCell(0); c.setCellValue("this is a test"); String filename = "/xxx/test.xlsx"; java.io.OutputStream stream = new java.io.FileOutputStream(new java.io.File(filename)); workbook.write(stream); Do you have the same problem if you explicitly close the stream and close the workbook?
No update for some time, thus closing, please reopen with code which allows to reproduce the problem if you are still having issues.