跳到主要内容

移除页眉和页脚 Exceln8n

移除页眉/页脚 是一个 PDF4me Excel 操作 n8n 清除左侧、中间和右侧区域 Excel 可以独立地在单个工作表或整个工作簿中设置页眉和页脚。使用此功能可以在品牌重塑前去除旧的品牌标识,清理模板以便重复使用,或在将工作簿发送给客户之前清除内部标记。

此节点的功能

PDF4me Excel移除页眉/页脚 清除 Excel 逐节调整页眉和页脚。六个独立的切换开关分别控制页眉和页脚的左、中、右位置,因此您可以移除一个角落的徽标,同时保留另一个角落的页码。目标工作表名称用于指定移除操作是应用于单个工作表,如果留空则应用于所有工作表。

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

验证您的身份 API 要求

每一个 PDF4me 节点 n8n 需要有效 用于连接的凭证创建或选择一个包含您的 PDF4me API 关键在于确保工作流程能够安全地验证清理请求。

您不容错过的重要事实

六个开关,全部独立,默认关闭。
“移除左侧、居中、右侧页眉”和“移除左侧、居中、右侧页脚”选项的默认值均为 false。除非您明确启用某个选项,否则不会移除任何内容。
“空目标工作表名称”指的是每张工作表
将目标工作表名称留空,则删除操作将应用于整个工作簿,并且响应报告会显示 applyToAllWorksheets 为 true。为工作表命名则会将其限制为仅应用于该工作表。
不同的图纸需要单独的节点运行
目标工作表名称可以指定单个工作表或所有工作表,不能指定混合工作表列表。如果需要从不同的工作表中删除不同的部分,请链接第二个“删除页眉/页脚”节点。
PDF4me Excel 节点在 n8n 中设置为“操作:移除页眉/页脚”,Excel 文件输入方法来自上一个节点(二进制数据),二进制数据属性名称为“data”,“移除页眉(左、中、右)”和“移除页脚(左、中、右)”选项全部关闭,输出文件名为 excel_without_header_footer.xlsx,源文档名称为 myExcelFile.xlsx,输出二进制数据名称为“data”,目标工作表名称为“field”。

PDF4me Excel 移除页眉/页脚参数面板 n8n

移除页眉/页脚需要哪些参数?

必需的: 手术, Excel 文件输入方式、与该方法匹配的输入字段以及输出文件名。所有六个节删除开关的默认值均为“否”,目标工作表名称、区域性名称、源文档名称和输出二进制数据名称均为可选。

范围必需的它的作用例子
OperationRequiredSelects the PDF4me Excel action to run. Choose Remove Header/Footer.Remove Header/Footer
Excel File Input MethodRequiredHow 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 NameConditionalName 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 LeftOptionalClears the left section of the page header. Default false.true
Remove Header CenterOptionalClears the center section of the page header. Default false.true
Remove Header RightOptionalClears the right section of the page header. Default false.false
Remove Footer LeftOptionalClears the left section of the page footer. Default false.true
Remove Footer CenterOptionalClears the center section of the page footer. Default false.true
Remove Footer RightOptionalClears the right section of the page footer. Default false.false
Output File NameRequiredFilename for the cleaned workbook the node returns. Include the .xlsx extension.excel_without_header_footer.xlsx
Source Document NameOptionalReference label for the incoming workbook. Echoed back as originalFileName for tracking; it does not change the output.myExcelFile.xlsx
Output Binary Data NameOptionalName of the binary property the output item exposes. Defaults to data.data
Target Worksheet NameOptionalName of the single worksheet to process. Leave blank to apply the removal to every worksheet.Sheet1
Culture NameOptionalLocale used while processing the workbook, relevant when header or footer text includes locale-sensitive placeholders.en-US

输出字段

一次成功的运行返回一个 n8n 携带物品 JSON 元数据加上清理后的工作簿(二进制数据)。

