I'm using > for (short i = 0; i < Math.max(rowZero.getLastCellNum(), 0); i++) > sheet.autoSizeColumn(i); on a XSSF Sheet to autosize all columns. This works perfectly with poi up to version 5.2.3. In version 5.2.4 and 5.2.5 the columns are not autosized in the resulting Excel. Do I have to add some code since 5.2.4 in order to get this working?
68094 is the most recent change
Created attachment 39408 [details] sample project Set version in gradle.properties to 5.2.3 => it works. See File ExcelExport.xlsx after running the testcase. Set it to 5.2.4 or 5.2.5 => autosizing fails
I tried to reproduce this but could not see any difference between 5.2.3 and 5.2.5 when using LibreOffice to display the resulting file. Maybe there is some other change locally for you which affects this? Maybe some font-installation issue?
Created attachment 39602 [details] sample project V2 with screenshots I added v2 of the project. I updated all other dependencies. Added two screenshots under src/main/resources Also added two Excels under src/main/test If I change poiOoxmlVersion in gradle.properties to 5.2.5 the error occurs: ## set to 5.2.3 in order to work!! poiOoxmlVersion=5.2.5 with 5.2.3 autosizing works fine. No other changes on the computer between the changes. I open the Excel with Microsoft Excel, not with OpenOffice... Maybe that is the problem?
Thanks for the updated information, you are right, Excel shows the columns too small, while LibreOffice displays it properly (also on Windows). We are discussing some changes between in 5.2.3/4 -> 5.2.5 at bug #68094, hopefully it will also cover this one. *** This bug has been marked as a duplicate of bug 68094 ***