title: Generate xlsx file with POI in a zip
body: <p>I export data in an xlsx files with the POI Api and added they're in a Zip file. When I open the zip I do not have any xlsx files but three directories (docProps, xl and _rels) and 1 file [Content_Types] xml. I think it's the xlsx file's description, but I don't understand why.</p>
  
  <p>Code : </p>
  
  <pre><code>public InputStream exportXlsx(List&lt;MyObject&gt; listeOfObject) throws IOException {
  
          ByteArrayOutputStream excelOutputStreamZip = new ByteArrayOutputStream();
          ZipOutputStream zip = new ZipOutputStream(excelOutputStreamZip);
  
          for (MyObject myObject : listeOfObject) {
  
              XSSFWorkbook wb = new XSSFWorkbook();
              XSSFSheet wsheet = wb.createSheet("mySheet");
              XSSFRow row = wsheet.createRow(0);
              XSSFCell cell = row.createCell(1);
              cell.setCellValue(myObject.getValue1());
  
              // Create all sheet and cell....
  
              // Write WB conntent in outputStream
              wb.write(excelOutputStreamZip);
  
              addEntry(zip, myObject.getFileName(), excelOutputStreamZip);
          }
  
          InputStream inputStreamZipByte = new ByteArrayInputStream(
                  ((ByteArrayOutputStream) excelOutputStreamZip).toByteArray());
          zip.close();
  
          return inputStreamZipByte;
  
      }
  
      public void addEntry(OutputStream zip, String filename, ByteArrayOutputStream os) {
  
          byte[] bytes = os.toByteArray();
  
          ZipEntry entry = new ZipEntry(filename);
          Date d = new Date();
          entry.setTime(d.getTime());
          try {
              ((ZipOutputStream) zip).putNextEntry(entry);
              ((ZipOutputStream) zip).write(bytes);
              ((ZipOutputStream) zip).closeEntry();
          } catch (IOException e) {
              log.error("Can't read the file !", e);
          } catch (ClassCastException cce) {
              log.error("Bad format !", cce);
          }
  
      }
  </code></pre>
  
  <p>This code is write in a service which is inject in a Struts2 action.</p>
  
  <p>struts.xml :</p>
  
  <pre><code>&lt;action name="*MyAction" class="com.omb.view.action.myAction" method="{1}"&gt;
      &lt;result name="export" type="stream"&gt;
          &lt;param name="contentType"&gt;application/zip&lt;/param&gt;
          &lt;param name="inputName"&gt;inputStreamZipByte&lt;/param&gt;
          &lt;param name="contentDisposition"&gt;attachment;filename="myZip.zip"&lt;/param&gt; 
          &lt;param name="bufferSize"&gt;1024&lt;/param&gt;
      &lt;/result&gt;
  &lt;/action&gt;
  </code></pre>