How can it set the file for "Fit all columns on one page" setting
<p>I have a requirement where files generated by Apache POI need to produce a fie with the <a href="https://stackoverflow.com/questions/25741049/how-to-set-fit-all-columns-on-one-page-in-print-tab-of-excel-2013">fit all columns on one page setting</a> set. I've tried a bunch of variations with the API but so far I haven't been able to do it. Nor can I really find if it can be done. </p>

<p>It seems like the <code>setFitToPage(true)</code> function resizes both the height and width not just the width like I want. Using <code>setFitWidth</code> and <code>setFitHeight</code> like I find in various other stack overflow questions doesn't seem to affect anything.</p>

<p>Here is what I have so far:</p>

<pre><code>public void setPrintSettings(Sheet sheet) {

   sheet.setFitToPage(true); //this will resize both height and width to fit
   sheet.getPrintSetup().setLandscape(true);

   sheet.getPrintSetup().setFitWidth((short) 1);
   sheet.getPrintSetup().setFitHeight((short) 1);

}
</code></pre>