title: How to speed up autosizing columns in apache POI?
body: <p>I use the following code in order to autosize columns in my spreadsheet:</p>
  
  <pre><code>for (int i = 0; i &lt; columns.size(); i++) {
     sheet.autoSizeColumn(i, true);
     sheet.setColumnWidth(i, sheet.getColumnWidth(i) + 600);
  }
  </code></pre>
  
  <p>The problem is it takes more than 10 minutes to autosize each column in case of large spreadsheets with more than 3000 rows. It goes very fast for small documents though. Is there anything which could help autosizing to work faster? </p>