Add Text Header Footer to Excel in Power Automate
PDF4me Add Text Header Footer to Excel is a Power Automate action that stamps custom text into the six header and footer zones of a workbook, Left, Center, and Right on both the header and the footer. Use it to brand reports with a title, mark a footer confidential, or stamp a generation date without opening Excel manually.
What this action does
PDF4me Add Text Header Footer to Excel writes text into any of six independent zones, Header Left, Header Center, Header Right, Footer Left, Footer Center, and Footer Right, on an existing workbook. Leave a zone blank to skip it. Advanced parameters expose per-zone styling such as text color, which only applies once the matching zone has text.
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

Map File Content and File Name, fill any header/footer text zones you need, then expand Advanced parameters for per-zone styling.
Parameters
Required: File Content and File Name must always be provided. All six header/footer text zones are optional, fill only the ones you need. Advanced style parameters are conditional, they take effect only when their matching text zone has a value.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Optional | Content of the Excel file to process. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content. | @{body('Get_file_content')?['$content']} |
| File Name | Optional | Name of the Excel file, including its extension (for example `report.xlsx`). Map it from the file name returned by a previous action. Defaults to `TextHeaderFooter.xlsx`. | report.xlsx |
| Header Left Text | Optional | Text content for the left section of the header. | your value |
| Header Center Text | Optional | Text content for the center section of the header. | your value |
| Header Right Text | Optional | Text content for the right section of the header. | your value |
| Footer Left Text | Optional | Text content for the left section of the footer. | your value |
| Footer Center Text | Optional | Text content for the center section of the footer. | your value |
| Footer Right Text | Optional | Text content for the right section of the footer. | your value |
| Header Left - Color | Optional | Color for the left header text (hex code or color name). Defaults to `Black`. | Black |
| Header Left - Font Size | Optional | Font size for the left header text. Defaults to `11`. | 11 |
| Header Center - Color | Optional | Color for the center header text (hex code or color name). Defaults to `Black`. | Black |
| Header Center - Font Size | Optional | Font size for the center header text. Defaults to `11`. | 11 |
| Header Right - Color | Optional | Color for the right header text (hex code or color name). Defaults to `Black`. | Black |
| Header Right - Font Size | Optional | Font size for the right header text. Defaults to `11`. | 11 |
| Footer Left - Color | Optional | Color for the left footer text (hex code or color name). Defaults to `Black`. | Black |
| Footer Left - Font Size | Optional | Font size for the left footer text. Defaults to `11`. | 11 |
| Footer Center - Color | Optional | Color for the center footer text (hex code or color name). Defaults to `Black`. | Black |
| Footer Center - Font Size | Optional | Font size for the center footer text. Defaults to `11`. | 11 |
| Footer Right - Color | Optional | Color for the right footer text (hex code or color name). Defaults to `Black`. | Black |
| Footer Right - Font Size | Optional | Font size for the right footer text. Defaults to `11`. | 11 |
| Target Worksheets - By Name | Optional | Comma-separated list of worksheet names to apply headers/footers to (leave empty for all) ( e.g. Sheet1,Sheet3 ). | your value |
| Target Worksheets - By Index | Optional | Comma-separated list of worksheet indexes (1-based) to apply headers/footers to (leave empty for all) ( 1,2,3). | your value |
| Culture & Language Settings | Optional | Culture name for formatting (e.g., en-US, fr-FR, de-DE). | your value |
Output Fields
| Field | Type | What it contains |
|---|---|---|
Output File Content | File content | Content of the Excel file with the header and footer text added. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file. |
Success | Yes/No | Whether the operation completed successfully |
Error Message | Text | Error message if operation failed |
Error Details | Array | List of detailed error messages |
What Do the Common Error Messages Mean?
| Error Message | Cause | Solution |
|---|---|---|
| Request is empty | The request object is null. | Provide a valid request object. |
| Document is empty | File Content is null or empty. | Map a valid Excel document into File Content. |
| Invalid file format | The mapped file is not a valid Excel document. | Confirm the source file is a genuine .xlsx or .xls workbook. |
| Invalid color format | A color parameter has an invalid hex code or color name. | Use a valid hex format such as #FF0000 or a standard color name. |
How Do I Set Up Add Text Header Footer in Power Automate?
- Add PDF4me → Excel - Add Text Header Footer to your Power Automate flow.
- Map File Content and File Name from a previous action (SharePoint, OneDrive, or Get file content).
- Fill any of Header Left Text, Header Center Text, or Header Right Text for the header zones you need.
- Fill any of Footer Left Text, Footer Center Text, or Footer Right Text for the footer zones you need.
- Expand Advanced parameters to style a filled zone, for example Header Left - Color. Run the flow, the branded workbook returns as document.
Typical Setups
Workflow ExamplesCommon Power Automate flow patterns using Add Text Header Footer.
- A scheduled trigger runs on the monthly report generation date.
- Get file content retrieves the finished report workbook from SharePoint.
- Add Text Header Footer sets Header Center Text to the report title and Footer Left Text to a generated-on note.
- The branded workbook is uploaded back to the reports document library.
- An instant flow runs when a sensitive Excel file is uploaded to a restricted folder.
- Get file content retrieves the workbook from that folder.
- Add Text Header Footer sets Footer Center Text to a confidentiality notice.
- The marked workbook is saved back to the same restricted library.
- A flow triggers when a deliverable is marked Final in a project management connector.
- Get file content retrieves the final Excel deliverable.
- Add Text Header Footer sets Header Left Text to the company name and Footer Right Text to a formatDateTime expression.
- The branded file is emailed to the client stakeholder.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Excel - Add Text Header Footer |
| Required fields | File Content, File Name |
| Header zones | Header Left Text, Header Center Text, Header Right Text (each optional) |
| Footer zones | Footer Left Text, Footer Center Text, Footer Right Text (each optional) |
| Advanced parameters | 15 total, confirmed example Header Left - Color (conditional on matching text zone) |
| Output | document (Base64 workbook) + Success + ErrorMessage + Errors |
Common Questions
Industry Use Cases & Applications
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations & Manufacturing
- Financial Statements: Add headers with company name and reporting period
- Budget Reports: Insert confidentiality footers on budget documents
- Audit Documents: Apply audit date and version information in headers
- Expense Reports: Add submission date and approval status in footers
- Sales Reports: Add report title headers and generation date footers
- Pricing Sheets: Insert confidential pricing headers on rate cards
- Customer Data: Apply data protection notices in footers
- Marketing Analytics: Add branding headers to analytics reports
- Payroll Reports: Insert confidentiality headers on salary documents
- Employee Records: Add date and version footers to personnel files
- Benefits Enrollment: Apply open enrollment period headers
- Performance Reviews: Insert review period and confidentiality notices
- Inventory Reports: Add warehouse location and date headers
- Production Reports: Insert shift information and date footers
- Quality Reports: Apply quality standard references in headers
- Supply Chain Data: Add supplier confidentiality notices in footers