Print

This is the place to set options for a print output. Options can be set at the workbook level - setting default values for all sheets, and also at every sheet to set specific settings.

Examples

"print":{
    "paperSize": 0,
    "fit": [2,4],
    "header":{
        "right":{
            "text": "page: {page} of {total}"
        }
    },
    "footer":{
        "left":{
            "text": "{date} {time}"
        },
        "center":{
            "text": "{filepath} {filename} {sheet}",
            "bold": true
        }
    }
}

Implementations

Workbook

Sheet

Properties

name type description
fit array Fit sheet to page(s) in width and height when printed. [ pages width, pages height ]
When a sheet is too big for the targeted paper size, print it over multiple pages.

Array Items:
  width integer, minimum: 0
  length integer, minimun: 0
landscape boolean Toggle for document landscape orientation.
withGrid boolean Include cell grid when printing.
header object Set up a header.
Header and Footer
footer object Set up a footer.
Header and Footer
repeatRows integer Repeat these row(s) as header after each pagebreak.
Repeat single row.
minimum:0
array Set first row (starting with 0) and count of rows to repeat.

Array Items:
  start integer
  length integer
paperSize string Set paper size by Name or as Integer. 'Default' depends on the machine the template is processed on, this could also be different on server.
https://www.mbsplugins.eu/XLSheetGetPaper.shtml

0 DEFAULT
1 LETTER
2 LETTERSMALL
3 TABLOID
4 LEDGER
5 LEGAL
6 STATEMENT
7 EXECUTIVE
8 A3
9 A4
10 A4SMALL
11 A5
12 B4
13 B5
14 FOLIO
15 QUATRO
16 10x14
17 10x17
18 NOTE
19 ENVELOPE_9
20 ENVELOPE_10
21 ENVELOPE_11
22 ENVELOPE_12
23 ENVELOPE_14
24 C_SIZE
25 D_SIZE
26 E_SIZE
27 ENVELOPE_DL
28 ENVELOPE_C5
29 ENVELOPE_C3
30 ENVELOPE_C4
31 ENVELOPE_C6
32 ENVELOPE_C65
33 ENVELOPE_B4
34 ENVELOPE_B5
35 ENVELOPE_B6
36 ENVELOPE
37 ENVELOPE_MONARCH
38 US_ENVELOPE
39 FANFOLD
40 GERMAN_STD_FANFOLD
41 GERMAN_LEGAL_FANFOLD
integer
name type description
margin number Margin from header or footer cell to the outer bounds of paper. The unit is inches.
minimum:0
left object Section
center object Section
right object Section

Section

name type description
text string Text for header section. Combinable with placeholders:

{page}
{total}
{date}
{time}
{picture}
{filepath}
{filename}
{sheet}
format tags (start/stop):

{strike}
{sup}
{sub}
{underline}
{underlines}
{b}
{i}

Font for Section can be referenced or defined:

Section Font Reference

fontRef string Name of a Font Definition

Section Font Definition

name type description
fontName string Name of a Font face (e.g. 'Helvetica')
fontSize integer Font Size in point
bold boolean Font Style bold
italic boolean Font Style italic