code: public void autoSizeAllColumns ()
    {
      // auto-adjust all columns (except description and image description)
      for (short nCol = 0; nCol < m_nMaxCellIndex; ++nCol)
        try
        {
          m_aLastSheet.autoSizeColumn (nCol);
        }
        catch (final IllegalArgumentException ex)
        {
          // Happens if a column is too large
          LOGGER.warn ("Failed to resize column " + nCol + ": column too wide!");
        }
    }
docs: Auto size all columns to be matching width in the current sheet