Skip to main content

Add Image Header Footer to Excel in Power Automate

PDF4me Add Image Header Footer to Excel is a Power Automate action that inserts a logo, watermark, or branding image into an Excel worksheet's header or footer section. Use it to stamp a company logo on weekly reports, mark confidential files with a security image, or co-brand client deliverables, without opening Excel manually.

What this action does

PDF4me Add Image Header Footer to Excel maps an image file into a workbook's header or footer, aligned left, center, or right, on specific worksheets or the whole file. Page margins around the image are configurable in centimeters via Advanced parameters.

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 image formatting requests securely.

Important Facts You Should Not Miss​

IsHeader is a Yes/No dropdown, not free text
The connector panel renders IsHeader as a Yes/No dropdown (default Yes), and Image Position as a Left/Center/Right dropdown (default Center). Both are dropdown selections in the live UI, not boolean or free-text fields.
7 advanced parameters for margins and targeting
The Advanced parameters panel shows "Showing 5 of 7": Top Margin, Bottom Margin, Left Margin, and Right Margin (each in centimeters) are confirmed visible, alongside the Worksheet Names, Worksheet Indexes, and Culture Name targeting fields common to this connector's Excel actions.
Empty worksheet selectors mean every sheet
If both Worksheet Names and Worksheet Indexes are left empty, the image is applied to every worksheet in the workbook in a single run.
Power Automate PDF4me Add Image Header Footer action configured with File Content mapped, File Name add_header_sample_file.xlsx, Image Content mapped, Image Position Center, IsHeader Yes, and Advanced parameters showing 5 of 7 with Top Margin 5, Bottom Margin 5, Left Margin 1.9, Right Margin 1.9

Map File Content, File Name, and Image Content, then choose Image Position and IsHeader placement.

Parameters​

Required: File Content, File Name, and Image Content. Image Position and IsHeader have working defaults. Margins and worksheet targeting are conditional advanced parameters.

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 NameRequiredExcel filename including extension (.xlsx or .xls), used for processing and output identification.add_header_sample_file.xlsx
Image ContentRequiredBase64 content of the logo or branding image, mapped from SharePoint, OneDrive, or an email attachment. PNG, JPG, JPEG, or GIF.[File Content from Get file content]
Image PositionOptionalHorizontal alignment within the header/footer zone: Left, Center, or Right. Defaults to Center.Center
IsHeaderOptionalYes places the image in the header, No places it in the footer. Defaults to Yes.Yes
Top MarginConditionalAdvanced parameter. Top page margin in centimeters, controls spacing from the top edge and affects header placement.5
Bottom MarginConditionalAdvanced parameter. Bottom page margin in centimeters, controls spacing from the bottom edge and affects footer placement.5
Left MarginConditionalAdvanced parameter. Left page margin in centimeters, controls overall page layout spacing.1.9
Right MarginConditionalAdvanced parameter. Right page margin in centimeters, controls overall page layout spacing.1.9
Worksheet NamesConditionalAdvanced parameter. List of worksheet names to target. Leave empty along with Worksheet Indexes to apply to every sheet.["Sheet1", "Report"]
Worksheet IndexesConditionalAdvanced parameter. List of 1-based worksheet indexes to target. Combines with Worksheet Names if both are set.[1, 2]
Culture NameConditionalAdvanced parameter. Culture/locale code for processing, for example en-US or de-DE. Blank uses the invariant culture.en-US

Note: If both Worksheet Names and Worksheet Indexes are empty or null, the image is applied to every worksheet in the workbook.

Output Fields​

FieldTypeWhat it contains
documentBase64The Excel workbook with the image header/footer applied.
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.
Image content is emptyImage Content is null or empty.Provide valid image content from a prior action.
Invalid worksheet selectionWorksheet names or indexes don't exist or are out of range.Use existing worksheet names or valid 1-based indexes.
Available worksheets in workbook (X total)Informational message shown when worksheet selection validation fails.Review worksheet names/indexes and use a valid value from the X available worksheets.
  1. Add PDF4me → Excel - Add Image Header Footer to your Power Automate flow.
  2. Map File Content and File Name from a previous action (SharePoint, OneDrive, or Get file content).
  3. Map Image Content from the logo, watermark, or branding image file.
  4. Set IsHeader to Yes for a header or No for a footer, and choose Image Position: Left, Center, or Right.
  5. Expand Advanced parameters to set Top, Bottom, Left, and Right Margin, or target specific Worksheet Names/Worksheet Indexes. Run the flow, the branded workbook returns as document.

