how to solve JXL error : jxl.read.biff.BiffException: Unable to recognize OLE stream

前端 未结 8 597
闹比i
闹比i 2021-01-04 00:57

i am trying to get cell data from my .csv file but it gets error : jxl.read.biff.BiffException: Unable to recognize OLE stream

I don\'t understand how to solve this

相关标签:
8条回答
  • 2021-01-04 01:55

    Save the Excel file type as Excel 97-2003 Worksheet and extension type as xls

    0 讨论(0)
  • 2021-01-04 01:55

    JXL is a simple (and hence limited) API. If it says

    Unable to recognize OLE stream

    it is what it is. It doesn't quite understand your Excel XLS file. Have confidence that the error is legitimate. This API only supports *.xls files; it doesn't support, for example, *.csv or *.xlsx files. Obviously, having the file renamed to *.xls alone is not sufficient. It must be in Excel 97-2003 format too.

    • Copy all the cells from your *.csv or *.xlsx file.
    • Open MS Excel and paste the copied cells.
    • Save the file as MS Excel 97-2003 (*.xls) file.

    This error will surely not appear again.

    On the other hand, if you want to process other formats (xlsx, csv) directly, look for other tools like Apache POI.

    0 讨论(0)
提交回复
热议问题