dhatim / fastexcel

Generate and read big Excel files quickly
Other
677 stars 122 forks source link

Error reading XLS file #287

Closed Tigerhawk007 closed 1 year ago

Tigerhawk007 commented 1 year ago

I have the following code and it works fine for XLSX files.

    try (InputStream is = fileName.getInputStream();
            ReadableWorkbook wb = new ReadableWorkbook(is)) {
        Sheet sheet = wb.getFirstSheet();

But when I try to read an XLS file with the exact same data in it I get the following error.

"java.io.IOException: Error on ZipFile unknown archive"

This error is occuring on the ReadableWorkbook line. Any ideas?

ochedru commented 1 year ago

This is because fastexcel supports only xlsx files (Excel 2007 and above); xls files do not have the same format.