场地类型它包含什么
successBooleanTrue when the removal ran successfully. Use it to route error-handling branches.
fileNameStringFilename of the cleaned workbook, matching Output File Name.
fileSizeNumberSize of the returned workbook in bytes.
originalFileNameStringThe value supplied in Source Document Name, echoed back for tracking.
removeHeaderLeftBooleanWhether the left header section was removed.
removeHeaderCenterBooleanWhether the center header section was removed.
removeHeaderRightBooleanWhether the right header section was removed.
removeFooterLeftBooleanWhether the left footer section was removed.
removeFooterCenterBooleanWhether the center footer section was removed.
removeFooterRightBooleanWhether the right footer section was removed.
worksheetNameStringThe worksheet the removal targeted, matching Target Worksheet Name.
applyToAllWorksheetsBooleanTrue when the removal applied to every worksheet, false when only the named worksheet was processed.
messageStringHuman-readable result message for the operation.
Binary (data)BinaryThe cleaned .xlsx under Output Binary Data Name (default data). Pass into Write Binary File, Email, or a cloud-storage upload.

N8N 行动反应

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"
}
]

如何设置删除页眉/页脚? n8n

  1. 添加 PDF4me Excel 将节点添加到您的工作流程并设置 手术移除页眉/页脚
  2. 用于连接的凭证请选择您的 PDF4me API 或使用您的凭证创建一个凭证 API 钥匙。
  3. Excel 文件输入法来自上一个节点(二进制数据) 并设置 二进制数据属性名称 通常情况下,归还给存放工作簿的财产。 data
  4. 开启您需要的版块开关: 移除左侧标题中心正确的移除左侧页脚中心正确的
  5. 目标工作表名称 可以将其填写到指定的工作表,也可以将其留空,使整个工作簿保持空白。
  6. (可选) 文化名称 用于本地化页眉或页脚文本。
  7. 输出文件名 以……结尾 .xlsx执行该节点,并将清理后的工作簿路由下去。

典型配置

工作流程示例Common n8n workflow patterns using Remove Header/Footer for Excel.
品牌重塑前先去除旧品牌标识
  1. 批处理作业从共享驱动器中提取旧版报表模板。
  2. 移除页眉/页脚,同时启用“移除页眉中心”和“移除页脚中心”以清除旧的徽标文本。
  3. PDF4me Excel 添加文本页眉页脚后,新的品牌标识将应用到后续步骤中。
在交付给客户之前,请对内部记录进行清理。
  1. 当报告被标记为可以对外发布时,会触发一个 webhook。
  2. 删除页眉/页脚会清除“删除左侧页眉”,该页眉原本放置内部审阅者的姓名缩写。
  3. 处理后的工作簿将通过电子邮件发送给客户。
重置模板以便重复使用
  1. 已完成的项目工作簿将被复制到模板文件夹。
  2. 所有六个部分切换都生效,清除所有页眉和页脚部分。
  3. 空白页眉模板已保存,供下一个项目使用。
仅清理汇总表
  1. 多工作表工作簿包含原始数据标签页和一个汇总表。
  2. 目标工作表名称设置为“汇总”,以便原始数据选项卡保留其标题。
  3. 清理后的汇总表导出到 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.

速查表

场地价值
OperationRemove Header/Footer
Excel File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Remove Header Left / Center / Righttrue / true / false (example)
Remove Footer Left / Center / Righttrue / true / false (example)
Target Worksheet Name(blank for all worksheets)
Culture Nameen-US
Output File Nameexcel_without_header_footer.xlsx
Source Document NamemyExcelFile.xlsx
Output Binary Data Namedata
CredentialsPDF4me API credential

常见问题

Do I have to remove every header and footer section at once?+
No. Remove Header Left, Center, Right and Remove Footer Left, Center, Right are six independent toggles. Turn on only the sections that need clearing, for example just Remove Header Center to drop a company name while leaving page numbers in the footer untouched.
What happens if I leave Target Worksheet Name empty?+
The operation applies the selected removals to every worksheet in the workbook, and the response reports applyToAllWorksheets true. Entering a specific sheet name restricts the operation to that single worksheet, and the response echoes it back as worksheetName.
Can I remove headers from one sheet and footers from another in a single run?+
Not in one execution, since Target Worksheet Name accepts a single sheet or all sheets. Chain two Remove Header/Footer nodes in the workflow, each with a different Target Worksheet Name and a different set of section toggles, to apply distinct removals per sheet.
Does removing a header section delete the whole header row?+
No. Excel headers and footers are split into three independent sections, left, center, and right, that print in fixed positions on the page. Clearing one section leaves the other two intact, so a page number in the right footer can survive while a left footer note is removed.
What is Culture Name used for here?+
Culture Name sets the locale applied while the workbook is processed, useful when header or footer text includes locale-sensitive placeholders such as dates. Leaving it empty uses the default culture.

相关操作

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

获取帮助