跳到主要内容

添加文字水印 ExcelPower Automate

PDF4me 添加文字水印 Excel 是一个 Power Automate 执行此操作,在文件上盖上“机密”、“草稿”或任何自定义文本标签。 Excel 将工作表作为 WordArt 对象使用。可用于标记敏感财务数据、标记预算草稿或向导出的报告添加版权声明,并可完全控制大小、颜色、旋转和位置。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

此操作的作用

PDF4me - 添加文字水印 Excel 直接在纸张上盖印可自定义的文本标签——例如“机密”、“草稿”、“已批准”、版权声明或任何其他文字。 Excel 将工作表作为 WordArt 对象进行编辑。您可以控制文本、预设大小(50 磅、150 磅)、颜色、字体、粗体/斜体样式、透明度、旋转角度以及九种网格位置之一。可应用于所有工作表,或按名称或索引指定特定工作表。此操作可在任何工作表内运行。 Power Automate 云流并返回水印 Excel 二进制文件已准备好保存 SharePointOneDriveDropbox 或电子邮件。

我如何验证我的身份 Power Automate 流动?

每一个 PDF4me 行动 Power Automate 需要一个 联系 容纳你的 API 键。首次添加操作时,创建或选择一个键。

您不容错过的重要事实

艺术字——不是页眉/页脚

水印以艺术字形状的形式嵌入到工作表绘图图层中。与此不同的是,它在工作表视图和打印输出中均可见。 Excel仅在打印时显示的原生页眉/页脚文本。

工作表级目标

将工作表选择器留空,即可为整个工作簿添加水印。指定工作表名称或从 0 开始的索引,即可仅针对特定工作表添加水印——这在工作簿中混合了公开汇总表和受限数据表时非常有用。

针对每张纸的变化,可串联多个操作

一次操作应用一种水印样式。要在不同纸张上添加不同的文本水印,请连续执行两次或多次“添加文本水印”操作。 Excel 按顺序执行操作,每个操作针对不同的工作表,然后保存最终文件。

Power Automate 向 Excel 添加文本水印操作,显示 SharePoint 中的文件内容:获取文件内容,水印文本为“CONFIDENTIAL”,文本大小为 3,文本颜色为 #FF0000,位置为 4

地图 文件内容 从您的存储步骤中,输入 水印文字并选择尺寸、颜色和位置。

参数

必需的: 文件内容文件名, 和 水印文字所有其他参数都有合理的默认值。工作表索引使用 基于 0 的 编号(索引 0 = 第一页)。

