Bug 62439 - Initialisation of record 0x1D(SelectionRecord) left 1 bytes remaining still to be read.
Summary: Initialisation of record 0x1D(SelectionRecord) left 1 bytes remaining still t...
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.17-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 15:28 UTC by Kovi
Modified: 2019-04-15 12:57 UTC (History)
1 user (show)



Attachments
Example Excel file (4.50 KB, application/vnd.ms-excel)
2018-06-08 15:28 UTC, Kovi
Details
BiffViewer output (58.01 KB, text/plain)
2018-06-08 15:32 UTC, Kovi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kovi 2018-06-08 15:28:08 UTC
Created attachment 35959 [details]
Example Excel file

I'm using Java 7 64-bit on Linux (Ubuntu 18.04 64-bit).
Running:
try {
            File f = new File("DOBAVNICA_K8-5204_2018.xls");
            HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(f));
            System.out.println("workbook = " + workbook);
        } catch (Exception e) {
            e.printStackTrace();
        }

produces error:
org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x1D(SelectionRecord) left 1 bytes remaining still to be read.
	at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:178)
	at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:235)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:494)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:356)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:413)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:394)
	at com.kovi.poitest.Test.main(Test.java:15)

I have tried on every POI version from 3.9 till 3.17 and get the same error on every version.
Comment 1 Kovi 2018-06-08 15:32:50 UTC
Created attachment 35960 [details]
BiffViewer output
Comment 2 Kovi 2018-06-08 15:33:11 UTC
Added org.apache.poi.hssf.dev.BiffViewer output