Skip to main content

Unlock Excel - Excel API

PDF4me Unlock Excel enables you to remove password protection from Excel documents. This API service accepts a protected Excel file and the correct password(s) and returns an unprotected version. The API receives Excel document content through REST API calls, utilizing Base64 encoding for secure transmission. This solution is ideal for automated processing of protected files, batch unlocking, and workflow integration.

Authenticating Your API Request

Include your API key in the request to authenticate with the PDF4me REST API.

Key Features

  • Password Removal: Remove file encryption, workbook structure, and worksheet protection
  • Single Password Support: Provide the password used to protect the file

REST API Endpoint

  • Method: POST
  • Endpoint: office/ApiV2Excel/ExcelUnlock

REST API Parameters

Important: Parameters marked with an asterisk (*) are required. All requests use document, docContent, and unlockExcelAction. Operation-specific parameters (password, cultureName) are properties of the action object.

Required Parameters (root level)

ParameterTypeDescriptionExample
document*ObjectDocument reference with Name (Excel file name){ "Name": "data.xlsx" }
docContent*String (Base64)Password-protected Excel document content encoded in Base64UEsDBBQABgAIAAAA...
unlockExcelAction*ObjectAction configuration. Must contain password (string) — password used to protect the fileSee Payload example below

Optional Parameters (inside unlockExcelAction)

ParameterTypeDescriptionExample
cultureNameStringCulture code for processingen-US

Output

The API returns the unlocked Excel document as a Base64-encoded string in JSON format (document, fileName, success, errorMessage).

Request Example

Content-Type: application/json
Authorization: Basic YOUR_BASE64_ENCODED_API_KEY

Payload (Basic)

{
"document": { "Name": "data.xlsx" },
"docContent": "UEsDBBQABgAIAAAA...",
"unlockExcelAction": {
"password": "MyPassword123"
}
}

Code Samples

Get Help