跳到主要内容

添加文本页眉页脚 Excel 使用 Zapier

PDF4me 添加文本页眉页脚 是一个 Zapier 执行将品牌化的页眉和页脚文本写入页面的操作 Excel 自动创建工作表。使用此功能可将标题、页码、免责声明或公司名称添加到页眉和页脚的左侧、中间和右侧区域,每个区域的颜色和字体大小均可独立设置。返回一个新的工作表。 Excel 文件用于下一步 Zap 步骤。

此操作的作用

需要 Excel 从之前的 Zap 步骤导入工作簿,并将文本写入六个页眉/页脚区域(每个区域分别对应左、中、右三个位置),每个区域都可以设置不同的颜色和字体大小。您可以按名称或索引将设置应用于特定的工作表,也可以将这两个字段都留空,以便将相同的页眉和页脚应用于工作簿中的每个工作表。此功能可用于添加品牌标识、页面标题、保密声明或自动从工作流程中导出的报告的生成日期。

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

验证您的身份 API 要求

要访问 PDF4me 网站 API 通过 Zapier每个请求都必须包含正确的身份验证凭据。身份验证可确保通信安全,并验证您作为授权用户的身份,从而实现与您的系统之间的无缝集成。 Zapier 工作流程和 PDF4meExcel 文字品牌推广服务。

您不容错过的重要事实

仅需提交文件。
每个页眉、页脚、工作表目标和文化字段都是可选的。 Zapier 配置。将任何文本字段留空即可完全跳过该部分。
六个独立、风格各异的部分
页眉左/中/右和页脚左/中/右分别使用各自的文本、颜色和字体大小,因此您可以将醒目的红色居中标题与较小的灰色左对齐日期混合使用。
工作表目标定位是可选的
使用“按名称定位目标工作表”或“按索引定位目标工作表”可将更改限制在特定工作表上。将两者都留空则更改将应用于工作簿中的所有工作表。

:::提示:从之前的步骤中获取映射文件和文件名

使用 + 旁边的按钮 文件文件名 例如,从之前的 Zap 步骤进行映射, Excel 来自 Google 云端硬盘。您可以合并 文件名文件扩展名 根据上一步构建完整文件名。 Excel 文件必须提供完整内容,不能仅提供“存在但未显示”的引用。

:::

:::警告 文件:(存在但未显示)

如果在“文件”字段中看到“文件:(存在但未显示)”并收到“文件为空”错误,请选择提供相应选项的选项。 完整文件内容 相反。参见 Zapier & Power Automate 尖端 详情请见下文。

:::

PDF4me Excel 添加文本页眉页脚 Zapier 配置第 1 部分 - 文件、文件名、页眉(左/居中/右)、文本颜色、字体大小
配置 Excel 添加文本页眉页脚操作:映射文件(必需),然后设置左侧、中间和右侧部分的页眉文本、颜色和字体大小。
PDF4me Excel 添加文本页眉页脚 Zapier 配置第 2 部分 - 页脚左/居中/右对齐文本、颜色、字体大小、目标工作表、区域设置
页脚文本部分、按名称或索引定位工作表以及文化/语言设置。

添加文本页眉页脚的主要功能有哪些?

  • 六个文本章节在页眉左侧、居中、右侧和页脚左侧、居中、右侧添加文本
  • 按部分样式为每个部分分别设置文本、颜色和字体大小
  • 工作表目标按名称或索引指定特定工作表,或留空表示全部工作表。
  • 文化与语言配置日期和数字格式的区域设置

参数

“添加文本页眉页脚”操作的完整参数列表。参数名称与以下内容匹配: Zapier 配置 UI 如上图所示。

快速设置清单
  1. 地图 文件Excel来自您的触发器或上一步
  2. (可选)映射 文件名 (例如,合并上一步中的文件名和文件扩展名)
  3. 请输入文本 左侧标题文本标题居中文本标题右侧文本 (或留空)
  4. 请输入文本 页脚左侧文本页脚居中文本页脚右侧文本 (或留空)
  5. (可选) 颜色字体大小 每个部分(默认值:黑色,11)
  6. (可选) 目标工作表 - 按名称 或者 目标工作表 - 按索引 (或者所有页面都留空)
