poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50029] XSSFWorkbook created cannot be opened by Excel 2007 SP2
Date Thu, 30 Sep 2010 04:21:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50029

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Yegor Kozlov <yegor@dinom.ru> 2010-09-30 00:21:39 EDT ---
Your code just saves an empty workbook which is invalid:

    wb = new XSSFWorkbook();    
    wb.write(fileOut);

You need to insert at least one sheet to make the workbook readable by Excel,
e.g. the following code will produce a valid output:

    wb = new XSSFWorkbook();    
        XSSHSheet sh = wb.createSheet();
    wb.write(fileOut);

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message