2.2.5 addsheet


Brief Information

Add a sheet to workbook or matrix book using a template

Additional Information

Minimum Origin Version Required: 8.0 SR6

Command Line Usage

1.addsheet book:=Book1 fname:=templates\analysis\Assays.ogw index:=2 active:=1 oname:=aa

2.addsheet book:=book1 fname:=origin.otw oname:=bb

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Book to Add Sheet book

Input

Page

<active>
Specify the workbook or matrix book to add worksheet or matrix.
Template Name fname

Input

string

fname$
Specify the template which is used to create new sheet(s). It can be a worksheet template (*.OTW), a matrix book templates (*.OTM), a workbook file (*.OGW) or a matrix file (*.OGM). If template file name does not include full path, we assume it is under <Origin Installation Folder> or <Origin User Folder>.
Sheet Index in Template index

Input

int

0
Specify which sheet of the template to be added. Note that the index of the first sheet is 1. If 0 is used, all sheets in the template will be added.
Activate Added Sheet active

Input

int

1
Specify whether to activate the added sheet
Name of Added Sheet oname

Output

string

sname$
Specify a variable to save the name of added sheet.

Description

The addsheet function is used to add worksheet(s) or matrix(es) to specified workbook or Matrix book with a designated template. You can choose to add one sheet or all sheets in the template.


Related X-Functions

newsheet