范围必需的它的作用例子
File ContentRequiredBinary content of the Excel file. Map from a Get file content action in SharePoint, OneDrive, Dropbox, or any storage connector. Must be a valid .xlsx or .xls workbook.SharePoint → File Content
File NameRequiredFilename including extension (.xlsx or .xls). Used to identify the document being processed. Supports dynamic values from prior flow steps.report.xlsx
Watermark TextRequiredText to display on each worksheet as a WordArt object. Any alphanumeric string or symbol. Examples: CONFIDENTIAL, DRAFT, © 2025 Acme Corp.CONFIDENTIAL
Text SizeOptionalSize preset: 1 = 50 pt (Small), 2 = 75 pt (Medium), 3 = 100 pt (Large, default), 4 = 150 pt (Extra Large). Values outside 1-4 fall back to 100 pt.3
Text ColorOptionalHex code (#FF0000) or named color (Red, Blue, Gray, Black). Defaults to Black. Invalid values fall back to black.#CC0000
Font FamilyOptionalFont name for the watermark WordArt. Common choices: Arial, Calibri, Times New Roman. Defaults to Arial. Unknown fonts may use the system default.Arial
Is BoldOptionalSet to true to apply bold weight to the watermark text. Improves readability over busy worksheets. Defaults to false.true
Is ItalicOptionalSet to true to apply italic style. Useful for softer "Draft" labels. Defaults to false.false
TransparencyOptionalOpacity from 0 (fully solid) to 100 (invisible). Set 40-60 for subtle watermarks that do not obscure cell data. Defaults to 0.50
Rotation AngleOptionalAngle in degrees. Positive = clockwise, negative = counter-clockwise. Range: -360 to 360. Use: 45 for the classic diagonal watermark.-45
PositionOptional0-8 grid code. Top row: 0 = Top-Left, 1 = Top-Center, 2 = Top-Right. Middle: 3 = Mid-Left, 4 = Center (default), 5 = Mid-Right. Bottom: 6, 7, 8.4
Selected Worksheet NamesConditionalArray of case-sensitive sheet names to watermark. Leave empty to apply to all sheets. Combined with Selected Worksheet Indexes.["Sheet1","Summary"]
Selected Worksheet IndexesConditional0-based array of sheet positions to watermark. Index 0 = first sheet. Leave empty to apply to all sheets.[0, 2]

输出字段

场地类型它包含什么
documentBase64The Excel workbook with the text watermark applied to each targeted worksheet.
SuccessBooleantrue if the action completed, false if it failed.
ErrorMessageStringError description, null when Success is true.
ErrorsArrayDetailed error objects, empty when Success is true.

如何在设置中添加文字水印 Power Automate

  1. 在你的流程中,点击 + 新步骤 → 搜索 PDF4me → 选择 添加文字水印 Excel
  2. 连接 使用您的 PDF4me API 密钥(或选择现有连接)。
  3. 地图 文件内容 从您的存储步骤(SharePoint 获取文件内容OneDrive 获取文件内容(或 Dropbox 的同类产品)。
  4. 文件名.xlsx 文件名(动态或静态)。
  5. 进入 水印文字 例如 CONFIDENTIALDRAFT, 或者 © 2025 Acme Corp
  6. 调整 文本大小文本颜色透明度旋转角度, 和 位置 与您的品牌形象相符。
  7. (可选)填充 选定的工作表名称 或者 选定工作表索引 仅针对特定表格。
  8. 添加一个 创建文件 或者 更新文件 此步骤之后的操作和映射 文档 将输出内容保存为文件内容。

工作流程示例

流程示例Common Power Automate scenarios that use Add Text Watermark to Excel for security marking, draft management, and compliance.
在分发财务报告前,请将其标记为“机密”。
  1. 计划流程会在月末运行,届时会有新的报告提交到系统中。 SharePoint 图书馆。
  2. 获取文件内容 检索 Excel 工作簿。
  3. 添加文字水印 Excel 印章“机密” - 字号 4,颜色 #CC0000,旋转 -45,透明度 40,所有纸张。
  4. 创建文件 将带有水印的副本保存到受限位置。 SharePoint 文件夹。
  5. A Outlook 步骤仅通过电子邮件向授权收件人发送下载链接。
审批流程 - 从草稿到已批准水印
  1. 预算电子表格通过 Power Apps 表单提交审核。
  2. 该流程会添加一个灰色斜体“DRAFT”水印(透明度 60,旋转 -45),并向审阅者发送电子邮件。
  3. 获得批准后,第二个流程分支运行 添加文字水印 Excel 再次以绿色显示“已批准”(颜色 #008000,透明度 40)。
  4. 已批准的文件会覆盖草稿。 SharePoint 并触发 Teams 通知。
外部数据导出上的版权水印
  1. 自动化流程将每月分析数据从数据库导出到 Excel
  2. 添加文字水印 Excel 在“数据”和“图表”工作表的右下角(位置 8)以小字(1 号字体)印上“© 2025 Acme Corp - 仅供内部使用”字样。
  3. 选定的工作表名称 设置为 ["数据","图表"],以便封面保持干净。
  4. 带有水印的工作簿上传至客户端 SharePoint 通过门户网站发送链接。 Outlook

实用技巧

WordArt renders on-screen, not just on print
Unlike Excel's native header/footer text, this watermark is a WordArt shape in the drawing layer, so it is visible immediately in the sheet view, not only in the print preview.
Keep Transparency in the 40-60 range
A Transparency of 0 renders a fully solid watermark that can obscure dense cell data. 40-60 keeps the label readable without hiding numbers underneath.
One action, one style
A single call applies one Watermark Text, color, and rotation to its target sheets. Chain multiple actions in sequence to vary the label per worksheet.
Worksheet Names and Indexes combine, not replace
If you set both Selected Worksheet Names and Selected Worksheet Indexes, the action watermarks the union of both lists.
Branch on Success before continuing
Add a Condition on Success after this action so a failed run does not pass a partially watermarked workbook further down the flow.

速查表

场地价值
ActionExcel - Add Text Watermark
Required fieldsFile Content, File Name, Watermark Text
Style fieldsText Size (1-4), Text Color, Font Family, Is Bold, Is Italic, Transparency, Rotation Angle, Position (0-8 grid)
Targeting fieldsSelected Worksheet Names, Selected Worksheet Indexes (0-based, combine not replace)
Outputdocument (Base64 workbook) + Success + ErrorMessage + Errors

常见问题解答

Does the text watermark appear when the Excel file is printed?+
Yes. The watermark is embedded as a WordArt shape in the worksheet drawing layer, so it appears both on-screen and in printed output. Setting Transparency to 40-60 keeps the watermark visible without obscuring the underlying cell data in print. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/add-a-watermark-in-excel-a372182a-d733-484e-825c-18ddf3edf009" target="_blank" rel="noopener noreferrer">adding a watermark in Excel</a> for how the native WordArt approach compares.
Can I apply different watermarks to different worksheets in one action?+
A single action applies one watermark configuration. To stamp different text or styles per sheet - for example, "CONFIDENTIAL" on the data tab and "DRAFT" on the summary tab - chain two Add Text Watermark to Excel actions in sequence. Each action receives the output of the previous one as its File Content and targets different worksheet names or indexes.
Which Excel file formats does this action support?+
The action accepts .xlsx and .xls Excel workbooks. Macro-enabled .xlsm files are not supported. The output file is always returned as an .xlsx workbook regardless of the input format, so existing macros in .xlsm files should not be processed through this action.
What happens if I enter an invalid color code?+
If Text Color is not a recognized hex code (e.g. #FF0000) or a standard color name (Red, Blue, Black, Gray), the action falls back to black. Always run a test flow execution first and open the output file to confirm the watermark color renders correctly before scheduling the flow for production use.
Can I watermark only specific worksheets by name?+
Yes. Populate Selected Worksheet Names with an array of exact, case-sensitive tab names such as ["Sheet1","Summary"]. Alternatively, use Selected Worksheet Indexes with 0-based positions like [0, 2]. Leave both fields empty to watermark every sheet in the workbook. See <a href="https://www.ablebits.com/office-addins-blog/watermark-in-excel/" target="_blank" rel="noopener noreferrer">Ablebits' guide to watermarks in Excel</a> for common labeling conventions like DRAFT and CONFIDENTIAL.

相关操作

在其他平台上执行相同任务

获取帮助