-
-
Notifications
You must be signed in to change notification settings - Fork 36
setReadOnly
Julian Halliwell edited this page Sep 20, 2021
·
3 revisions
Prevent a workbook from being edited without a password. Only works with binary (.xls) files
setReadOnly( workbook, password )
-
workbook
spreadsheet object -
password
string
Chainable? Yes.
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 );