GenerateXLSXFile (open)
Generate a XLSX file
Syntax
LOADLIB "wh::ooxml/spreadsheet.whlib";
RECORD FUNCTION GenerateXLSXFile(RECORD options)Parameters
RECORD optionsOptions
RECORD ARRAY columnsColumn to export
STRING columns.nameColumn name
BOOLEAN columns.storeutcSet to TRUE if the column's value is in UTC
STRING columns.titleColumn title
STRING columns.typeColumn type
STRING exporttitleExport title (base for filename and frame title)
RECORD ARRAY rowsRows to export.
STRING timezoneTimezone to use for datetime fields
Return value
RECORDWrapped blob containing the XLSX file
BLOB dataThe blob itself
STRING dominantcolorImage's dominant color as a #RRGGBB code, 'transparent' if the image is transparent. Only extracted if the extractdominantcolor option is enabled
STRING extensionThe proper or usual extension for the file's mimetype, if known to webhare. Either empty or a text starting with a dot ('.')
STRING filenameFilename of the wrapped blob
STRING hashUFS encoded SHA-256 hash of the file. Only calculated if the generatehash option is enabled
INTEGER heighImage height (in pixels)
STRING mimetypeThe mimetype for the file. If unrecognized, application/octet-stream
BOOLEAN mirroredTrue if this is a mirrored image
RECORD refpointReference point if set, default record otherwise
INTEGER refpoint.xX coordinate of reference point (in pixels)
INTEGER refpoint.yY coordinate of reference point (in pixels)
INTEGER rotationImage rotation in degrees (0,90,180 or 270)
INTEGER widthImage width (in pixels)
Examples
//Store my record array 'rows' to /tmp/regs.xlsx, generating default cellnames
StoreDiskFile("/tmp/regs.xlsx", GenerateXLSXFile(CELL[rows]).data);