OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

newbook


Contents

Brief Information

Create a new workbook or matrix book

Command Line Usage

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;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Desired Book Name name

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.

Number of Sheets sheet

Input

int

-1

Specifies the number of sheets in the workbook. -1 means number of sheets in the template will be used.

Template template

Input

string

"Origin"

Specifies the template to use.

Actual Book Name result

Output

string

bkname

Specifies the string to store the short name of the created workbook.

Create as Hidden hidden

Input

int

0

Specifies whether or not the new workbook should be hidden after it is created.

Name Option option

Input

int

lname

Specifies how to set the long name and short name of the workbook with the name variable.
Option list

  • lname:Long name only
    Sets only the long name of the workbook to the desired book name.
  • lsname:Long and Short name
    Sets both long name and short name of the workbook to the desired book name.
  • enumln:Enumerate Long Name to short name index
    Sets long name of the workbook to the desired book name, and enumerates it to the same as short name index.
New Matrix Book mat

Input

int

0

Option of matrix book or workbook.

Keep Sheet Name keep

Input

int

0

Specifies whether or not keep the sheet name in template. If no, default enumeration will be used.

Do not Create if Found chkname

Input

int

1

Check the name; do not create this newbook if it already exists.

Description

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.

Related X-Functions

newsheet