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.

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.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content*** | Base64 | Source 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*** | String | Excel 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 Left | Boolean | Remove 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 Center | Boolean | Remove 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 Right | Boolean | Remove 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 Left | Boolean | Remove 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 Center | Boolean | Remove 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 Right | Boolean | Remove 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 Names | Array (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 Indexes | Array (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 Name | String | Culture 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
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| document | Base64 | Excel document with specified headers/footers removed |
| Success | Boolean | true if operation successful, false if failed |
| Error Message | String | Error description (null if successful) |
| Errors | Array | List of detailed error information (empty array if successful) |
JSON Response Format
The raw JSON response from the action:
{
"document": "[Base64 Excel Content with Headers/Footers Removed]",
"Success": true,
"ErrorMessage": null,
"Errors": []
}
Error Response Example:
{
"document": null,
"Success": false,
"ErrorMessage": "Invalid worksheet name",
"Errors": [
{
"Code": "WORKSHEET_ERROR",
"Message": "The specified worksheet 'InvalidSheet' does not exist in the workbook"
}
]
}
Power Automate Flow Usage
Use cleaned Excel files in subsequent actions:
- Template Preparation: Remove old headers/footers before adding new branding
- Document Standardization: Clean up inconsistent header/footer formatting
- Rebranding: Remove old company logos/text before applying new branding
- SharePoint Publishing: Upload cleaned Excel files to document libraries
- Email Distribution: Send standardized Excel documents without outdated headers
- Archive Storage: Store cleaned Excel files in OneDrive or Azure Blob
Common Error Messages
Understanding and troubleshooting errors helps ensure smooth Excel header/footer removal workflows:
| Error Message | Cause | Solution |
|---|---|---|
| "Request is empty" | Request object is null | Provide valid request object |
| "Document is empty" | Document object is null | Provide valid Excel document |
| "Invalid worksheet selection" | Worksheet names don't exist or indexes are out of range | Use existing worksheet names or valid indexes (0-based) |
| "Available worksheets in workbook (X total)" | Informational message shown when worksheet selection fails | Review 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:
- Rebranding Cleanup
- Template Cleanup
- Client Sanitization
- Archive Cleanup
Automated Document Rebranding Preparation Workflow
Transform your rebranding process with automated header/footer cleanup:
Complete Workflow Steps:
- Trigger: Rebranding initiative started - process document library
- Get Excel Files: Retrieve all Excel templates from SharePoint
- Remove All Headers: Set all header sections (left, center, right) to true
- Remove All Footers: Set all footer sections (left, center, right) to true
- Apply to All Sheets: Leave WorksheetNames and WorksheetIndexes empty
- Add New Branding: Use "Add Image Header Footer" action for new logo
- Add New Text: Use "Add Text Header Footer" action for new company name
- 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
Automated Template Standardization Workflow
Streamline your template cleanup with selective header/footer removal:
Complete Workflow Steps:
- Trigger: New quarter starts - standardize quarterly report templates
- Get Template: Retrieve quarterly report template from SharePoint
- Remove Center Headers: Set RemoveHeaderCenter to true (remove old quarter text)
- Remove Left Footers: Set RemoveFooterLeft to true (remove old date)
- Keep Right Sections: Leave RemoveHeaderRight and RemoveFooterRight as false (preserve page numbers)
- Target Specific Sheets: Apply to worksheets ["Summary", "Financial Data"] by name
- Add New Quarter Text: Insert current quarter information in center header
- Save Updated Template: Upload standardized template to templates library
Business Benefits:
- Standardizes 12 quarterly templates annually automatically
- Selectively removes outdated information while preserving pagination
- Ensures consistent template formatting across organization
- Reduces template preparation time by 90%
Automated Client Document Sanitization Workflow
Optimize your client deliverable preparation with header/footer cleanup:
Complete Workflow Steps:
- Trigger: Internal report marked for client delivery
- Get Internal Report: Retrieve Excel report from internal folder
- Remove Confidential Footers: Set all footer removal flags to true
- Remove Internal Headers: Set RemoveHeaderLeft and RemoveHeaderCenter to true
- Keep Page Numbers: Set RemoveHeaderRight to false (preserve pagination)
- Target First 3 Sheets: Use WorksheetIndexes [0, 1, 2] for main report sections
- Add Client Branding: Insert client-appropriate headers
- Email Client: Send sanitized report to client stakeholders
Business Benefits:
- Sanitizes 50+ internal reports monthly for client delivery
- Removes confidential internal markings automatically
- Maintains professional appearance with preserved page numbers
- Prevents accidental disclosure of internal information
Automated Archive Document Cleanup Workflow
Enhance your document archival with complete header/footer removal:
Complete Workflow Steps:
- Trigger: Scheduled monthly archival process on last day at 11 PM
- Get Completed Reports: Retrieve all completed project Excel files
- Remove All Headers: Enable all header section removal flags
- Remove All Footers: Enable all footer section removal flags
- Process All Worksheets: Leave worksheet selectors empty for complete cleanup
- Set Culture: Apply "en-US" culture for standardized processing
- Compress Files: Reduce file size after header/footer removal
- Archive Storage: Upload cleaned files to long-term archive library
Business Benefits:
- Cleans 100+ completed project files monthly for archival
- Reduces file sizes by removing unnecessary header/footer content
- Standardizes archived documents for long-term storage
- Saves 15% storage space with cleaned Excel files
Industry Use Cases & Applications
- Corporate Rebranding
- Finance & Accounting
- Human Resources
- Sales & Marketing
- Legal & Compliance
- Operations & Manufacturing
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
Finance & Accounting Use Cases
- Quarter-End Cleanup: Remove previous quarter information from financial templates
- Year-End Standardization: Clean year-specific headers before new fiscal year
- Audit Preparation: Remove internal review comments from audit deliverables
- Client Reports: Sanitize internal headers/footers from client-facing financial reports
Human Resources Use Cases
- Template Updates: Remove outdated HR policy headers from employee templates
- Benefits Enrollment: Clean previous year enrollment headers from new templates
- Performance Reviews: Remove old review period headers from evaluation templates
- Onboarding Cleanup: Standardize new hire templates by removing old headers
Sales & Marketing Use Cases
- Campaign Cleanup: Remove old campaign headers from reusable sales templates
- Pricing Updates: Clean outdated pricing period headers from rate sheets
- Client Proposals: Remove internal review headers from client deliverables
- Territory Changes: Update sales territory headers by removing old assignments
Legal & Compliance Use Cases
- Contract Templates: Remove old version headers from legal templates
- Policy Updates: Clean outdated policy dates from compliance documents
- Regulatory Changes: Update regulatory reference headers by removing old citations
- Audit Cleanup: Remove internal audit notes from final compliance reports
Operations & Manufacturing Use Cases
- SOP Updates: Remove old revision headers from standard operating procedures
- Quality Standards: Clean outdated ISO version headers from quality templates
- Safety Updates: Remove old safety regulation headers from training materials
- Vendor Changes: Clean old vendor logos from procurement templates