poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.
Date Thu, 09 Mar 2017 01:07:11 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60833

yoker.wu@gmail.com changed:

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

--- Comment #3 from yoker.wu@gmail.com ---
@Javen O'Neal 

this file can open without any errors in Microsoft Excel or WPS application.

i tested on poi-3.15.jar.

this is my code.

public static void main(String[] args) throws Exception{

        String fileName = "F:\\Desktop\\buzhengc.xls";

        InputStream inputStream = new FileInputStream(fileName);

        POIFSFileSystem fs = new POIFSFileSystem(inputStream);

        DirectoryEntry root = fs.getRoot();
        System.out.println(root.getEntryNames());

        HSSFWorkbook hssfworkbook = new HSSFWorkbook(fs);
        System.out.println(hssfworkbook.getNameName(0));

}


i got this errors:

[Workbook]
Exception in thread "main"
org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException:
Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be
read.
        at
org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:174)
        at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:253)
        at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:494)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:341)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:304)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:251)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:221)
        at com.test.pppp.main(test.java:26)

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