Error in reading excel

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 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to susmethaasirir

    The extension might be .xlsx but the internals of the file might not be.

    There's a quick and easy way to test this - if they .xlsx file opens in a Zip File Viewer (7zip, etc) and you see a valid file tree, or (alternatively) if you can rename the file (or a duplicate copy of the file) to have ".zip" as the final extension, let's say "myTestFile.xlsx.zip", it should open and be browsable in a zip file viewer context.  If it's not openable in this manner, it's NOT a proper "OOXML" format file.

Children
No Data