Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CommandDescription          Examples       

layer -lw n

set worksheet write access flags

lay -lw hex(82);//set active sheet to protect data and structure

lay -lw;//protect everything

lay -lw 2;// protect only data

lay -lw hex(180);//no insert/del col/rows, no worksheet rename

lay -lw 0;//remove all the protections on the current sheet

layer -lt print out current protection flags 
page -lw nset workbook write access flags

 //the following will prepare the book for locking active sheet but allow analysis results added to book

lay -lw hex(582);//no del, no rename, no add/insert/move col/rows, no edit

page -lw hex(400);//no del book

 

//other examples

page -lw;//lock book and all sheets, nothing can be change changed and cannot delete book or sheets

page -lw hex(400);//prevent user deleting the book

page -lw; //lock the book completely, cannot even delete

page -lw hex(482); //lock delete, structure change and data edit

 page -lt print out the current protection flags 

...

Please note that you can only make Exclusion Zone modification when the sheet is unprotected. So to set the sheet up as a form, you should first add all the needed Exclusion Zones, then protect the sheet from medication modification with lay -lw hex(82); for example. 

...

The following is a listing of the currently supported doc commands control the Admin mode. Text inside square brackets indicateis optional.

...

CommandDescription     Examples        
doc -pwa [password]

Add Admin password password to the project. You will still need to login after adding password to turn on Admin mode.

When you do not specify a password, then "origin" is assumed. Not using password will help situation where security is not so much of a concern and not running the risk of forgetting the password used.

doc -pwa

doc -pwa test

doc -pw [password]login with password, if no Admin password added yet, error message will be shown

doc -pw;

doc -pw test;

doc -pwxlogout, once logout, cannot change anything related to protections 
doc -pwtalist all the book/sheets with protection turned on 
doc -pwr [password]remove password, if no password specified, then must login first to do so, otherwise must give correct passworddoc -pwr;

...

Code Block
// Import a sample file
newbook;
string fname$=system.path.program$+"Samples\Curve Fitting\Gaussian.dat";
impasc;
// Set password and login - change mypwd to your desired password string
doc -pwa mypwd;
doc -pw mypwd;
// Protect data sheet structure, prevent editing, deleting
lay -lw hex(482);
// Protect page from deletion
page -lw hex(400);
// logout
doc -pwx;
// Now you can save the OPJ and others can view data, graph, and also analyze
// Analysis results can go into new sheets, not new cols in same sheet

...