解锁 Excel 文件和移除保护 n8n
解锁文件 是一个 PDF4me Excel 操作 n8n 它能从三个独立层面解除 .xlsx 工作簿的密码保护:文件加密、工作簿结构和工作表保护。您可以使用它打开受保护的模板、准备用于自动数据写入的文件,或在归档前清除密码,而无需打开文件。 Excel。
此节点的功能
PDF4me Excel解锁文件 移除 Excel 一次操作即可完成保护。它会清除打开密码(文件加密)、工作簿结构锁(防止添加、删除或重命名工作表),还可以选择性地清除工作表保护(防止编辑单元格和公式)。您提供的密码会在各个层级重复使用作为备用密码,因此,使用单个密码保护的工作簿通常只需填写一个字段即可。
相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客 →
验证您的身份 API 要求
每一个 PDF4me 节点 n8n 需要有效 用于连接的凭证创建或选择一个包含您的 PDF4me API 关键在于确保工作流程能够安全地验证解锁请求。
您不容错过的重要事实
三级防护,一次操作
文件加密、工作簿结构和工作表保护是各自独立的安全机制。 Excel一个工作簿可以包含任意组合,此操作一次运行即可处理所有三种组合。
密码回退层
首先,系统会尝试不使用密码对每一层进行加密。如果提供了密码,则该密码也会用于其他层,因此,文件加密密码中的一个密码往往会清除整个加密方式相同的加密工作簿。
工作表解锁是可选的。
“解锁工作表”开关默认处于关闭状态。保持关闭状态仅清除打开密码和结构锁定;当需要同时解锁单元格和公式时,请打开此开关。

