Skip to main content

SetDifferentFirstPageHeaderFooter

Sets whether a different header and footer is used on the first printed page.

Syntax​

expression.SetDifferentFirstPageHeaderFooter(bDifferent);

expression - A variable that represents an ApiPageSetup class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
bDifferentRequiredbooleanSpecifies whether a different header and footer is used on the first page.

Returns​

boolean

Example​

Use a different header and footer on the first printed page in a spreadsheet.

// How do I set a separate header/footer for the first page when printing in a spreadsheet?

// Enable a distinct first-page header and footer for printing in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let pageSetup = worksheet.GetPageSetup();
pageSetup.SetDifferentFirstPageHeaderFooter(true);