unstructured/example-docs/password_protected.xlsx
Filip Knefel f66562b1cb
fix: properly handle password protected xlsx (#4057)
### Issue
Attempt at partitioning a password protected errors results in an
obscure exception
> Can't find workbook in OLE2 compound document

### Solution
Utilize [msoffcrypto-tool](https://pypi.org/project/msoffcrypto-tool/)
package (MIT License) to load XLSX file and check whether it's
encrypted, if yes throw an `UnprocessableEntityError` exception
detailing the reason for rejecting the file.

---------

Co-authored-by: Filip Knefel <filip@unstructured.io>
2025-07-16 13:19:14 +00:00

8.0 KiB