移除页眉和页脚 Excel 在 n8n
移除页眉/页脚 是一个 PDF4me Excel 操作 n8n 清除左侧、中间和右侧区域 Excel 可以独立地在单个工作表或整个工作簿中设置页眉和页脚。使用此功能可以在品牌重塑前去除旧的品牌标识,清理模板以便重复使用,或在将工作簿发送给客户之前清除内部标记。
此节点的功能
PDF4me Excel移除页眉/页脚 清除 Excel 逐节调整页眉和页脚。六个独立的切换开关分别控制页眉和页脚的左、中、右位置,因此您可以移除一个角落的徽标,同时保留另一个角落的页码。目标工作表名称用于指定移除操作是应用于单个工作表,如果留空则应用于所有工作表。
相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客 →
验证您的身份 API 要求
每一个 PDF4me 节点 n8n 需要有效 用于连接的凭证创建或选择一个包含您的 PDF4me API 关键在于确保工作流程能够安全地验证清理请求。
您不容错过的重要事实
六个开关,全部独立,默认关闭。
“移除左侧、居中、右侧页眉”和“移除左侧、居中、右侧页脚”选项的默认值均为 false。除非您明确启用某个选项,否则不会移除任何内容。
“空目标工作表名称”指的是每张工作表
将目标工作表名称留空,则删除操作将应用于整个工作簿,并且响应报告会显示 applyToAllWorksheets 为 true。为工作表命名则会将其限制为仅应用于该工作表。
不同的图纸需要单独的节点运行
目标工作表名称可以指定单个工作表或所有工作表,不能指定混合工作表列表。如果需要从不同的工作表中删除不同的部分,请链接第二个“删除页眉/页脚”节点。

