title: Writing to .xlsx using java. BiffViewer error occurs
body: <p>jars I have used : <code>dom4j poi-3.8.jar</code> <code>poi-ooxml-3.8.jar</code> <code>poi-ooxml-schemas-3.8.jar</code> <code>xbean.jar</code></p>
  
  <p>The code :</p>
  
  <pre><code>package org.capgemini.ui;
  
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.util.Date;
  import java.util.Enumeration;
  import java.util.Iterator;
  import java.util.Vector;
  
  import org.apache.poi.xssf.usermodel.XSSFCell;
  import org.apache.poi.xssf.usermodel.XSSFRow;
  import org.apache.poi.xssf.usermodel.XSSFSheet;
  import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  
  public class XSSFWorkBookWriter  {
  
  public void writeWorkBook(Vector table) throws Exception {      
  
  XSSFWorkbook workBook = new XSSFWorkbook();
  XSSFSheet sheet = workBook.createSheet();
  table=new Vector();
  table.add(new String("Howdy"));
  table.add(new java.sql.Date(2012,06,20));
  table.add(new Double(13.35D));
  table.add(new String("Fine"));
  table.add(new java.sql.Date(2012,06,20));
  table.add(new Double(13.38D));
  
  Iterator rows=table.iterator();
  Enumeration rowsOfVector=table.elements();
  int totalNoOfRows=table.size()/2;
  int currentRow=0;
  while (rows.hasNext () &amp;&amp; currentRow&lt;totalNoOfRows){
  XSSFRow row =  sheet.createRow(currentRow++);               
  for (int i = 0; i &lt; 3; i++) {
  XSSFCell cell=row.createCell(i);
  Object val=rows.next();
  if( val instanceof String){
  cell.setCellValue(val.toString());
              }
  else if(val instanceof Date){
  cell.setCellValue((java.sql.Date)val);
              }
  else if(val instanceof Double){
  cell.setCellValue((Double)val);
  }
  }
  }
  
  FileOutputStream outPutStream = null;
      try {
          outPutStream = new FileOutputStream("D:/Try.xlsx");
          workBook.write(outPutStream);
      } catch (IOException e) {
          e.printStackTrace();
      } finally {
          if (outPutStream != null) {
              try {
                  outPutStream.flush();
                  outPutStream.close();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }
  }
  
  public static void main(String[] args) {
      XSSFWorkBookWriter bookWriter=new XSSFWorkBookWriter();
      try {
          bookWriter.writeWorkBook(new Vector());
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>ERROR :: </p>
  
  <blockquote>
  <pre><code>org.apache.poi.hssf.dev.BiffViewer$CommandParseException: Biff viewer needs a filename
   at org.apache.poi.hssf.dev.BiffViewer$CommandArgs.parse(BiffViewer.java:333)
   at org.apache.poi.hssf.dev.BiffViewer.main(BiffViewer.java:386)
  </code></pre>
  </blockquote>