Unlock Excel file and remove protection using n8n action
PDF4me Unlock Excel removes comprehensive password protection from Excel documents through n8n automation workflows with intelligent multi-layer password fallback. Process Excel files via n8n triggers, binary data, base64 strings, or public URLs to remove 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. This solution is ideal for automated file unlocking, template editing, controlled access removal, and data processing workflows that require password removal with intelligent fallback and seamless integration.
Setup
Add the PDF4me "Unlock Excel" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Unlock Excel file and remove protection" action
- Configure input parameters (see below)

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).
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Excel Input Format Selection • Choose the format of your Excel data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field*** | Binary | Binary Excel File Input (Required if Binary Data) • Reference Excel file (.xlsx, .xls) from previous n8n node or file upload • PDF4me processes binary Excel files with automatic format detection • Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Excel Content*** | String | Base64 Encoded Excel Input (Required if Base64 String) • Provide Excel content (.xlsx, .xls) as base64 encoded string • PDF4me automatically decodes and processes the Excel content • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| Excel URL*** | String | Public Excel URL Input (Required if URL) • Provide a public/open permission URL to the Excel file (.xlsx, .xls) • PDF4me downloads and processes the Excel file from the provided URL • Required when Input Data Type is "URL" | https://abc.com/data.xlsx |
| Excel Name*** | String | Excel Input Filename • Specify the name of the input Excel file with proper extension (.xlsx, .xls) • PDF4me uses this for format detection and processing optimization | data.xlsx |
| Secure On Open Password | String | File 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 Password | String | Workbook 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 Password | String | Worksheet 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 Names | String | Comma-Separated Worksheet Names • List of worksheet names to unlock • Empty = unlock all worksheets • Case-sensitive worksheet names • Union with WorksheetIndexes | Sheet1,Summary |
| Worksheet Indexes | String | Comma-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 Name | String | Culture Code for Localization • Culture/locale code for processing • Examples: "en-US", "de-DE", "fr-FR" • Empty string uses default culture • Default: "" (empty) | en-US |
| Binary Data Output Name*** | String | Binary Data Output Mapping • Define the variable name for accessing generated Excel binary data • Used in subsequent workflow actions • Essential for workflow automation | document |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| document | Binary | PDF4me Excel binary data - The unlocked Excel document (all protection removed), accessible via $binary.document in subsequent n8n nodes | Binary data object |
| Success | Boolean | PDF4me unlocking status indicator - Boolean flag indicating the success or failure of the password removal process. PDF4me returns true for successful operations and false for any errors | true |
| ErrorMessage | String | PDF4me unlocking status message - Descriptive message indicating the result of the password removal process. PDF4me provides clear status messages for successful operations and detailed error information | null |
| Errors | Array | PDF4me detailed error information - List of detailed error information (empty array if successful). PDF4me provides comprehensive error details for troubleshooting | [] |
N8N Action Response
The PDF4me Unlock Excel file and remove protection API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"fileName": "excel_unlocked.xlsx",
"fileSize": 14234,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"message": "Excel document unlocked successfully"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | excel_unlocked.xlsx |
| fileSize | 14234 |
| success | true |
| originalFileName | myExcelFile.xlsx |
| message | Excel document unlocked successfully |
Schema View
The data structure and types of the response:
1 item
fileName: T excel_unlocked.xlsx
fileSize: # 14234
success: ☑ true
originalFileName: T myExcelFile.xlsx
message: T Excel document unlocked successfully
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array
Binary Data View
The actual Excel document file data and metadata:
data
─────────────────────────────
File Name: excel_unlocked.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 14.2 kB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Template Editing and Updates
- Unlock protected templates for modifications and updates
- Remove protection before adding/updating data in automated workflows
- Enable template editing for authorized users in automated processes
Data Processing and Integration
- Unlock protected files before automated data synchronization
- Remove protection for bulk processing operations
- Enable data integration workflows with protected Excel files
Archive Preparation and Migration
- Remove passwords before long-term archival
- Unlock files for migration to new systems
- Prepare documents for storage without password dependencies