title: apache poi write to temp file instead real file
body: <p>i have a excel file which serve as a template and will be writted and downloaded by several users</p>
  
  <p>I am using apache poi for doing this<br>
  The problem is when one user fill the excel (using a gui client) it will be writted directly to the template but as a template it should stay unmodified otherwise next user will have previous user changes ....</p>
  
  <p>The best solution i think is to write to a temp files which will be deleted at user's action exit</p>
  
  <p>Thank you very much</p>
  
  <pre><code>        File excelFile = openTemplate(); 
          OPCPackage pkg = OPCPackage.open(excelFile ,PackageAccess.READ_WRITE); 
          XSSFWorkbook book = new XSSFWorkbook(pkg);
          book.setWorkbookType(XSSFWorkbookType.XLSX);
          book.setForceFormulaRecalculation(true);
  
          // excel treatments ( sheet , styles etc..)
  
          FileOutputStream out = 
                  new FileOutputStream(TempFile.createTempFile("Export" , ".xlsx"));
          book.write(out);
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          bos.writeTo(out);
          bytes = bos.toByteArray();
          out.close();
          bos.close();
          book.close();
          return bytes;
  </code></pre>