Unlock Excel Files in Power Automate
PDF4me Unlock Excel is a Power Automate action that removes password protection from a workbook at up to three independent layers, file encryption, workbook structure, and worksheet content. Use it to open, edit, or re-protect Excel files without manually entering passwords in the desktop app.
What this action does
PDF4me Unlock Excel takes File Password, Workbook Password, and Worksheet Password as independent inputs and removes only the protection layers that are actually present on the file. Fill in only the passwords you know, worksheet targeting and culture are both optional advanced parameters.
How Do I Authenticate My Power Automate Flow?
Every PDF4me action in Power Automate requires a valid connection. Create or select one that holds your PDF4me API key so the flow can authenticate Excel unlock requests securely.
Important Facts You Should Not Miss

Map File Content, set File Name, then fill only the File Password, Workbook Password, or Worksheet Password layers the file actually uses.
Parameters
Required: File Content must always be provided. File Name and all three password fields are optional, only the passwords matching the file's actual protection layers are needed. Worksheet Names, Worksheet Indexes, and Culture Name are conditional advanced parameters.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Required | Base64 content of the source Excel workbook, mapped from SharePoint, OneDrive, or another prior action. | [File Content from Get file content] |
| File Name | Optional | Excel filename including extension (.xlsx or .xls), used for processing and output identification. | test.xlsx |
| File Password | Conditional | Removes the encryption password required to open the file. Only needed if the file is open-password protected. | 56789 |
| Workbook Password | Conditional | Removes workbook structure protection that blocks adding, deleting, or renaming sheets. Only needed if the workbook is structure-protected. | 12345 |
| Worksheet Password | Conditional | Removes worksheet-level protection that blocks editing cells or objects on a sheet. Only needed if the worksheet is protected. | 34567 |
| Worksheet Names | Conditional | Advanced parameter. Comma-separated worksheet names to unlock. Leave empty along with Worksheet Indexes to unlock every sheet. | Sheet1,Summary |
| Worksheet Indexes | Conditional | Advanced parameter. Comma-separated 1-based worksheet indexes to unlock (1 = first sheet). Combines with Worksheet Names if both are set. | 1,2,3 |
| Culture Name | Conditional | Advanced parameter. Culture/locale code for processing, for example en-US or de-DE. Blank uses the default culture. | en-US |
Output Fields
| Field | Type | What it contains |
|---|---|---|
document | Base64 | The Excel workbook with the requested protection layers removed. |
Success | Boolean | true if the action completed, false if it failed. |
ErrorMessage | String | Error description naming the failed password layer, null when Success is true. |
Errors | Array | Detailed error objects, empty when Success is true. |
What Do the Common Error Messages Mean?
| Error Message | Cause | Solution |
|---|---|---|
| Request is empty | The request object is null. | Provide a valid request object. |
| Document is empty | File Content is null or empty. | Provide a valid Excel document in File Content. |
| The workbook is password-protected. Please provide File Password to open the file. | The file is encrypted but no File Password was provided. | Provide the correct File Password. |
| Could not open the workbook with File Password: incorrect password | The provided File Password does not match. | Verify and provide the correct File Password. |
| Workbook is protected. Please provide Workbook Password. | The workbook has structure protection but no valid password. | Provide the correct Workbook Password. |
| Worksheet '{name}' is protected. Please provide a valid password. | The named worksheet has content protection but no valid password. | Provide the correct Worksheet Password. |
| Invalid worksheet selection | A worksheet name or index does not exist in the workbook. | Use existing worksheet names or valid 1-based indexes. |
| Available worksheets in workbook (X total) | Informational message shown when worksheet selection fails. | Use worksheet indexes from 1 to X. |
How Do I Set Up Unlock Excel in Power Automate?
- Add PDF4me → Excel - Unlock File to your Power Automate flow.
- Map File Content from a previous action (SharePoint, OneDrive, or Get file content) and set File Name.
- Fill File Password if the file requires a password to open.
- Fill Workbook Password if sheet add/delete/rename is blocked, and Worksheet Password if cell editing is blocked on a specific sheet.
- Expand Advanced parameters to target specific Worksheet Names or Worksheet Indexes (1-based), or leave both empty to unlock every sheet. Run the flow, the unlocked workbook returns as document.
Typical Setups
Workflow ExamplesCommon Power Automate flow patterns using Unlock Excel.
- A scheduled trigger runs at the start of each quarterly template update cycle.
- Get file content retrieves a password-protected Excel template from the library.
- Unlock Excel removes protection using the known File Password and Workbook Password.
- An Update Rows or similar action modifies the unlocked template, then Secure Excel re-applies protection before it is redistributed.
- A scheduled nightly flow retrieves the password-protected master data workbook.
- Unlock Excel removes the File Password protecting the workbook.
- Update Rows and Add Rows refresh the data from a connected database.
- Secure Excel re-applies the same password before the file is saved back to SharePoint.
- A flow triggers when a manager requests edit access to specific worksheets.
- Get file content retrieves a workbook with several independently protected worksheets.
- Unlock Excel targets only the requested sheets via Worksheet Names, using Worksheet Password to remove content protection while other sheets stay locked.
- The partially unlocked file is emailed to the requesting manager.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Excel - Unlock File |
| Required fields | File Content |
| Password layers | File Password, Workbook Password, Worksheet Password (each optional/conditional) |
| Advanced parameters | 3 total: Worksheet Names, Worksheet Indexes (1-based), Culture Name |
| Output | document (Base64 workbook) + Success + ErrorMessage + Errors |
Common Questions
Industry Use Cases & Applications
- Finance & Accounting
- Legal & Professional Services
- Human Resources
- Healthcare & Medical
- Sales & Marketing
- Operations & Manufacturing
- Period Close: Unlock financial reports for final adjustments before close
- Template Updates: Remove protection from accounting templates for updates
- Audit Preparation: Unlock files for auditor access and review
- Data Integration: Unlock protected files for automated data synchronization
- Document Editing: Unlock client documents for authorized modifications
- Template Maintenance: Remove protection from legal templates for updates
- Case File Updates: Unlock case files for additional information
- Archive Processing: Remove passwords before long-term archival
- Template Updates: Unlock HR templates for annual policy updates
- Data Processing: Remove protection for payroll data integration
- Record Modification: Unlock employee records for authorized updates
- Benefits Administration: Unlock enrollment files for benefits team edits
- Record Updates: Unlock patient records for authorized medical staff edits
- Template Maintenance: Remove protection from medical form templates
- Data Integration: Unlock protected files for EMR system synchronization
- Research Access: Unlock research data for authorized analyst access
- Price List Updates: Unlock pricing files for quarterly updates
- Template Editing: Remove protection from proposal templates for modifications
- Data Refresh: Unlock sales reports for CRM data integration
- Campaign Updates: Unlock campaign tracking files for metric updates
- SOP Updates: Unlock standard operating procedures for revisions
- Inventory Management: Remove protection for automated inventory updates
- Quality Documentation: Unlock quality templates for standard updates
- Production Data: Unlock production schedules for planning team edits