GenerateXLSXFile (open)

Generate a XLSX file

Syntax

LOADLIB "wh::ooxml/spreadsheet.whlib";

RECORD FUNCTION GenerateXLSXFile(RECORD options)

Parameters

RECORD options

Options

RECORD ARRAY columns

Column to export

STRING columns.name

Column name

BOOLEAN columns.storeutc

Set to TRUE if the column's value is in UTC

STRING columns.title

Column title

STRING columns.type

Column type

STRING exporttitle

Export title (base for filename and frame title)

RECORD ARRAY rows

Rows to export.

STRING timezone

Timezone to use for datetime fields

Return value

RECORD

Wrapped blob containing the XLSX file

BLOB data

The blob itself

STRING dominantcolor

Image's dominant color as a #RRGGBB code, 'transparent' if the image is transparent. Only extracted if the extractdominantcolor option is enabled

STRING extension

The proper or usual extension for the file's mimetype, if known to webhare. Either empty or a text starting with a dot ('.')

STRING filename

Filename of the wrapped blob

STRING hash

UFS encoded SHA-256 hash of the file. Only calculated if the generatehash option is enabled

INTEGER heigh

Image height (in pixels)

STRING mimetype

The mimetype for the file. If unrecognized, application/octet-stream

BOOLEAN mirrored

True if this is a mirrored image

RECORD refpoint

Reference point if set, default record otherwise

INTEGER refpoint.x

X coordinate of reference point (in pixels)

INTEGER refpoint.y

Y coordinate of reference point (in pixels)

INTEGER rotation

Image rotation in degrees (0,90,180 or 270)

INTEGER width

Image width (in pixels)

Examples

//Store my record array 'rows' to /tmp/regs.xlsx, generating default cellnames
StoreDiskFile("/tmp/regs.xlsx", GenerateXLSXFile(CELL[rows]).data);