-
-
Notifications
You must be signed in to change notification settings - Fork 37
setReadOnly
Julian Halliwell edited this page Dec 15, 2015
·
3 revisions
Prevent a workbook from being edited without a password. Only works with binary (.xls) files
setReadOnly( workbook, password )
##Required arguments
-
workbook
spreadsheet object -
password
string
##Example
data = QueryNew( "First,Last","VarChar,VarChar",[ [ "Susi","Sorglos" ],[ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.setReadOnly( workbook,"secret" );
path = "C:/temp/test.xls";
spreadsheet.write( workbook,path );