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 49314] New: Crash when opening Microsoft EXCEL workbook in Windows7
Date Thu, 20 May 2010 08:40:19 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49314

           Summary: Crash when opening Microsoft EXCEL workbook in
                    Windows7
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: chris@visokio.com


Created an attachment (id=25460)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25460)
Excel file that causes the crash

Hi,

Opened the attached workbook using the following code:

    public static Workbook openWorkbook(Resource res)
        throws IOException, InvalidFormatException
    {
        InputStream in = null;
        try {
            in = res.openInputStream(task);
            return WorkbookFactory.create(in);
        } finally {
            if (in != null) try {in.close();} catch (IOException e) {}
        }
    }

The line: WorkbookFactory.create(in); produced the following exception:

org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException:
Initialisation of record 0xFF left 2 bytes remaining still to be read.
    at
org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:155)
    at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:216)
    at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:392)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:276)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:201)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:317)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
    at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)

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