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 2013/02/20 19:02:34 UTC

[Bug 54591] New: Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

            Bug ID: 54591
           Summary: Excel: unreadable content error when opening POI
                    generated xls in Excel on Windows 7
           Product: POI
           Version: 3.9
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: eric.pias@frevvo.com
    Classification: Unclassified

Created attachment 29972
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29972&action=edit
Use this class to generate files that will not open in Excel under Windows 7

I have attached a very simple example class that produces the most simple xls
file possible that illustrates this problem.  The problem is that when I try to
use Excel on Windows 7 to open the file generated using POI, Excel will not
open it and shows an error (unreadable content error).  The same file can be
opened in Excel 2008 for Mac.

The following MS article explains an issue that may be the issue here:
http://support.microsoft.com/kb/2411912

To replicate, compile the attached java class with poi 3.9.  Run it to produce
the xls.  Then under windows 7, try to open the file in Excel.  You should see
the error.  I also observe the issue back poi 3.0.1.

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

Eric Pias <er...@frevvo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #4 from Eric Pias <er...@frevvo.com> ---
This issue was definitely seen in our testing.  Unfortunately, we are currently
unable to replicate this issue anymore after much trying.  There are a number
of different factors involved that make it difficult.  I hate to see anyone
burning cycles on this, so I will attempt to close/resolve it.

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

Eric Pias <er...@frevvo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |Windows 7

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

--- Comment #1 from Mark B <ma...@tiscali.co.uk> ---
Created attachment 29980
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29980&action=edit
Excel workbook that opens successfully.

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

--- Comment #2 from Mark B <ma...@tiscali.co.uk> ---
Hm, looks like I was able to upload the attachment but my comments were lost.

Anyway, I was unable to re-create the problem. Currently, I am running under
Windows 7, 64 bit Home Premium and the class I wrote was compiled and run
against version 1.6.0_33 of Sun's (Oracle's) Java implementation and version
3.9 of POI. I did not use the exact code you posted - forgot to save the code
to my PC - but wrote my own class to perform the test:

import java.io.*;
import org.apache.poi.hssf.usermodel.*;

/**
 *
 * @author Mark Beardsley
 */
public class OpenError {

    public OpenError(String filename) throws IOException {
        HSSFWorkbook workbook = null;
        HSSFSheet sheet = null;
        FileOutputStream fos = null;

        try {
            workbook = new HSSFWorkbook();
            sheet = workbook.createSheet("In Error.");

            fos = new FileOutputStream(filename);
            workbook.write(fos);
        }
        finally {
            if(fos != null) {
                fos.close();
            }
        }

    }
}

The only difference between the two being that I did not flush the output
stream but I cannot imagine that will make a profound difference. Some time
ago, I do remember problems with building the api with version 1.7 of Java but
know that Yegor planned to address this and am fairly certain that he has.

Could you try to open the attached Excel workbook using your version of Excel
and see what happens please? It may well be that it is the version of Excel you
are using which is important rather than the operating system.

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

Eric Pias <er...@frevvo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric.pias@frevvo.com
                 OS|                            |All

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


[Bug 54591] Excel: unreadable content error when opening POI generated xls in Excel on Windows 7

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Dominik Stadler <do...@gmx.at> ---
needinfo based on previous comment

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