-
-
Notifications
You must be signed in to change notification settings - Fork 42
write
Julian Halliwell edited this page Dec 15, 2015
·
16 revisions
Write a spreadsheet object to a file.
write( workbook, filepath[, overwrite, password ] )
##Required arguments
-
workbookspreadsheet object -
filepathstring: the absolute path of the file to be written.
##Optional arguments
-
overwriteboolean default=false: whether to overwrite an existing file -
passwordstring: if supplied the file will be encrypted and require the password to be opened. Only works with XML format (.xlsx) spreadsheets. Also not all spreadsheet programs support the encryption used.
##Example
data = QueryNew( "First,Last","VarChar,VarChar",[ [ "Susi","Sorglos" ],[ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
path = "C:/temp/test.xls";
spreadsheet.write( workbook,path );