Skip to main content

Remove Header Footer from Excel in Power Automate

PDF4me Remove Header Footer from Excel is a Power Automate action that strips selected header and footer sections from a workbook before re-branding or archiving it. Use it to clear old logos, quarter labels, or confidential markings from Left, Center, or Right zones on specific sheets or the whole file.

What this action does

PDF4me Remove Header Footer from Excel clears any of six independent zones, Header Left, Header Center, Header Right, Footer Left, Footer Center, and Footer Right, on an existing workbook. Target specific worksheets by name or index, or leave both empty to clean every sheet in one pass.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

How Do I Authenticate My Power Automate Flow?

Every PDF4me action in Power Automate requires a valid connection. Create or select one that holds your PDF4me API key so the flow can authenticate Excel header/footer requests securely.

Important Facts You Should Not Miss

Six independent Yes/No zones
Remove Header Left, Center, Right and Remove Footer Left, Center, Right are each a separate Yes/No dropdown, defaulting to No. Set only the zones you want cleared.
3 advanced parameters for worksheet targeting
The Advanced parameters panel shows "Showing 1 of 3": Worksheet Names, Worksheet Indexes, and Culture Name. Leave Worksheet Names and Worksheet Indexes empty to process every sheet in the workbook.
Only File Content is truly required
The connector panel marks File Content with a required asterisk. File Name and every removal flag are optional. A run with every flag left at No completes successfully but returns the workbook unchanged.
Power Automate PDF4me Remove Header Footer action configured with File Content mapped, File Name add_header_sample_file.xlsx, Remove Header Left set to Yes, Remove Header Center, Remove Header Right, Remove Footer Left, Remove Footer Center, and Remove Footer Right all set to No, and Advanced parameters showing 1 of 3 with Culture Name visible

Map File Content, set File Name, then flip only the header/footer zones you want removed to Yes.

Parameters

Required: only File Content must be provided. File Name and all six removal flags are optional. Worksheet Names, Worksheet Indexes, and Culture Name are conditional advanced parameters that only matter if you need targeting or localization beyond the defaults.

ParameterRequiredWhat it doesExample
File ContentRequiredBase64 content of the source Excel workbook, mapped from SharePoint, OneDrive, or another prior action.[File Content from Get file content]
File NameOptionalExcel filename including extension (.xlsx or .xls), used for processing and output identification.add_header_sample_file.xlsx
Remove Header LeftOptionalYes clears the left section of the header, No preserves it. Defaults to No.Yes
Remove Header CenterOptionalYes clears the center section of the header, No preserves it. Defaults to No.No
Remove Header RightOptionalYes clears the right section of the header, No preserves it. Defaults to No.No
Remove Footer LeftOptionalYes clears the left section of the footer, No preserves it. Defaults to No.No
Remove Footer CenterOptionalYes clears the center section of the footer, No preserves it. Defaults to No.No
Remove Footer RightOptionalYes clears the right section of the footer, No preserves it. Defaults to No.No
Worksheet NamesConditionalAdvanced parameter. List of worksheet names to target, for example Sheet1 or Report. Leave empty along with Worksheet Indexes to process every sheet.["Sheet1", "Report"]
Worksheet IndexesConditionalAdvanced parameter. List of 0-based worksheet indexes to target. Combines with Worksheet Names if both are set.[0, 2]
Culture NameConditionalAdvanced parameter. Culture/locale code for processing, for example en-US or de-DE. Blank uses the invariant culture.en-US

Output Fields

FieldTypeWhat it contains
documentBase64The Excel workbook with the selected header/footer sections removed.
SuccessBooleantrue if the action completed, false if it failed.
ErrorMessageStringError description, null when Success is true.
ErrorsArrayDetailed error objects, empty when Success is true.

What Do the Common Error Messages Mean?

Error MessageCauseSolution
Request is emptyThe request object is null.Provide a valid request object.
Document is emptyFile Content is null or empty.Provide a valid Excel document in File Content.
Invalid worksheet selectionWorksheet names don't exist or indexes are out of range.Use existing worksheet names or valid 0-based indexes.
Available worksheets in workbook (X total)Informational message shown when worksheet selection fails.Review worksheet names/indexes and use a valid value from the X available worksheets.
  1. Add PDF4meExcel - Remove Header Footer to your Power Automate flow.
  2. Map File Content from a previous action (SharePoint, OneDrive, or Get file content) and set File Name.
  3. Set Remove Header Left, Remove Header Center, or Remove Header Right to Yes for each header zone you want cleared.
  4. Set Remove Footer Left, Remove Footer Center, or Remove Footer Right to Yes for each footer zone you want cleared.
  5. Expand Advanced parameters to target specific Worksheet Names or Worksheet Indexes, or leave both empty to process every sheet. Run the flow, the cleaned workbook returns as document.

