Skip to main content

Remove Header Footer from Excel in Power Automate

PDF4me Remove Header Footer from Excel action enables selective removal of headers and footers from Excel documents in Power Automate with granular section control. This powerful cleanup feature supports precise removal of left, center, and right sections from both headers and footers, with full control over worksheet targeting (specific sheets or all sheets) and culture-specific localization, perfect for document standardization, template cleanup, and preparation for rebranding across Microsoft 365 workflows.

Authenticating Your API Request

To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful Excel formatting services.

Remove Header Footer from Excel Power Automate

Key Features

  • Section-Specific Removal: Remove individual sections (left, center, right) from headers and footers independently
  • Flexible Worksheet Targeting: Apply removal to specific worksheets by name or index, or all worksheets
  • Granular Control: Choose which header/footer sections to remove while preserving others
  • Culture Support: Specify culture codes for proper localization during processing
  • Batch Processing: Clean multiple worksheets in a single operation

Parameters

Complete list of parameters for the Remove Header Footer from Excel action. Configure these parameters to control header/footer removal.

Important: Parameters marked with an asterisk (***) are required. All section removal flags are optional and default to false.

ParameterTypeDescriptionExample
File Content***Base64Source Excel File Content
• Map Excel file from previous action output
• Supports Excel files from SharePoint, OneDrive, email attachments
• Can be dynamically retrieved from flow variables
• Must be valid Excel document (.xlsx, .xls formats)
[File Content from Get File]
File Name***StringExcel Document Name
• Specify Excel file name with extension (.xlsx, .xls)
• Used for processing and output file naming
• Must include proper file extension
• Supports dynamic naming from flow variables
data.xlsx
Remove Header LeftBooleanRemove Left Header Section
True - Remove left section (Section 0) of header
False - Preserve left header section
• Default: false
Section Reference: Controls Section 0 (left header)
• Independent control of header sections
true
Remove Header CenterBooleanRemove Center Header Section
True - Remove center section (Section 1) of header
False - Preserve center header section
• Default: false
Section Reference: Controls Section 1 (center header)
• Independent control of header sections
true
Remove Header RightBooleanRemove Right Header Section
True - Remove right section (Section 2) of header
False - Preserve right header section
• Default: false
Section Reference: Controls Section 2 (right header)
• Independent control of header sections
false
Remove Footer LeftBooleanRemove Left Footer Section
True - Remove left section (Section 0) of footer
False - Preserve left footer section
• Default: false
Section Reference: Controls Section 0 (left footer)
• Independent control of footer sections
true
Remove Footer CenterBooleanRemove Center Footer Section
True - Remove center section (Section 1) of footer
False - Preserve center footer section
• Default: false
Section Reference: Controls Section 1 (center footer)
• Independent control of footer sections
true
Remove Footer RightBooleanRemove Right Footer Section
True - Remove right section (Section 2) of footer
False - Preserve right footer section
• Default: false
Section Reference: Controls Section 2 (right footer)
• Independent control of footer sections
false
Worksheet NamesArray (string[])Target Worksheet Names
• List of worksheet names to process
• Example: ["Sheet1", "Summary", "Report"]
Worksheet Selection Logic: If WorksheetNames has values → Processes those named worksheets. If both WorksheetNames and WorksheetIndexes are empty → Processes ALL worksheets in the workbook
• Worksheet names must match exactly
["Sheet1", "Report"]
Worksheet IndexesArray (int[])Target Worksheet Indexes
• List of worksheet indexes (0-based numbering)
• Example: [0, 2, 4] for first, third, and fifth sheets
Worksheet Selection Logic: If WorksheetIndexes has values → Processes those indexed worksheets. If both parameters have values → Processes worksheets matching either criteria (union of both lists)
Note: Worksheet indexes are 0-based (first worksheet = 0, second = 1, etc.)
[0, 1]
Culture NameStringCulture Code for Localization
• Culture/locale code for text rendering
• Examples: "en-US", "de-DE", "fr-FR"
• Empty string uses invariant culture
• Default: "" (empty string)
en-US

Output

The PDF4me Remove Header Footer from Excel action returns comprehensive output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

ParameterTypeDescription
documentBase64Excel document with specified headers/footers removed
SuccessBooleantrue if operation successful, false if failed
Error MessageStringError description (null if successful)
ErrorsArrayList of detailed error information (empty array if successful)

Common Error Messages

Understanding and troubleshooting errors helps ensure smooth Excel header/footer removal workflows:

Error MessageCauseSolution
"Request is empty"Request object is nullProvide valid request object
"Document is empty"Document object is nullProvide valid Excel document
"Invalid worksheet selection"Worksheet names don't exist or indexes are out of rangeUse existing worksheet names or valid indexes (0-based)
"Available worksheets in workbook (X total)"Informational message shown when worksheet selection failsReview worksheet names/indexes and use valid values from the X available worksheets

Workflow Examples

The PDF4me Remove Header Footer from Excel action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Document Rebranding Preparation Workflow

Transform your rebranding process with automated header/footer cleanup:

Complete Workflow Steps:

  1. Trigger: Rebranding initiative started - process document library
  2. Get Excel Files: Retrieve all Excel templates from SharePoint
  3. Remove All Headers: Set all header sections (left, center, right) to true
  4. Remove All Footers: Set all footer sections (left, center, right) to true
  5. Apply to All Sheets: Leave WorksheetNames and WorksheetIndexes empty
  6. Add New Branding: Use "Add Image Header Footer" action for new logo
  7. Add New Text: Use "Add Text Header Footer" action for new company name
  8. SharePoint Upload: Save rebranded templates to new folder

Business Benefits:

  • Cleanly removes 200+ old headers/footers from template library
  • Ensures complete removal of outdated branding elements
  • Prepares documents for consistent new branding application
  • Saves 80+ hours of manual header/footer cleanup

Industry Use Cases & Applications

Corporate Rebranding Use Cases

  • 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

Get Help