Skip to content
Julian Halliwell edited this page Mar 25, 2021 · 6 revisions

Adds a header to a spreadsheet which will display when printed. Text can be provided for the left, centre and right of the header.

setHeader( workbook [, leftHeader [, centerHeader [, rightHeader ] ] ] )

Required arguments

  • workbook spreadsheet object

Optional arguments

  • leftHeader string: text to place on the left hand side of the header.
  • centerHeader string: text to place in the centre of the header.
  • rightHeader string: text to place on the right of the header.

Note

Headers can include formatting codes allowing styles and dynamic values such as page numbers to be used in headers.

Example 1

spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.setHeader( workbook=workbook, centerHeader="ACME Ltd" );

Example 2

spreadsheet.setHeader( workbook=workbook, rightHeader="Page &P of &N" ); // Page 1 of 1 will be printed in the right hand header

Clone this wiki locally