Skip to main content
January 28, 2026
Question

Error in reading excel

  • January 28, 2026
  • 7 replies
  • 0 views

Hi Team,

  1. Currently we are reading excel but due to confidential file it is throwing below error.

Expression evaluation error at function 'readexcelsheetpaging': org.apache.pol.openxml4j.exceptions.OLE2NotOfficexmlFileException. The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents. You need to call a different part of POI to process this data (eg HSSF Instead of XSSF)

Can anyone help on this to which function help to check format in excel 

Thanks 

Divya 

7 replies

mikes0011
Brainy
January 29, 2026

You'll first need to make sure the data you're trying to read is standard Excel data in standard Excel format (being .xlsx with standard contents).  Make sure it isn't really CSV data or old proprietary Excel (.xls) data.

shubhama926776
January 30, 2026

Looks like file is older .xls format but function expects .xlsx

susmethaasirir1117
April 9, 2026

[mention:9861aef97eb2483a8b76175d9eda1e37:e9ed411860ed4f2ba0265705b8793d05] It is the excel sheet with XLSX format,when I pass stopReadingAtFirstBlankRow:false() its giving the error 

shubhama926776
April 9, 2026

Pass stopReadingAtFirstBlankRow as 0 instead of false.