Skip to main content

SetRightHeader

Sets the right part of the header used when the worksheet is printed.

Syntax​

expression.SetRightHeader(sText);

expression - A variable that represents an ApiPageSetup class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
sTextRequiredstringThe right header text (may contain formatting codes such as &P, &D).

Returns​

boolean

Example​

Add right text to the page header for printing in a spreadsheet.

// How do I put text on the right side of the header in a spreadsheet?

// Show a right header when printing a spreadsheet.

let worksheet = Api.GetActiveSheet();
let pageSetup = worksheet.GetPageSetup();
pageSetup.SetRightHeader("&D &T");