范围必需的它的作用例子
FileRequiredExcel file to add text headers/footers to. Map from a previous step. Must provide full file content.[2. File from Step 2]
File NameConditionalExcel filename with .xlsx or .xls extension, used for output file identification.add_header_sample_file.xlsx
Header Left-TextConditionalText for the left header section.Ynoox
Header Left-ColorConditionalColor for the left header text. Hex or color name.Black
Header Left-Font SizeConditionalFont size in points for the left header.11
Header Center-TextConditionalText for the center header section.Q4 2024 Report
Header Center-ColorConditionalColor for the center header text.Black
Header Center-Font SizeConditionalFont size for the center header.11
Header Right-TextConditionalText for the right header section.-
Header Right-ColorConditionalColor for the right header text.Black
Header Right-Font SizeConditionalFont size for the right header.11
Footer Left-TextConditionalText for the left footer section.-
Footer Left-ColorConditionalColor for the left footer text.Black
Footer Left-Font SizeConditionalFont size for the left footer.11
Footer Center-TextConditionalText for the center footer section.Confidential
Footer Center-ColorConditionalColor for the center footer text.Black
Footer Center-Font SizeConditionalFont size for the center footer.11
Footer Right-TextConditionalText for the right footer section.-
Footer Right-ColorConditionalColor for the right footer text.Black
Footer Right-Font SizeConditionalFont size for the right footer.11
Target Worksheets-By NameConditionalTarget worksheets by exact name. Empty applies to all sheets.Sheet1, Sheet2
Target Worksheets-By IndexConditionalTarget worksheets by 1-based index. Empty applies to all sheets.[1, 2]
Culture & Language SettingsConditionalLocale for date/number formatting.en-US
适用于所有工作表

两者都保留 目标工作表 - 按名称目标工作表 - 按索引 为空,以便应用文本页眉/页脚 所有工作表 在工作簿中。

