You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/09/30 05:42:23 UTC

DO NOT REPLY [Bug 50029] New: XSSFWorkbook created cannot be opened by Excel 2007 SP2

https://issues.apache.org/bugzilla/show_bug.cgi?id=50029

           Summary: XSSFWorkbook created cannot be opened by Excel 2007
                    SP2
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: forumsandflyers@gmail.com


Created an attachment (id=26101)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26101)
Relevant class and JUnit test class

To start with, I am creating only  a blank file. No worksheets, no data.
However, when I attempt to open the file with Excel 2007, I get the following
popup:

"Excel found unreadable content in 'abc.xlsx'. Do you want to recover the
contents of this workbook? If you trust the source of this workbook, click
Yes."

After clicking Yes, another popup:
"The workbook cannot be opened or repaired by Microsoft Excel because it is
corrupt."

I have attached the relevant class and a JUnit 4 test class.

I am using Vista Business Ed SP2, 64 bit with Office 2007 SP2.

-- 
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


DO NOT REPLY [Bug 50029] XSSFWorkbook created cannot be opened by Excel 2007 SP2

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50029

Abhijit Sarkar <fo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |forumsandflyers@gmail.com

-- 
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


DO NOT REPLY [Bug 50029] XSSFWorkbook created cannot be opened by Excel 2007 SP2

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50029

Yegor Kozlov <ye...@dinom.ru> changed:

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

--- Comment #1 from Yegor Kozlov <ye...@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