title: Is disposing SXSSFWorkbook necessary when used in try with resource
body: <p>Below is the sample code snippet to create <code>SXSSFWorkbook</code>:</p>
  
  <pre><code>try(SXSSFWorkbook wb = new SXSSFWorkbook()) {
      //...
  } finally {
      wb.dispose(); //wb not accessible over here, so can't use try with resource
  }
  </code></pre>
  
  <p>Here problem is that if I use try with resource then can't <code>dispose()</code> <code>SXSSFWorkbook</code> in finally, as variable <code>wb</code> won't be accessible in finally block. </p>
  
  <p>I wanted know that is disposing of workbook necessary to delete temporary files or since <code>SXSSFWorkbook</code> is <code>AutoCloseable</code>, try with resource will take care of it.</p>