重要的: 仅有的 文件 是必填项。其他所有字段,包括文件名,都是必填项。 条件也就是说,只有当您想要设置特定部分的样式时才需要用到它。使用 + 每个字段旁边都有一个按钮,用于映射来自先前步骤的数据。工作表索引从 1 开始。颜色接受十六进制代码(#RRGGBB)或颜色名称(例如,黑色、红色)。

添加文本页眉页脚返回什么?

PDF4me 添加文本页眉页脚 操作返回修改后的值 Excel 该文件用于后续的 Zap 步骤。所有 Zap 步骤的输出格式均相同。 PDF4me Excel 行动 Zapier

关键输出字段(将这些字段映射到您的下一步)

文件 URL

API 下载已处理文件的端点 Excel 文件。将其映射到下一步的文件输入。

api.pdf4me.com/Zapier/GetDocument?d=...
备用文件网址

备用下载 URL 文件名包含在路径中。

api.pdf4me.com/Zapier/GetAltDocument/.../add_header_sample_file.xlsx
场地类型它包含什么
Job IdStringUnique identifier for the Zapier job execution.
File UrlURLAPI endpoint to download the processed Excel file.
Alternate File UrlURLAlternate download URL with the filename in the path.
File NameStringBase filename without extension.
File ExtensionStringFile extension of the returned file, e.g. .xlsx.
Full File NameStringComplete filename with extension.
Document IdStringUnique identifier for the processed document.
File SizeNumberSize of the output file in bytes.
Doc TextStringExtracted text, typically empty for Excel operations.

例子 JSON 输出URL(仅显示格式,链接无效):

{
"Job Id": "969f2da3-f10a-49bf-b084-6fc4759991ec",
"File Url": "api.pdf4me.com/Zapier/GetDocument?d=...",
"Alternate File Url": "api.pdf4me.com/Zapier/GetAltDocument/.../add_header_sample_file.xlsx",
"File Name": "add_header_sample_file",
"File Extension": ".xlsx",
"Full File Name": "add_header_sample_file.xlsx",
"Document Id": "07386627-184a-44b2-a040-5ea2712a4bc5",
"File Size": 212764,
"Doc Text": ""
}
所有输出相同 PDF4me Excel 操作

此输出结构在以下各项中共享: 添加文本页眉页脚添加行更新行添加水印以及其他 PDF4me Excel 行动 Zapier。 这 URL这些是临时的,请在过期前在下一步中使用它们。

典型配置

工作流程示例Common Zapier workflow patterns using Add Text Header Footer.
品牌财务报告分发
  1. 当月度财务工作簿上传到 Google 云端硬盘文件夹时,就会触发一个触发器。
  2. PDF4me 添加文本页眉页脚,将页眉居中文本设置为报告标题,页脚居中文本设置为“机密 - 仅供内部使用”,并将目标工作表留空,以便每个工作表都得到相同的处理。
  3. “云端硬盘”步骤会将带有品牌标识的工作簿上传到面向高管的文件夹。
客户交付物,包含公司抬头
  1. 当可交付成果工作簿被标记为最终版本时,项目管理触发器就会触发。
  2. PDF4me 添加文本页眉页脚,将页眉左侧文本设置为咨询公司的名称,将页脚右侧文本设置为上一步中映射的日期值,并通过“按名称定位工作表”仅针对面向客户的工作表。
  3. 通过电子邮件步骤向客户发送带有品牌标识和日期戳的工作簿。
整本练习册的保密标记
  1. 当工作簿上传到受限访问存储文件夹时,会触发一个触发器。
  2. PDF4me 添加文本页眉页脚,将页眉中心文本设置为“机密”,并将页眉中心颜色设置为红色,使目标工作表为空,以便标记出现在每张工作表上。
  3. 标记后的工作簿将保存回安全存储位置,并且其分发情况将被记录。

实用技巧

File: (Exists but not shown) causes errors
Select the mapping option that provides the file's full binary content instead of a reference. See Zapier & Power Automate Tips for the exact steps.
Only File is required, everything else is optional
Leave any Header or Footer Text field empty to skip that section. There is no need to fill in all six sections if you only need one or two.
Culture & Language Settings affects formatting, not layout
This field controls locale-specific date and number formatting inside the values you provide, it does not reposition or reorder the header/footer sections.
Only one worksheet-targeting field is needed
Use either Target Worksheets-By Name or Target Worksheets-By Index, not both. Leaving both empty applies the header and footer to every sheet.
Color accepts hex or named values
Use a hex code like #FF0000 for exact brand colors, or a plain color name like Black or Red when precision does not matter.

速查表

场地价值
ActionAdd Text Header Footer
File[Mapped from previous step]
File Nameadd_header_sample_file.xlsx
Header Center-TextQ4 2024 Report
Footer Center-TextConfidential
Default ColorBlack
Default Font Size11
Target Worksheets-By NameSheet1, Sheet2 (or empty for all)
Culture & Language Settingsen-US

常见问题

How do I add a header and footer to an Excel file automatically in Zapier?+
Add the PDF4me Add Text Header Footer action to a Zap, map the Excel file from a previous step using the full-content option, and fill in the Header and Footer Text fields for the sections you want. See Microsoft's guide on Excel headers and footers for how these sections behave on the printed page.
Can I apply a header and footer to only specific worksheets?+
Yes. Use Target Worksheets-By Name to list exact sheet names, or Target Worksheets-By Index for 1-based sheet positions. Leave both fields empty to apply the header and footer to every worksheet in the workbook.
How do I create a footer with different text on the left, center, and right?+
Set Footer Left-Text, Footer Center-Text, and Footer Right-Text independently. Each section also has its own Color and Font Size fields, so you can style them differently within the same footer.
Is the File field the only required parameter?+
Yes. Only File is marked required in the Zapier configuration. File Name and every header, footer, worksheet-targeting, and culture field are optional, leaving a text field empty simply skips that section.
Does adding a header and footer change the data in the spreadsheet?+
No. The action only writes to the worksheet's header and footer regions, the same print areas described in Microsoft's header and footer documentation. Cell data, formulas, and formatting in the worksheet body are untouched.

相关操作

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

行业应用案例及应用

  • 财务报表标题在页眉中添加期间标题(例如,“2024 年第四季度现金流量表”)
  • 保密页脚在所有财务报告页脚插入“机密 - 仅供内部使用”字样
  • 报告生成日期添加“生成日期:MM/DD/YYYY”页脚,用于版本控制和跟踪
  • 预算报告标题在预算与实际报表中插入部门和期间标题
  • 审计跟踪页脚为了符合规定,请添加“编制人:[姓名]”和“审核日期:[日期]”。

获取帮助