title: Why is this code producing an invalid Excel file?
body: <p>This creates a excel file which gives file format is not valid error when trying to handle it, not proper excel file with a number added on it:</p>
  
  <pre><code>public static void write () throws IOException, WriteException { 
    WorkbookSettings settings = new WorkbookSettings(); 
    File seurantaraportti = new File("ta.xls"); 
    WritableWorkbook seurw = Workbook.createWorkbook(ta,settings); 
    seurw.createSheet("ta", 0); 
    WritableSheet ws = seurw.getSheet(0); 
    addNumber(ws,0,0,100.0); 
    seurw.close(); 
  } 
  
  private static void addNumber(WritableSheet sheet, int column, int row, Double d) 
      throws WriteException, RowsExceededException { 
    Number number=new Number(column, row,d); 
    sheet.addCell(number); 
  } 
  </code></pre>
  
  <p>What am I doing wrong?</p>