I have seen this behavior with POI-3.9 as well. Updating to POI-3.10 has resolved this issue for me.
The columns are not hidden but just have no width. The trick is to select all columns and then choose Show (last entry of context menu) to make them visible again.

I tried it with Excel 2013, the column is autosized correctly when using POI 3.11-beta2/trunk.
Therefore I am resolving this for now, please reopen with detailed version information if you still see this problem with recent versions of POI.

Hi,
I never succeded to reproduce on a dev environment however this seems to always happen on some customers production environment using POI 3.9 and with different JVM versions.
I found a Stack Overflow topic that seems to be related to this bug (stackoverflow.com/a/14389179/1069454)
Is there a known list of steps/conditions required to reproduce this issue?
Could you also please clarify if the issue was reproduced at some point and fixed in 3.11 or if it was never reproduced by POI team. From the status (WORKSFORME) I guess it was never reproduced by POI team right?

I was able to reproduce the problem using poi 3.9.0, 3.10 and 3.11-beta2 on windows 7 with oracle jre 7u21.
This works fine with jre 7u67 on windows 7.
I was not able to reproduce on ubuntu with oracle jre 7u21.

Debugging shows that using oracle jre 7u21 layout.getBounds().getWidth() returns 0 in org.apache.poi.ss.util.SheetUtil.getCellWidth(Cell, int, DataFormatter, boolean)
This may be related to this jdk bug https://bugs.openjdk.java.net/browse/JDK-8013716.
The problem can be mitigated by detecting when auto sizing fails and using a minimal width:
sheet.autoSizeColumn(0)
if (sheet.getColumnWidth(0) == 0) {
// autosize failed use MIN_WIDTH
sheet.setColumnWidth(0, MIN_WIDTH);
}

I also think that we rather should require an recently patched version of Java, therefore closing this WONTFIX for now. There are many security related and many bug fixes in those newer patchlevels, so upgrading is generally a good idea.

This is ASF Bugzilla: the Apache Software Foundation bug system. In case
of problems with the functioning of ASF Bugzilla, please contact
bugzilla-admin@apache.org.
Please Note: this e-mail address is only for reporting problems
with ASF Bugzilla. Mail about any other subject will be silently
ignored.