PDF4me Excel 在“解锁文件参数面板”中 n8n
哪个 Excel 每个字段移除哪些保护措施?
Excel 它提供三级保护,这三级保护很容易混淆。下表列出了每级保护的具体内容以及清除该保护的字段。
| 保护级别 | 它阻挡了什么 | 清除它的字段 |
|---|---|---|
| File encryption | The workbook cannot be opened at all without a password. Excel prompts before any content is visible. | File Encryption Password |
| Workbook structure | Sheets cannot be added, deleted, renamed, moved, hidden, or unhidden, though existing cells stay editable. | Workbook Protection Password |
| Worksheet protection | Cells, formulas, and objects on a sheet cannot be edited, though the file opens and the structure is intact. | Unlock Worksheets toggle |
解锁文件需要哪些参数?
必需的: 手术, Excel 文件输入方法、与该方法匹配的输入字段以及输出文件名。密码字段是条件性的,仅当工作簿中存在特定保护级别时才需要。解锁工作表、区域性名称、源文档名称和输出二进制数据名称是可选的。
| 范围 | 必需的 | 它的作用 | 例子 |
|---|---|---|---|
| Operation | Required | Selects the PDF4me Excel action to run. Choose Unlock File. | Unlock File |
| Excel File Input Method | Required | How the workbook reaches the node. From Previous Node (Binary Data) reads it from an upstream item; the dropdown also offers base64 and file URL alternatives. | From Previous Node (Binary Data) |
| Binary Data Property Name | Conditional | Name of the binary property on the incoming n8n item holding the .xlsx workbook. Applies when the input method is binary data. Defaults to data. | data |
| File Encryption Password | Conditional | The password required to open the workbook. Supply it when the file is encrypted; it is also reused as a fallback against the other protection levels. | FilePass123 |
| Workbook Protection Password | Conditional | The password guarding workbook structure, which prevents sheets being added, deleted, renamed, or moved. Supply it when structure protection is set. | StructurePass |
| Unlock Worksheets | Optional | Toggle that extends the run to worksheet-level protection so cells, formulas, and objects become editable. Off by default. | true |
| Culture Name | Optional | Locale used while processing the workbook, relevant for locale-sensitive number and date formatting. | en-US |
| Output File Name | Required | Filename for the unlocked workbook the node returns. Include the .xlsx extension. | excel_unlocked.xlsx |
| Source Document Name | Optional | Reference label for the incoming workbook. Echoed back as originalFileName for tracking; it does not change the output. | myExcelFile.xlsx |
| Output Binary Data Name | Optional | Name of the binary property the output item exposes. Defaults to data. | data |
输出字段
一次成功的运行返回一个 n8n 携带物品 JSON 元数据以及已解锁的工作簿(以二进制数据形式)。
| 场地 | 类型 | 它包含什么 |
|---|---|---|
success | Boolean | True when protection was removed successfully. Use it to route error-handling branches. |
fileName | String | Filename of the unlocked workbook, matching Output File Name. |
fileSize | Number | Size of the returned workbook in bytes. |
originalFileName | String | The value supplied in Source Document Name, echoed back for tracking. |
message | String | Human-readable result message for the unlock operation. |
Binary (data) | Binary | The unlocked .xlsx under Output Binary Data Name (default data). Pass into Write Binary File, Email, or a cloud-storage upload. |
N8N 行动反应
- JSON
- Schema
- Binary
JSON 回复格式
[
{
"fileName": "excel_unlocked.xlsx",
"fileSize": 14234,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"message": "Excel document unlocked successfully"
}
]
架构视图
1 item
fileName: T excel_unlocked.xlsx
fileSize: # 14234
success: true
originalFileName: T myExcelFile.xlsx
message: T Excel document unlocked successfully
类型指示器: T = String, # = Number。
二进制数据视图
data
File Name: excel_unlocked.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 14.2 kB
二进制数据访问: 找到工作簿 $binary.data.data可供下载、通过电子邮件发送或存储。
如何在[此处应填写具体内容,例如“如何设置解锁文件”]中设置解锁文件 n8n?
- 添加 PDF4me Excel 将节点添加到您的工作流程并设置 手术 到 解锁文件。
- 在 用于连接的凭证请选择您的 PDF4me API 或使用您的凭证创建一个凭证 API 钥匙。
- 放 Excel 文件输入法 到 来自上一个节点(二进制数据) 并设置 二进制数据属性名称 通常情况下,归还给存放工作簿的财产。
data。 - 进入 文件加密密码 如果工作簿需要密码才能打开。
- 进入 工作簿保护密码 如果图纸结构被锁定。
- 打开 解锁工作表 如果单元格和公式也需要变为可编辑状态。
- (可选) 文化名称 适用于对区域设置敏感的工作簿。
- 放 输出文件名 以……结尾
.xlsx执行该节点,并将已解锁的工作簿路由下去。
典型配置
工作流程示例Common n8n workflow patterns using Unlock File for Excel.
写入数据前,请先解锁受保护的模板。
- 工作流从……中提取已锁定的报告模板 SharePoint。
- 解锁文件会清除结构锁定,以便添加新的工作表。
- PDF4me Excel “添加行”操作会将期间数据写入工作簿。
归档前请清除密码
- 计划触发器会收集需要长期存储的工作簿。
- 解锁文件会移除打开密码,以便稍后可以读取存档文件。
- 已清除的文件将写入归档存储桶。
Make 供应商工作簿(机器可读)
- 邮件触发器会从供应商处接收受保护的价格清单。
- “解锁文件”功能与“解锁工作表”功能同时运行,以便解析单元格值。
- 提取数据行并同步到内部数据库。
解锁、编辑,然后重新锁定
- 解锁文件会移除已批准工作簿的保护。
- 下游节点更新数据并刷新汇总表。
- PDF4me Excel 安全的 Excel 重新分发前重新应用密码。
实用技巧
Try it with no password first
Structure and worksheet protection are often set without any password. Run the node with the password fields empty before assuming you need one.
One password usually covers all layers
Because supplied passwords are reused as fallbacks, filling in File Encryption Password alone often clears a workbook secured the same way throughout.
Passwords are case-sensitive
A mismatch in capitalisation fails the layer silently rather than erroring loudly, so check case before debugging further.
Leave Unlock Worksheets off unless needed
Removing cell-level protection can expose formulas that were deliberately locked. Enable it only when downstream nodes must edit cells.
Re-secure after editing
Unlocking is usually a middle step. Chain Secure Excel at the end so the redistributed workbook is protected again.
Output File Name needs the .xlsx extension
Omitting it can leave downstream nodes unable to detect the format when writing or emailing the file.
速查表
| 场地 | 价值 |
|---|---|
| Operation | Unlock File |
| Excel File Input Method | From Previous Node (Binary Data) |
| Binary Data Property Name | data |
| File Encryption Password | (only if the file needs a password to open) |
| Workbook Protection Password | (only if the sheet structure is locked) |
| Unlock Worksheets | off (on to make cells editable) |
| Culture Name | en-US |
| Output File Name | excel_unlocked.xlsx |
| Source Document Name | myExcelFile.xlsx |
| Output Binary Data Name | data |
| Credentials | PDF4me API credential |
常见问题
相关操作
安全的 Excel
反向操作,即在工作流完成对工作簿的编辑后重新应用密码保护。
解锁 PDF
同样的密码删除思路 PDF 文件,适用于处理这两种格式的工作流。
添加文字水印 Excel
在共享之前,将未锁定的工作簿标记为草稿或机密。
在其他平台上执行相同任务
解锁 Excel 在 Make
与以下情况相同的解锁引擎 Make 模块,连接到 Make 场景。
解锁 Excel 在 Zapier
扳机 Excel 从数千个 SaaS 应用和 Webhook 中删除密码。
解锁 Excel 在 Power Automate
Microsoft 365 与……流动 SharePoint, Outlook以及团队连接。