title: How InputStream convert to apache.poi Workbook?
body: <p>I need file excel  to convert in <code>Workbook</code> (apache poi).
  I get <code>InputStream</code>:</p>
  
  <pre><code>InputStream in = getInputStream(); // from user file.xls
  if(in != null){
      HSSFWorkbook hssfWorkbook = new  HSSFWorkbook(in); //exception
  }
  </code></pre>
  
  <p>but next I get exception:</p>
  
  <blockquote>
    <p>org.apache.poi.poifs.filesystem.NotOLE2FileException: Invalid header
    signature; read 0x0005060000100809, expected 0xE11AB1A1E011CFD0 - Your
    file appears not to be a valid OLE2 document</p>
  </blockquote>
  
  <p>InputStream I geting from file was built Apachi Poi</p>
  
  <p>And question <a href="https://stackoverflow.com/questions/33879515/notole2fileexception-invalid-header-signature-read-0x0000000000000000-expecte">NotOLE2FileException: Invalid header signature; read 0x0000000000000000, expected 0xE11AB1A1E011CFD0</a>   not work for me</p>
  
  <p>I use Vaadin  framework. </p>
  
  <pre><code>MultiFileMemoryBuffer buffer = new MultiFileMemoryBuffer();
  
  Upload upload = new Upload(buffer);
  upload.setAcceptedFileTypes("application/vnd.ms-excel");
  upload.setMaxFiles(1);
  upload.setSizeFull();
  upload.addSucceededListener((event) -&gt; {
  
          name = event.getFileName();
  
          try (InputStream inputStream = buffer.getInputStream(name) // getInputStream
               ) {
                  Workbook workbook = WorkbookFactory.create(inputStream);
  
              } catch (IOException e) {
                  e.printStackTrace();
              }
          });
  }
  </code></pre>