Skip to content
Julian Halliwell edited this page Mar 3, 2021 · 5 revisions

Convert a query to a CSV string.

queryToCsv( query[, includeHeaderRow[, delimiter ] ] )

Required arguments

  • query query

Optional arguments

  • includeHeaderRow boolean default=false: whether the query columns should be included as the first row of the CSV
  • delimiter string default=",": the single delimiter used in the CSV to separate the fields. For tab delimited data, use \t or tab or #Chr( 9 )#.

Examples

data = QueryNew( "First,Last", "VarChar,VarChar", [ [ "Susi","Sorglos" ], [ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
csv = spreadsheet.queryToCsv( data );
Clone this wiki locally