Typical Setups

Workflow ExamplesCommon Power Automate flow patterns using Remove Header Footer.
Rebranding preparation
  1. A rebranding initiative flow triggers on a SharePoint template library.
  2. Get file content retrieves each Excel template.
  3. Remove Header Footer sets all six removal flags to Yes, with Worksheet Names and Worksheet Indexes left empty to clear every sheet.
  4. Add Text Header Footer then stamps the new branding onto the cleaned workbook.
Quarterly template cleanup
  1. A scheduled flow runs at the start of each quarter.
  2. Get file content retrieves the quarterly report template.
  3. Remove Header Footer sets Remove Header Center and Remove Footer Left to Yes, keeping Remove Header Right at No to preserve page numbers, targeting Worksheet Names ["Summary", "Financial Data"].
  4. A follow-up action inserts the new quarter label into the cleared header.
Client deliverable sanitization
  1. A flow triggers when an internal report is marked for client delivery.
  2. Get file content retrieves the internal Excel report.
  3. Remove Header Footer sets all footer flags and Remove Header Left, Remove Header Center to Yes, keeping Remove Header Right at No to preserve pagination, using Worksheet Indexes [0, 1, 2] for the main sections.
  4. The sanitized workbook is emailed to the client stakeholder.

Practical Tips

Each zone is independent
You do not need to clear all six zones. Set only the specific Header/Footer Left, Center, or Right flags to Yes for the sections you actually want removed.
Empty worksheet selectors mean all sheets
If both Worksheet Names and Worksheet Indexes are left empty, the action processes every worksheet in the workbook, not just the first one.
Worksheet Names and Indexes combine, not replace
If you set values in both Worksheet Names and Worksheet Indexes, the action processes the union of both lists, so a name typo will not silently exclude a sheet if its index is also listed.
This does not touch worksheet data
Only the header and footer margins are affected. Cell values, formulas, and body formatting are left exactly as they were.
Branch on Success before continuing
Add a Condition on Success after this action so a failed run does not pass a partially cleaned workbook further down the flow.

Cheat Sheet

FieldValue
ActionExcel - Remove Header Footer
Required fieldsFile Content
Header removal flagsRemove Header Left, Center, Right (each Yes/No, default No)
Footer removal flagsRemove Footer Left, Center, Right (each Yes/No, default No)
Advanced parameters3 total: Worksheet Names, Worksheet Indexes, Culture Name
Outputdocument (Base64 workbook) + Success + ErrorMessage + Errors

Common Questions

How do I remove headers and footers from an Excel file in Power Automate?+
Add the PDF4me Remove Header Footer action, map the workbook into File Content, then set Remove Header Left, Center, Right and Remove Footer Left, Center, Right to Yes for each section you want stripped. Sections left at No are preserved.
Can I remove headers from only some worksheets, not the whole workbook?+
Yes. Expand Advanced parameters and list Worksheet Names or Worksheet Indexes for the sheets to target. Leaving both empty processes every worksheet in the workbook. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/headers-and-footers-in-a-worksheet-a4a1e099-8ee5-4f30-be8f-c8ba201e7005" target="_blank" rel="noopener noreferrer">headers and footers in a worksheet</a> for how Excel organizes header/footer scope per sheet.
Can I remove just the center header and keep the left and right sections?+
Yes. Each of the six sections, Header Left, Header Center, Header Right, Footer Left, Footer Center, Footer Right, is an independent Yes/No dropdown, so you can strip one section while leaving the other five untouched.
What is Culture Name used for in this action?+
Culture Name is an optional advanced parameter that sets the locale used during processing, for example en-US or de-DE. Leave it blank to use the invariant culture. See <a href="https://www.ablebits.com/office-addins-blog/excel-header-footer-add-change-remove/" target="_blank" rel="noopener noreferrer">Ablebits' guide to Excel headers and footers</a> for how locale affects header/footer formatting codes.
Does removing headers and footers change the worksheet data?+
No. The action only clears the selected header and footer sections. Cell data, formulas, and formatting in the worksheet body are left untouched.

Industry Use Cases & Applications

  • Company Rebranding: Remove old company logos and names from all Excel templates
  • Merger Integration: Clean headers/footers before applying merged entity branding
  • Division Restructure: Remove old division headers from departmental templates
  • Product Line Changes: Clean product branding from sales and marketing templates

Same Task on Other Platforms

Get Help