monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
943 stars 342 forks source link

The supplied data appears to be in the OLE2 Format #239

Open JayneshAhir opened 3 years ago

JayneshAhir commented 3 years ago

Getting below exception message while reading protected xlsx file. Is there a way to read protected file using StreamingReader.builder().rowCacheSize(6).open(is);

Exception: 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)

pjfanning commented 3 years ago

Try StreamingReader.builder().setPassword(password).open(is)

JayneshAhir commented 3 years ago

@pjfanning is it possible to read files which have protection like this? it's not a password protected but restricted by privacy policy. image