Skip to main content

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:

  1. Add PDF4me node to workflow
  2. Select "Unlock Excel file and remove protection" action
  3. Configure input parameters (see below)
Unlock Excel

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
Input Data Type***StringExcel 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***BinaryBinary 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***StringBase64 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***StringPublic 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***StringExcel 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 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
Binary Data Output Name***StringBinary 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

ParameterTypeDescriptionExample
documentBinaryPDF4me Excel binary data - The unlocked Excel document (all protection removed), accessible via $binary.document in subsequent n8n nodesBinary data object
SuccessBooleanPDF4me 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 errorstrue
ErrorMessageStringPDF4me unlocking status message - Descriptive message indicating the result of the password removal process. PDF4me provides clear status messages for successful operations and detailed error informationnull
ErrorsArrayPDF4me 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 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"
}
]

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

Get Help