Add Image Header Footer to Excel in Power Automate
PDF4me Add Image Header Footer to Excel action enables adding customizable image headers and footers to Excel documents in Power Automate with comprehensive positioning and formatting control. This powerful feature supports company logos, watermark images, branding elements, and visual stamps with full control over image placement (header/footer), position alignment (left, center, right), worksheet targeting (specific sheets or all sheets), and page margins, perfect for corporate branding and professional document presentation 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
- Simple Image Input: Use image file content from any source in your flow
- Header or Footer Placement: Choose whether to place images in document header or footer sections
- Position Control: Align images left, center, or right within header/footer area
- Worksheet Targeting: Apply images to specific worksheets by name or index, or all worksheets
- Margin Customization: Configure top, bottom, left, and right page margins in centimeters
Parameters
Complete list of parameters for the Add Image Header Footer to Excel action. Configure these parameters to control image formatting.
Important: Parameters marked with an asterisk (***) are required.
| 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 |
| Image Content*** | Base64 | Source Image File Content • Map image file from previous action output • Supports image files from SharePoint, OneDrive, email attachments • Can be dynamically retrieved from flow variables • Must be valid image file (PNG, JPG, JPEG, GIF formats) | [File Content from Get File] |
| Is Header | Boolean | Placement Selection • True - Add image to document header • False - Add image to document footer • Default: true • Controls vertical placement | true |
| Position | String | Horizontal Alignment • Left - Align image to left edge • Center - Center image horizontally • Right - Align image to right edge • Default: "Center" • Case-insensitive | Center |
| Worksheet Names | Array (string[]) | Target Worksheet Names • Array of worksheet names to apply image to • Example: ["Sheet1", "Summary", "Report"] • If both WorksheetNames and WorksheetIndexes are empty, applies to all worksheets • Worksheet names must match exactly | ["Sheet1", "Report"] |
| Worksheet Indexes | Array (int[]) | Target Worksheet Indexes • Array of worksheet indexes (1-based numbering) • Example: [1, 3, 5] for first, third, and fifth sheets • If both WorksheetNames and WorksheetIndexes are empty, applies to all worksheets • Index starts at 1, not 0 | [1, 2] |
| Top Margin | Number (double) | Top Page Margin • Top page margin in centimeters • Default: 1.9 cm • Controls spacing from top edge • Affects header placement | 1.9 |
| Bottom Margin | Number (double) | Bottom Page Margin • Bottom page margin in centimeters • Default: 1.9 cm • Controls spacing from bottom edge • Affects footer placement | 1.9 |
| Left Margin | Number (double) | Left Page Margin • Left page margin in centimeters • Default: 1.9 cm • Controls spacing from left edge • Affects overall page layout | 1.9 |
| Right Margin | Number (double) | Right Page Margin • Right page margin in centimeters • Default: 1.9 cm • Controls spacing from right edge • Affects overall page layout | 1.9 |
Note: FileContent, FileName, and ImageContent are always required. If both WorksheetNames and WorksheetIndexes are empty or null, the image will be applied to all worksheets in the Excel file.
Output
The PDF4me Add Image Header Footer to 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 image header/footer applied |
| 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 Image Header/Footer]",
"Success": true,
"ErrorMessage": null,
"Errors": []
}
Error Response Example:
{
"document": null,
"Success": false,
"ErrorMessage": "Invalid image format",
"Errors": [
{
"Code": "IMAGE_ERROR",
"Message": "The provided image format is not supported"
}
]
}
Power Automate Flow Usage
Use formatted Excel files in subsequent actions:
- Email Distribution: Attach branded Excel documents with logo headers to Outlook emails
- SharePoint Publishing: Upload professionally branded Excel files to document libraries
- Report Generation: Create reports with company logos and watermarks
- Archive Storage: Store branded Excel files in OneDrive or Azure Blob
- Client Delivery: Send professionally formatted Excel documents with corporate branding externally
- Further Processing: Convert branded Excel to PDF or apply additional formatting
Common Error Messages
Understanding and troubleshooting errors helps ensure smooth Excel image header/footer insertion 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 |
| "Image content is empty" | ImageContent is null | Provide valid image content from file |
| "Invalid worksheet selection" | Worksheet names/indexes don't exist or are out of range | Use existing worksheet names or valid indexes (1-based) |
| "Available worksheets in workbook (X total)" | Informational message shown when worksheet selection validation fails | Review worksheet names/indexes and use valid values from the X available worksheets |
Workflow Examples
The PDF4me Add Image Header Footer to Excel action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Corporate Branding
- Confidential Watermark
- Client Deliverables
- Financial Reports
Automated Corporate Logo Header Workflow
Transform your document branding with automated logo insertion in Excel reports:
Complete Workflow Steps:
- Trigger: Scheduled trigger - weekly report generation every Monday at 8 AM
- Get Excel Report: Retrieve weekly performance report from SharePoint
- Get Logo Image: Fetch company logo from SharePoint image library
- Add Logo Header: Insert logo image in header with center alignment
- Set Margins: Apply standard 1.9 cm margins for professional appearance
- Apply to All Sheets: Target all worksheets in the workbook
- Email Distribution: Send branded report to management team
- Archive: Store branded report in corporate reports library
Business Benefits:
- Brands 52 weekly reports annually with corporate logo automatically
- Ensures consistent branding across all Excel documents
- Eliminates manual logo insertion saving 10 minutes per report
- Enhances professional image with automated branding
Automated Confidential Watermark Footer Workflow
Streamline your document security with automated watermark image insertion:
Complete Workflow Steps:
- Trigger: Sensitive Excel file uploaded to confidential SharePoint folder
- Get Document: Retrieve Excel file from secure library
- Get Watermark Image: Fetch "Confidential" watermark image from assets
- Add Watermark Footer: Insert watermark in footer with center position
- Target Specific Sheets: Apply to Sheet1 and Summary sheets only
- Set Custom Margins: Apply 2.5 cm margins for watermark visibility
- Email Team: Send watermarked document to authorized users
- Secure Archive: Store marked document in compliance library
Business Benefits:
- Watermarks 150+ confidential Excel files monthly automatically
- Prevents unauthorized distribution with visible security marking
- Ensures compliance with data protection policies
- Reduces manual watermarking time by 95%
Automated Client Deliverable Logo Branding Workflow
Optimize your client deliverable branding with automated logo headers:
Complete Workflow Steps:
- Trigger: Project deliverable marked as "Final" in project management system
- Get Excel Deliverable: Retrieve final Excel file from project folder
- Get Client Logo: Fetch client co-branding logo from assets library
- Add Company Logo Header: Insert company logo aligned right
- Add Client Logo Header: Insert client logo aligned left (separate action)
- Target Report Sheets: Apply to worksheets named "Executive Summary" and "Analysis"
- Email Client: Send dual-branded Excel to client stakeholders
- Archive Final: Store branded version in client deliverables folder
Business Benefits:
- Brands 75+ client deliverables monthly with dual logo headers
- Maintains professional co-branded appearance
- Strengthens client relationships with personalized branding
- Saves 20 minutes per deliverable in manual formatting
Automated Financial Report Logo Header Workflow
Enhance your financial reporting with automated logo and branding:
Complete Workflow Steps:
- Trigger: Scheduled monthly financial close on 5th at 9 AM
- Get Financial Report: Retrieve monthly P&L Excel report from finance system
- Get Company Logo: Fetch corporate logo from SharePoint assets
- Add Logo Header: Insert logo in header with left alignment
- Set Financial Margins: Apply 1.5 cm margins for compact layout
- Target Financial Sheets: Apply to worksheets with indexes [1, 2, 3] (P&L, Balance Sheet, Cash Flow)
- Email CFO: Distribute branded report to finance leadership
- Archive Secure: Store in finance reports archive with retention policy
Business Benefits:
- Brands 12 critical financial reports annually automatically
- Ensures consistent professional appearance for board presentations
- Adds corporate identity to sensitive financial documents
- Maintains compliance with corporate branding standards
Industry Use Cases & Applications
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations & Manufacturing
- Healthcare & Medical
- Legal & Professional Services
Finance & Accounting Use Cases
- Financial Statements: Add company logo headers to quarterly reports
- Budget Reports: Insert department logos on budget worksheets
- Audit Documents: Apply audit firm logo watermarks in footers
- Expense Reports: Add corporate logo headers for expense submissions
Sales & Marketing Use Cases
- Sales Reports: Insert company branding logos on weekly sales reports
- Pricing Sheets: Add logo headers to customer pricing documents
- Marketing Reports: Apply campaign logos to analytics reports
- Customer Presentations: Add client co-branding logos to deliverables
Human Resources Use Cases
- Payroll Reports: Insert company logo headers on salary documents
- Employee Records: Add HR department logo to personnel templates
- Benefits Enrollment: Apply benefits provider logos to enrollment sheets
- Performance Reviews: Add corporate branding to review templates
Operations & Manufacturing Use Cases
- Inventory Reports: Insert warehouse location logos on inventory sheets
- Production Reports: Add production facility logos to manufacturing reports
- Quality Reports: Apply quality certification logos in headers
- Supply Chain Reports: Add vendor logos to procurement documents
Healthcare & Medical Use Cases
- Patient Reports: Add hospital or clinic logo headers to patient data
- Lab Results: Insert laboratory logo branding on test result sheets
- Insurance Claims: Apply insurance provider logos to claims documents
- Medical Records: Add facility branding to health information sheets
Legal & Professional Services Use Cases
- Client Reports: Insert law firm logo headers on client deliverables
- Case Documents: Add practice area logos to legal case files
- Contract Templates: Apply firm branding to contract worksheets
- Billing Statements: Insert company logo on legal billing reports