Workbook

Represents the Excel workbook, a file containing one or more sheets. Also holds format and style related definitions as well as picture and value catalogs.

Examples

{
    "filename": "daily.xlsx",
    "columnWidth": -1,
    "formats": {
        "emphasize-blue": {
            "italic": true,
            "border": "double",
            "alignH": 2,
            "backgroundColor": {
                "name": "aqua"
            }
        }
    },
    "pictures": {
        "path": "/usr/local/share/excel/pictures",
        },
    "values": {
        "numberToday": 8,
        "partnerData": [
            ["ARE", 50, "UK"],
            ["KLF", 89, "NVL"],
            ["OPE", 46, "FRA"]
        ]
    },
    "sheets": [
        {...},
        {...},
        {...}
    ]
}

Properties

name type description
colors object Can be defined by colorName or colorRgb.
Color
fonts object Add Font definitions by specifying a unique Name
Font
formats object Add named formats that can be referenced with "formatRef"in columns, rows and cells.
pictures object picture name as ref and path as field reference or file path
add picture to catalog by path or as base64
pictures.path string system path, shortcuts are supported (e.g. 'desktop/logo.jpeg')
filename string Specify output file name. Otherwise YYMMDD_hhmmss.xslx will be used as default.
location string folder path ('desktop/exports') or field reference (e.g. FxReports::a_container_[2])
default: desktop/fx-exports
sheets array Array of sheets. This array can be used if more than one sheet is defined.
Sheet
columns array Array of Columns
minItems:1
Column
rows array Array of Rows, starting from top if not specified by Position.
Data Rows are repeated regarding to their input.
Row
cells array Array of Cells.
Cell
columnWidth integer Set default Column Width for (all Sheets)

Adjust column width to the cells' content using `-1` as value.
minimum:-1
display object Specify values for displayed spreadsheet.
Sheet.display
print object Option defining the print settings.
Print
format object Format Options
Format
formatRef string Reference to a named format.
split boolean OR array deprecated - use display.freeze
Sheet
filters object Sets sheet filter
filters.autoFilter boolean Sets sheet auto filter
values object Values that can be referenced in the template.
values.scalar stringData for cells.
integer
number
boolean
null
values.array array Data for Rows

can contain:
Object(s)
Array(s) of Object(s)