Typical Setups​

Workflow ExamplesCommon Power Automate flow patterns using Add Image Header Footer.
Weekly report logo branding
  1. A scheduled flow triggers every Monday morning.
  2. Get file content retrieves the weekly performance report from SharePoint.
  3. Add Image Header Footer inserts the company logo, IsHeader Yes, Image Position Center, Worksheet Names and Worksheet Indexes left empty to cover every sheet.
  4. The branded report is emailed to management and archived.
Confidential watermark footer
  1. A flow triggers when a sensitive Excel file lands in a restricted SharePoint folder.
  2. Get file content retrieves the workbook, and a "Confidential" stamp image is fetched from assets.
  3. Add Image Header Footer sets IsHeader No, Image Position Center, targeting Worksheet Names ["Sheet1", "Summary"] only.
  4. The stamped file is emailed to authorized reviewers only.
Client co-branded deliverable
  1. A flow triggers when a project deliverable is marked Final.
  2. Add Image Header Footer inserts the internal company logo, Image Position Right, IsHeader Yes.
  3. A second Add Image Header Footer call inserts the client's logo, Image Position Left, on the same worksheets.
  4. The dual-branded workbook is sent to the client stakeholder.

Practical Tips​

IsHeader and footer share the same margin controls
Top and Bottom Margin affect header and footer placement respectively regardless of the IsHeader setting, so adjust both if you plan to add separate header and footer images in sequence.
Chain two calls for both header and footer
One action call places the image in either the header or the footer, not both. Chain two Add Image Header Footer actions, one with IsHeader Yes and one with IsHeader No, to brand both zones in a single flow.
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.
Test margin values on a copy first
Margins that are too small can cause the image to overlap the first row of data. Test with representative worksheet content before deploying to a production report.
Branch on Success before continuing
Add a Condition on Success after this action so a failed image insertion does not pass a partially branded workbook further down the flow.

Cheat Sheet​

FieldValue
ActionExcel - Add Image Header Footer
Required fieldsFile Content, File Name, Image Content
Placement fieldsImage Position (Left/Center/Right, default Center), IsHeader (Yes/No, default Yes)
Advanced parameters7 total: Top/Bottom/Left/Right Margin (cm), Worksheet Names, Worksheet Indexes, Culture Name
Outputdocument (Base64 workbook) + Success + ErrorMessage + Errors

Common Questions​

How do I add a logo image to an Excel header in Power Automate?+
Add the PDF4me Add Image Header Footer action, map the workbook into File Content and the logo file into Image Content, set IsHeader to Yes, and choose an Image Position of Left, Center, or Right. Leave Worksheet Names and Worksheet Indexes empty to apply the logo to every sheet.
Can I place the image in the footer instead of the header?+
Yes. Set IsHeader to No to place the image in the footer section instead. The same Image Position and margin controls apply to both header and footer placement.
Can I add the image to only specific worksheets?+
Yes. Expand Advanced parameters and list Worksheet Names or Worksheet Indexes for the sheets to target. Leaving both empty applies the image to every worksheet in the workbook. See Microsoft's guide to <a href="https://support.microsoft.com/en-us/office/add-a-watermark-in-excel-a372182a-d733-484e-825c-18ddf3edf009" target="_blank" rel="noopener noreferrer">adding images to Excel worksheets</a> for how Excel scopes header/footer content per sheet.
What image formats does this action accept?+
The action accepts PNG, JPG, JPEG, and GIF image content mapped from a prior Get file content step, SharePoint, OneDrive, or an email attachment.
What do the margin parameters control?+
Top, Bottom, Left, and Right Margin, each in centimeters, are advanced parameters that control the page margins around the header/footer area, which affects how much space the inserted image has before it overlaps worksheet content. 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 page margins interact with header/footer sizing.

Industry Use Cases & Applications​

  • Financial Statements: Add company logo headers to quarterly reports
  • Audit Documents: Apply audit firm logo watermarks in footers
  • Expense Reports: Add corporate logo headers for expense submissions

Same Task on Other Platforms​

Get Help​