poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Slootweg <psloot...@edwtech.com>
Subject Simple example doesn't open in Excel 2010
Date Fri, 18 Mar 2016 19:09:45 GMT
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);

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

It works fine with

wb = new HSSFWorkbook();

to create a .xls file.

Any ideas?

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message