I am having a problem with POI 3.14 - downloaded today.

The following code creates a file which, unzipped, looks right, but Excel 
2010 will not open it.

    Workbook wb = new XSSFWorkbook();

    Sheet sh = wb.createSheet("Sheet1");

    Row r = sh.createRow(0);

    Cell c = r.createCell(0);
    c.setCellValue("Cell1");

    wb.write(new FileOutputStream("file.xlsx"));


It works fine with

wb = new HSSFWorkbook();

to create a .xls file.

Any ideas?

Paul
EDW Technology Limited is a company registered in England and Wales with 
company number 3112883 and VAT number 667767961. 
Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes, MK5 8PJ

Reply via email to