title: I want to Create a password protected excel file using Apache POI, and then give to for download to Servlet.getOutputStream()
body: <p>I don't have permission to save files to the filesystem. All the examples I could find online are using filesystem. </p>
  
  <p>I want to create workbook in memory as below:</p>
  
  <pre><code>HSSFWorkbook workbook = new HSSFWorkbook();
  </code></pre>
  
  <p>Write data to workbook...
  Make the workbook password protected.?</p>
  
  <p>Then write the workbook to output stream as below:</p>
  
  <pre><code>workbook.write(servlet.getOutputStream());
  </code></pre>