Alex Rivera | Logout

BiffException while reading an excel sheet

Asked 2011-03-25T05:16:19.457
11

I have a code to read from an excel sheet which is in old format(97-2003). I made some changes to data and ended up a 2007 format excel sheet. When I used this xlsx sheet instead of xls sheet, I am getting this:

jxl.read.biff.BiffException: Unable to recognize OLE stream
    at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:116)
    at jxl.read.biff.File.<init>(File.java:127)
    at jxl.Workbook.getWorkbook(Workbook.java:268)
    at readexcel.ReadExcel.readContent(ReadExcel.java:50)
    at readexcel.ReadExcel.init(ReadExcel.java:25)
    at readexcel.ReadExcel.main(ReadExcel.java:183)
Edit
Report

1 Answer

3

I just have had the same trouble. Project was Maven based and side effect of following directive was to filter XLS file.

<resources>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
        </resource>
</resources>

Clean workaround solution was to define sub folder "config" and allow filtering on this specific folder, while including but not filtering on other sub-folders.

answered 2013-08-02T08:52:27.183

Your Answer