title: Apache POI, calling autosize after auto filter
body: <p>I have been searching for a while, and haven't been able to find a solution as yet.</p>
  
  <p>This question has been asked before on here but the OP didn't get a response and I didn't want to resurrect an old thread so decided on asking a new question. The OP thread is <a href="https://stackoverflow.com/questions/9941584/autosize-rows-after-calling-the-autofilter-method-in-apache-poi">here</a>.</p>
  
  <p>The problem I'm having is that I've got a spreadsheet which is created with data obtained from a database, however sometimes the data within cells can be quite lengthy, so wanted POI to autosize to save the user having to do it, but because I'm setting autofilter before calling autosize, it's not quite working.</p>
  
  <p>I'm using Apache POI 3.9.</p>
  
  <p>I either get it to a point where it's autosized but hasn't taken into account the autofilter dropdown arrow, or I get a null pointer exception.</p>
  
  <p>I've tried moving a for loop all over the place, including at the end of where the data is written to the spreadsheet, and also to just before the file output stream, but to no avail.</p>
  
  <p>I have also tried using a couple of different fonts but that hasn't worked either.</p>
  
  <p>Hoping someone can help me out please.</p>
  
  <p>Thanks</p>