PDF4me Excel 移除页眉/页脚参数面板 n8n
移除页眉/页脚需要哪些参数?
必需的: 手术, Excel 文件输入方式、与该方法匹配的输入字段以及输出文件名。所有六个节删除开关的默认值均为“否”,目标工作表名称、区域性名称、源文档名称和输出二进制数据名称均为可选。
| 范围 | 必需的 | 它的作用 | 例子 |
|---|---|---|---|
| Operation | Required | Selects the PDF4me Excel action to run. Choose Remove Header/Footer. | Remove Header/Footer |
| 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 |
| Remove Header Left | Optional | Clears the left section of the page header. Default false. | true |
| Remove Header Center | Optional | Clears the center section of the page header. Default false. | true |
| Remove Header Right | Optional | Clears the right section of the page header. Default false. | false |
| Remove Footer Left | Optional | Clears the left section of the page footer. Default false. | true |
| Remove Footer Center | Optional | Clears the center section of the page footer. Default false. | true |
| Remove Footer Right | Optional | Clears the right section of the page footer. Default false. | false |
| Output File Name | Required | Filename for the cleaned workbook the node returns. Include the .xlsx extension. | excel_without_header_footer.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 |
| Target Worksheet Name | Optional | Name of the single worksheet to process. Leave blank to apply the removal to every worksheet. | Sheet1 |
| Culture Name | Optional | Locale used while processing the workbook, relevant when header or footer text includes locale-sensitive placeholders. | en-US |
输出字段
一次成功的运行返回一个 n8n 携带物品 JSON 元数据加上清理后的工作簿(二进制数据)。
| 场地 | 类型 | 它包含什么 |
|---|---|---|
success | Boolean | True when the removal ran successfully. Use it to route error-handling branches. |
fileName | String | Filename of the cleaned 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. |
removeHeaderLeft | Boolean | Whether the left header section was removed. |
removeHeaderCenter | Boolean | Whether the center header section was removed. |
removeHeaderRight | Boolean | Whether the right header section was removed. |
removeFooterLeft | Boolean | Whether the left footer section was removed. |
removeFooterCenter | Boolean | Whether the center footer section was removed. |
removeFooterRight | Boolean | Whether the right footer section was removed. |
worksheetName | String | The worksheet the removal targeted, matching Target Worksheet Name. |
applyToAllWorksheets | Boolean | True when the removal applied to every worksheet, false when only the named worksheet was processed. |
message | String | Human-readable result message for the operation. |
Binary (data) | Binary | The cleaned .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_without_header_footer.xlsx",
"fileSize": 212810,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"removeHeaderLeft": false,
"removeHeaderCenter": false,
"removeHeaderRight": false,
"removeFooterLeft": false,
"removeFooterCenter": false,
"removeFooterRight": false,
"worksheetName": "Sheet1",
"applyToAllWorksheets": false,
"message": "Header and footer removed from Excel file successfully"
}
]
架构视图
1 item
fileName: T excel_without_header_footer.xlsx
fileSize: # 212810
success: true
originalFileName: T myExcelFile.xlsx
removeHeaderLeft: false
removeHeaderCenter: false
removeHeaderRight: false
removeFooterLeft: false
removeFooterCenter: false
removeFooterRight: false
worksheetName: T Sheet1
applyToAllWorksheets: false
message: T Header and footer removed from Excel file successfully
类型指示器: T = String, # = Number。
二进制数据视图
data
File Name: excel_without_header_footer.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 212.8 kB
二进制数据访问: 找到工作簿 $binary.data.data可供下载、通过电子邮件发送或存储。
如何设置删除页眉/页脚? n8n?
- 添加 PDF4me Excel 将节点添加到您的工作流程并设置 手术 到 移除页眉/页脚。
- 在 用于连接的凭证请选择您的 PDF4me API 或使用您的凭证创建一个凭证 API 钥匙。
- 放 Excel 文件输入法 到 来自上一个节点(二进制数据) 并设置 二进制数据属性名称 通常情况下,归还给存放工作簿的财产。
data。 - 开启您需要的版块开关: 移除左侧标题, 中心, 正确的 和 移除左侧页脚, 中心, 正确的。
- 放 目标工作表名称 可以将其填写到指定的工作表,也可以将其留空,使整个工作簿保持空白。
- (可选) 文化名称 用于本地化页眉或页脚文本。
- 放 输出文件名 以……结尾
.xlsx执行该节点,并将清理后的工作簿路由下去。
典型配置
工作流程示例Common n8n workflow patterns using Remove Header/Footer for Excel.
品牌重塑前先去除旧品牌标识
- 批处理作业从共享驱动器中提取旧版报表模板。
- 移除页眉/页脚,同时启用“移除页眉中心”和“移除页脚中心”以清除旧的徽标文本。
- PDF4me Excel 添加文本页眉页脚后,新的品牌标识将应用到后续步骤中。
在交付给客户之前,请对内部记录进行清理。
- 当报告被标记为可以对外发布时,会触发一个 webhook。
- 删除页眉/页脚会清除“删除左侧页眉”,该页眉原本放置内部审阅者的姓名缩写。
- 处理后的工作簿将通过电子邮件发送给客户。
重置模板以便重复使用
- 已完成的项目工作簿将被复制到模板文件夹。
- 所有六个部分切换都生效,清除所有页眉和页脚部分。
- 空白页眉模板已保存,供下一个项目使用。
仅清理汇总表
- 多工作表工作簿包含原始数据标签页和一个汇总表。
- 目标工作表名称设置为“汇总”,以便原始数据选项卡保留其标题。
- 清理后的汇总表导出到 PDF 供分发。
实用技巧
Only toggle what needs clearing
All six removal flags default to false. Turning on Remove Header Center alone leaves the left and right header sections, and the entire footer, untouched.
Blank Target Worksheet Name means every sheet
There is no separate all-worksheets toggle. Leaving the field empty is what triggers workbook-wide removal.
One worksheet per run
To apply different section removals to different sheets, add a second Remove Header/Footer node rather than trying to list multiple sheet names in one field.
Check applyToAllWorksheets in the response
The output field confirms whether the removal actually ran workbook-wide or was scoped to one sheet, useful for logging in larger workflows.
Output File Name needs the .xlsx extension
Omitting it can leave downstream nodes unable to detect the format when writing or emailing the file.
Source Document Name is reference-only
It is echoed back as originalFileName for tracking and does not affect which sections are removed.
速查表
| 场地 | 价值 |
|---|---|
| Operation | Remove Header/Footer |
| Excel File Input Method | From Previous Node (Binary Data) |
| Binary Data Property Name | data |
| Remove Header Left / Center / Right | true / true / false (example) |
| Remove Footer Left / Center / Right | true / true / false (example) |
| Target Worksheet Name | (blank for all worksheets) |
| Culture Name | en-US |
| Output File Name | excel_without_header_footer.xlsx |
| Source Document Name | myExcelFile.xlsx |
| Output Binary Data Name | data |
| Credentials | PDF4me API credential |
常见问题
相关操作
添加文本页眉/页脚
清除旧部分后,自然而然会添加新的页眉或页脚文本。
添加图片页眉/页脚
将徽标图像放置在页眉或页脚部分,通常在删除旧文本后立即使用。
添加文字水印 Excel
另一种标记已清理的工作簿的方法,即在纸张正文而不是页面边缘盖章。
在其他平台上执行相同任务
删除页眉/页脚 Make
与以下情况相同的页眉和页脚清理引擎 Make 模块,连接到 Make 场景。
删除页眉/页脚 Zapier
从数千个 SaaS 应用和 Webhook 中触发相同的清理操作。
删除页眉/页脚 Power Automate
Microsoft 365 与……流动 SharePoint, Outlook以及团队连接。