安全的 Excel 在 Power Automate
安全的 Excel 是一个 Power Automate 采取行动 PDF4me 对应用密码保护 Excel 文件保护分为三个独立级别:文件加密(需要密码才能打开文件)、工作簿结构保护(锁定工作表的添加、删除、重命名和移动操作)以及工作表内容保护(锁定选定工作表中的单元格编辑操作)。您可以利用此功能分发机密财务数据、锁定模板结构同时保持输入单元格可编辑,或者发送只读的周报。
此操作的作用
PDF4me 安全的 Excel 适用范围至 三个独立的保护级别 一个 Excel 一次调用即可提交文件: 保护密码 用于文件加密, 工作簿密码 用于结构保护,以及 工作表密码 加上 保护类型 用于保护选定工作表上的单元格内容。如果级别特定的密码为空,则会回退到保护密码,因此如果您愿意,可以使用一个密码保护所有三层。
我如何验证我的身份 Power Automate 流动?
致电 PDF4me 通过 Power Automate流程需要一个有效的 PDF4me API 关键在于 PDF4me 连接 连接器。身份验证可确保通信安全,并验证您作为授权用户的身份。
您不容错过的重要事实
保护密码 (不是“密码”) 工作簿密码 (不是“保护工作簿密码”) 工作表密码 (不是“工作表保护密码”), 保护类型 (不是“工作表保护类型”)。
三个密码字段(保护密码, 工作簿密码, 工作表密码)位于主面板中; 工作表名称 和 工作表索引 位于高级参数设置中。
参数
操作中需要: 文件内容 和 文件名当其对应的保护开关设置为“是”时,至少需要一个密码,可以是特定级别的密码,也可以是作为备用的保护密码。
| 范围 | 必需的 | 它的作用 | 例子 |
|---|---|---|---|
| File Content | Required | The source Excel file's content, mapped from a previous action such as Get file content (SharePoint, OneDrive). Accepts .xlsx and .xls. | File Content |
| File Name | Required | The Excel file name including its extension. | test.xlsx |
| Protection Password | Optional | Password required to open the file at all (file encryption). Also used as the fallback for Workbook Password and Worksheet Password when they are left empty. | 56789 |
| Protect Workbook | Optional | Yes prevents adding, deleting, renaming, or moving worksheets. No (default) leaves the structure unprotected. | Yes |
| Workbook Password | Conditional | Password to remove workbook structure protection. Required when Protect Workbook is Yes and Protection Password is empty. | 12345 |
| Protect Worksheets | Optional | Yes locks selected worksheets against content edits. No (default) leaves worksheets unprotected. | Yes |
| Worksheet Password | Conditional | Password to remove worksheet content protection. Required when Protect Worksheets is Yes and Protection Password is empty. | 34567 |
| Protection Type | Optional | Contents, Objects, Scenarios, or All (default). Controls what a protected worksheet locks. | All |
| Worksheet Names (Advanced) | Optional | Comma-separated worksheet names to protect. Empty protects all worksheets. | Sheet1,Summary |
| Worksheet Indexes (Advanced) | Optional | 0-based comma-separated worksheet indexes to protect. Empty protects all worksheets. | 0,2 |
保护类型值
内容对象场景全部如何设置安全 Excel 在 Power Automate?
- 添加 安全的 Excel 将你的工作流程增加一个新的步骤。
- 登录 PDF4me 连接 你的 API 钥匙。
- 地图 文件内容 从先前的操作和设置 文件名 和
.xlsx扩大。 - 要加密文件:设置 保护密码。
- 要锁定结构:设置 保护工作簿 到 是的 并提供 工作簿密码 (或者留空以使用保护密码)。
- 要锁定单元格内容:设置 保护工作表 到 是的, 提供 工作表密码并选择 保护类型。
- 在下面 高级参数(可选) 工作表名称 或者 工作表索引 针对特定纸张。
- 运行流程,检查 成功然后路由返回的 文档 到 SharePoint, OneDrive或者电子邮件附件。
输出
| 场地 | 类型 | 描述 |
|---|---|---|
| document | Base64 | Excel file with the requested protection levels applied. |
| Success | Boolean | true if the operation succeeded, false if it failed. |
| ErrorMessage | String | Error description, null when Success is true. |
| Errors | Array | Detailed error entries, empty when Success is true. |
常见错误信息
| 错误 message | 原因 | 解决方案 |
|---|---|---|
Request is empty | Request object is null | Provide a valid request object |
Document is empty | Document object is null | Provide a valid Excel document |
Password is required for workbook protection | Protect Workbook is Yes but both Workbook Password and Protection Password are empty | Provide Workbook Password or Protection Password |
Password is required for worksheet protection | Protect Worksheets is Yes but both Worksheet Password and Protection Password are empty | Provide Worksheet Password or Protection Password |
Invalid worksheet selection | A worksheet name does not exist or an index is out of range | Use valid worksheet names or 0-based indexes |
典型配置
- 财务报告最终定稿时触发 SharePoint。
- 设置保护密码以加密文件。
- 将“保护工作簿”设置为“是”,将“保护工作表”设置为“是”,并将保护类型设置为“全部”。
- 通过不同的渠道通过电子邮件发送文件及其密码。
- 新员工入职时触发。
- 保护密码留空(可自由开启)。
- 启用“保护工作簿”选项,并设置工作簿密码。
- 仅通过工作表名称将“计算”工作表设置为“是”,而将“输入”工作表设置为可编辑。
- 报告生成后,按每周一次的计划触发。
- 将“保护工作表”设置为“是”,保护类型设置为“全部”,将“工作表密码”留空,以回退到“保护密码”。
- 将只读报告分发给团队成员。
实用技巧
交付安全 Excel 文件及其密码通过不同的通道传输,因此拦截其中一个通道并不会同时暴露两者。
工作簿密码或工作表密码留空本身并不会导致错误,系统会回退到使用保护密码。只有当请求完全没有可用密码时才会失败。
第一个工作表的索引为 0。从动态列表编写工作表索引脚本时,请仔细检查差一错误。
对所有级别都使用相同的保护密码虽然方便,但审阅者一旦能够打开文件,就能解除对文件结构和内容的保护。当不同人员需要不同的访问权限时,应使用独立的密码。
使用工作表名称或工作表索引锁定参考表和公式表,同时保持输入表打开,供需要编辑的团队成员使用。
速查表
| 目标 | 保护密码 | 保护工作簿 | 保护工作表 |
|---|---|---|---|
| Maximum lockdown | Set | Yes | Yes (Protection Type All) |
| Template structure only | Empty | Yes | No |
| Read-only content, open access | Empty | No | Yes (Protection Type All) |
| Selective reference-sheet lock | Empty | No | Yes (target via Worksheet Names) |