I\'m using Apache POI in java to create an excel file. I fill in the data then try to autosize each column, however the sizes are always wrong (and I think consiste
I was using the Calibri font (that is supported in my JVM).
With that font the getBounds().getWidth() of the java.awt.font.TextLayout used by the autoSizeColumn() POI method returns 0.
Changing the font to Calibri-Regular solved the issue in my case.