Create a new workbook or matrix book
1. newbook name:="ASCII Data";
2. newbook sheet:=0;
3. newbook name:="Experiment1" sheet:=4 hidden:=1;
4. newbook name:="curves" result:=bn$ option:=lsname;
5. newbook mat:=1;
Please refer to the page for additional option switches when accessing the x-function from script
Input
string
Specifies the desired name for the workbook. This name can be set to long name only or both long name and short name, depends on the option variable.
int
Specifies the number of sheets in the workbook. -1 means number of sheets in the template will be used.
Specifies the template to use.
Output
Specifies the string to store the short name of the created workbook.
Specifies whether or not the new workbook should be hidden after it is created (see String Register, %@N).
Specifies how to set the long name and short name of the workbook with the name variable. Option list
Option of matrix book or workbook.
Specifies whether or not keep the sheet name in template. If no, default enumeration will be used.
Check the name; do not create this newbook if it already exists. Setting chkname:=0 will create newbook and enumerate (i.e. newbook1, newbook2, etc.).
The newbook function creates a new workbook or matrix book. You can specify the number of sheets in the book, the book name and whether the workbook should be hidden. Note: If you have set the option variable to Long and Short name and specified a book name that coincides with the short name of an existing book, this X-Function will not create a new book, because two books cannot have the same short name.
// newbook is used when you need to create a new Workbook. // Begin with a new, empty folder pe_mkdir Example; pe_cd Example; // Repeat three times loop(ii,1,3) { // We only want one 'Results' workbook if( !exist(Results) ) { // Based on ORIGIN.OTW newbook name:=Results template:=origin sheet:=2 option:=1; // We name the Sheets layer1.name$ = QC; layer2.name$ = Standard; } // These names will enumerate newbook name:=Run option:=0 result:=bkname$ template:=bin chkname:=0; } win -s T; //Tile the windows horizontally
newsheet