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);
}
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. Help is indeed needed!