OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
Skip Navigation Links
All BooksExpand All Books
Quick HelpExpand Quick Help
ProgrammingExpand Programming

4.21 FAQ-380 What is the notation for addressing data in workbooks and matrix books?

Last Update: 2/4/2015

To address a column in the active sheet of the active book, you can use the col() function. To address a specific cell, use [ ] brackets after the col(). For example:

col(LongName) =;  // both long name and short name acceptable

col(B)[5] = ;  // address a specific cell of a column

And you could also use the cell(i,j) function to address worksheet cells.

The following substitution notation is also supported to address cells:

%([BookName]SheetName, colNum, rowNum)
%([BookName]SheetName, colName, rowName)

In previous versions, we supported the following:

%(wksName, col, row)

Here are some examples:

//The active sheet of book1, column2, row 3
%(book1,2,3) = ;

//Sheet2 of book1, column2 row 3
%([book1]sheet2, 2, 3) = ;

Lastly, you can use the range notation:

[page long name]"sheet long name"!col(long name)

For example:

range r1 = [book1]sheet1!col(a);
range r2=[book1]sheet2!col(a);
r2 = r1;

Note: You cannot do the following: [book1]sheet2!col(a) = [book1]sheet1!col(a). You need to define range object and then do assignment as above.

Keywords:range, cross, reference, sheet, object, column, dataset


© OriginLab Corporation. All rights reserved.