1.1.12 OA_FindAddWorksheet


Description

Find a Worksheet in the current project from a book sheet range string, like [book2]sheet2. If not find, add a new one. If the current project contain book2, then add a sheet named sheet2 in book2. If not, create a new worksheet in a new created workbook using the specified book name and sheet name.

Connector Pane

OA FindAddWorksheet.jpg

Controls and Indicators

CI ref c.jpg Origin.IOApplication
CI err c.jpg Error In contains error information that occur before this VI or function runs.
CI string c.jpg Worksheet Name is the name of the worksheet to be found or added. It is a range string

eg.

  • [Book1]Sheet2: find or add Sheet2 in Book1
  • Book2 find the active sheet from Book2 or add Book2
  • Sheet2! find Sheet2 from active book or add Sheet2 to active book

You can use an empty string to get the active sheet from the active book, but if no active book or active book is not a workbook, then the output refnum for Origin.Worksheet will be invalid.

CI ref i.jpg Origin.IOApplication is a reference to Origin.ApplicationSI.
CI ref i.jpg Origin.Worksheet is a reference to Origin.Worksheet
CI err i.jpg Error Out contains error information.
Note: This VI is available since Origin 9.