-
-
Notifications
You must be signed in to change notification settings - Fork 36
binaryFromQuery
Julian Halliwell edited this page Sep 20, 2021
·
13 revisions
Returns a byte array of a spreadsheet object from a query. The query column names are included by default as a bold header row.
binaryFromQuery( data[, addHeaderRow [, boldHeaderRow [, xmlFormat [, streamingXml [, streamingWindowSize [, ignoreQueryColumnDataTypes [, datatypes ] ] ] ] ] ] ] )
-
data
query: the data you want to download
-
addHeaderRow
boolean default=true: whether to include the query column names as a header row -
boldHeaderRow
boolean default=true: whether to make the header row bold -
xmlFormat
boolean default=false: whether to create an XML spreadsheet (.xlsx) -
streamingXml
boolean default=false: whether to create a memory-efficient streaming XML spreadsheet -
streamingWindowSize
integer default=100: (positive integer greater than 0) the maximum number of rows that are kept in memory at once while populating a streaming spreadsheet, before being flushed to disk. -
ignoreQueryColumnDataTypes
boolean default=false: whether to ignore the query column data types (e.g.VarChar
) and auto-detect each cell type from the value. -
datatypes
struct: specify data types as keys and the columns they should apply to in your data as an array of column names or (positional) numbers. These types will override the query column types or auto-detection where possible. Possible data type keys are:string
,numeric
,date
,time
,boolean
,auto
. See addRows() for examples.
Chainable? No.
data = QueryNew( "First,Last","VarChar,VarChar",[ [ "Susi","Sorglos" ],[ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
binary = spreadsheet.binaryFromQuery( data );