Cmdlet
Set-OfficeExcelFooter
Updates worksheet footer text, print flags or an image while retaining the header.
Syntax
Examples
Number printed pages without replacing the header.
ExcelSheet 'Data' { ExcelFooter -Right 'Page &P of &N' }Parameters
- -Center String
- Center section; Excel field codes such as &P and &N remain active.
- -DifferentFirstPage SwitchParameter
- Enable a first-page variant; explicitly false disables it without deleting authored variant text.
- -DifferentOddEven SwitchParameter
- Enable odd/even variants; omission retains the setting.
- -Document ExcelDocument
- Caller-owned workbook; omission uses the enclosing Excel content block.
- -Left String
- Left section; empty text clears it, omission preserves it.
- -NoAlignWithMargins SwitchParameter
- Disable alignment with page margins; explicitly false restores alignment.
- -NoScaleWithDocument SwitchParameter
- Disable scaling with the printed worksheet; explicitly false restores scaling.
- -PassThru SwitchParameter
- Emit the updated caller-owned worksheet.
- -Right String
- Right section; empty text clears it, omission preserves it.
- -Sheet OfficeSheetSelector
- Worksheet name, one-based position or native worksheet.
- -ImageHeight OfficeLength
- Physical image height; a bare number means points.
- -ImagePath String
- Literal local image file.
- -ImagePosition ExcelHeaderFooterPosition
- Image section; defaults to Right.
- Possible values:
Left,Center,Right - -ImageWidth OfficeLength
- Physical image width; a bare number means points.
- -ImageUrl Uri
- HTTP or HTTPS image URL; existing native remote-image policy applies.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.