Skip to main content

Unlock Excel in Power Automate

PDF4me Unlock Excel action removes comprehensive password protection from Excel documents in Power Automate with intelligent multi-layer password fallback. This powerful unlocking feature removes three independent protection levels: file encryption (password to open), workbook structure protection (sheet modification lock), and worksheet content protection (cell editing lock), with smart password fallback system that automatically tries different passwords for each layer in logical order, plus selective worksheet targeting and culture-specific localization support, perfect for automated file unlocking, template editing, and controlled access removal workflows across Microsoft 365.

Authenticating Your API Request

To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful Excel unlocking services.

Unlock Excel Power Automate

Key Features

  • Three-Layer Unlocking: Remove file encryption, workbook protection, and worksheet protection
  • Intelligent Password Fallback: Automatically tries passwords in logical order for each layer
  • Selective Worksheet Unlocking: Unlock specific worksheets or all worksheets
  • Multiple Password Support: Use different passwords for different protection layers
  • Culture Support: Specify culture codes for region-specific processing
  • All-or-Nothing Operation: Ensures complete unlocking or fails with clear error

Parameters

Complete list of parameters for the Unlock Excel action. Configure these parameters to remove password protection.

Important: Parameters marked with an asterisk (***) are required. Worksheet indexes use 1-based numbering (1 = first worksheet).

ParameterTypeDescriptionExample
File Content***Base64Source Excel File Content
• Map Excel file from previous action output
• Supports Excel files from SharePoint, OneDrive, email attachments
• Can be dynamically retrieved from flow variables
• Must be valid Excel document (.xlsx, .xls formats)
[File Content from Get File]
File Name***StringExcel Document Name
• Specify Excel file name with extension (.xlsx, .xls)
• Used for processing and output file naming
• Must include proper file extension
• Supports dynamic naming from flow variables
data.xlsx
Secure On Open PasswordStringFile Encryption Password (Layer 1)
• Password to open encrypted file - removes file encryption
Password Attempt Order: 1) Try opening without password, 2) Try with SecureOnOpenPassword
• Required if file has open password
Used as fallback for workbook and worksheet protection
After Removal: File opens directly without password prompt
• Case-sensitive
FilePass123
Workbook Protection PasswordStringWorkbook Structure Password (Layer 2)
• Password for workbook structure protection - removes protection preventing sheet add/delete/rename
Password Attempt Order: 1) Try without password, 2) Try with WorkbookProtectionPassword, 3) Try with SecureOnOpenPassword (fallback)
• Optional if workbook not protected
After Removal: Can freely add, delete, rename, move sheets
• Case-sensitive
StructurePass
Worksheet Protection PasswordStringWorksheet Content Password (Layer 3)
• Password for worksheet protection - removes protection preventing cell/object editing
Password Attempt Order: 1) Try without password, 2) Try with WorksheetProtectionPassword, 3) Try with WorkbookProtectionPassword (fallback), 4) Try with SecureOnOpenPassword (fallback)
• Optional if worksheets not protected
After Removal: Can edit cells, formulas, objects freely
Note: Fallback system allows using single password (SecureOnOpenPassword) for all layers
• Case-sensitive
EditPass
Worksheet NamesStringComma-Separated Worksheet Names
• List of worksheet names to unlock
• Empty = unlock all worksheets
• Case-sensitive worksheet names
• Union with WorksheetIndexes
Sheet1,Summary
Worksheet IndexesStringComma-Separated Indexes (1-based)
• List of worksheet indexes to unlock
• 1-based indexing (1 = first sheet)
• Empty = unlock all worksheets
• Union with WorksheetNames
1,2,3
Culture NameStringCulture Code for Localization
• Culture/locale code for processing
• Examples: "en-US", "de-DE", "fr-FR"
• Empty string uses default culture
• Default: "" (empty)
en-US

Output

The PDF4me Unlock Excel action returns comprehensive output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

ParameterTypeDescription
documentBase64Unlocked Excel document (all protection removed)
SuccessBooleantrue if operation successful, false if failed
Error MessageStringError description (null if successful)
ErrorsArrayList of detailed error information (empty array if successful)

Common Error Messages

Understanding and troubleshooting errors helps ensure smooth Excel unlocking workflows:

Error MessageCauseSolution
"Request is empty"Request object is nullProvide valid request object
"Document is empty"Document object is nullProvide valid Excel document
"The workbook is password-protected. Please provide SecureOnOpenPassword to open the file."File encrypted but no password providedProvide correct SecureOnOpenPassword
"Could not open the workbook with SecureOnOpenPassword: {message}"SecureOnOpenPassword is incorrectVerify and provide correct file password
"Workbook is protected. Please provide WorkbookProtectionPassword or SecureOnOpenPassword."Workbook protected but no valid passwordProvide correct workbook or fallback password
"Could not unprotect workbook with any provided password: {message}"All password attempts failed for workbookVerify workbook protection password is correct
"Worksheet '{name}' is protected. Please provide a valid password."Worksheet protected but no valid password worksProvide correct worksheet protection password
"Could not unprotect worksheet '{name}' with any provided password: {message}"All password attempts failed for worksheetVerify worksheet protection password
"Invalid worksheet selection"Worksheet name doesn't exist or index out of rangeUse valid worksheet names or indexes (1-based)
"Available worksheets in workbook (X total)"Informational message when worksheet validation failsUse worksheet indexes from 1 to X
"Invalid culture name: {message}"CultureName is invalid formatUse valid culture codes (e.g., "en-US", "de-DE")

Workflow Examples

The PDF4me Unlock Excel action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Protected Template Update Workflow

Transform your template management with automated unlocking and updating:

Complete Workflow Steps:

  1. Trigger: Quarterly template update cycle begins
  2. Get Protected Template: Retrieve password-protected Excel template from library
  3. Unlock File: Set SecureOnOpenPassword = "TemplateAdmin2024"
  4. Unlock Workbook: WorkbookProtectionPassword uses same password (fallback)
  5. Unlock All Sheets: Leave WorksheetNames and WorksheetIndexes empty
  6. Update Content: Use "Update Rows" or other actions to modify template
  7. Update Formulas: Make necessary formula corrections
  8. Re-Protect: Use "Secure Excel" action with new password
  9. Distribute Updated: Send updated template to department managers
  10. Archive Version: Store new template version with changelog

Business Benefits:

  • Updates 20+ protected templates quarterly automatically
  • Maintains template security through unlock-modify-relock cycle
  • Ensures consistent template updates across organization
  • Reduces manual template maintenance time by 80%

Industry Use Cases & Applications

Finance & Accounting Use Cases

  • 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

Get Help