Excel Print Setup

IronXL allows Print Setup to be programmatically defined to any Excel document. Giving granular control over a wide range of settings on how the document will be printed on a physical or PDF printer.

Document headers and footers can also be set, including the ability to "mail merge" variables:

  • &P: page numbers
  • &N: total number of pages
  • &D: current date
  • &T: current time
  • &Z&F: file path
  • &F: file name
  • &A: sheet name

These variables can be used directly in the string set to Footer property. For instance, to display page number at the bottom of all printed pages set workSheet.Footer.Center = "Page &P of &N".

This feature really give IronXL full control over spreadsheet.