Users that need to merge Excel spreadsheets will fail to use the merge application if the spreadsheet is encrypted with Microsoft's corporate IRM feature.
New Behavior
- User provides two spreadsheets
- Inspect the files, and determine if they are encrypted
- If they aren't, continue as normal
- If they are, (somehow) bypass the IRM encryption
- Then complete the same merge operations as before
IRM Bypass Ideas
Excel with COM (Windows only)
On Windows, the pywin32 package seems promising for interfacing with Excel with COM. Opening Excel directly, as long as the user is authenticated with a Microsoft account that is authorized for the IRMd sheet, will bypass the file encryption. Then, the merge operations could be performed with COM, instead of openpyxl.
MIP SDK
Microsoft offers a multi-platform SDK for working with Microsoft Information Protected files: https://learn.microsoft.com/en-us/information-protection/develop/concept-apis-use-cases?source=recommendations#file-sdk
Users that need to merge Excel spreadsheets will fail to use the merge application if the spreadsheet is encrypted with Microsoft's corporate IRM feature.
New Behavior
IRM Bypass Ideas
Excel with COM (Windows only)
On Windows, the
pywin32package seems promising for interfacing with Excel with COM. Opening Excel directly, as long as the user is authenticated with a Microsoft account that is authorized for the IRMd sheet, will bypass the file encryption. Then, the merge operations could be performed with COM, instead of openpyxl.MIP SDK
Microsoft offers a multi-platform SDK for working with Microsoft Information Protected files: https://learn.microsoft.com/en-us/information-protection/develop/concept-apis-use-cases?source=recommendations#file-sdk