WorksheetPage
The WorksheetPage class provides methods and properties common to all internal Origin worksheet pages (windows). The Project class contains a collection of WorksheetPage objects.
An Origin C WorksheetPage object is a wrapper object that is a reference to an internal Origin worksheet page object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object.
The WorksheetPage class is derived from the Page, PageBase, and OriginObject classes from which it inherits methods and properties.
The Origin C Project class (Project.h) contains a collection of all worksheet pages in the open project file named WorksheetPages. Once accessed, a WorksheetPage object can be used to locate and access all layers (named Worksheets) within the Origin worksheet page (i.e. use the inherited Layers collection of the Page class). Each Worksheet (i.e. each layer of the worksheet page) contains a collection of all columns in the worksheet named Columns which can in turn be used to access the worksheet column properties and data object (or Dataset).
EX1
// Assumes a Worksheet containing at least one Column exists in Origin void WorksheetPage_ex1() { WorksheetPage wp = Project.WorksheetPages(0); // Get the first worksheet page from WorksheetPages collection if( wp ) // If wp IsValid... { Worksheet wks = wp.Layers(); // Get the active Worksheet from Layers collection if( wks ) // If wks IsValid... { Column col = wks.Columns(0); // Get first Column in Worksheet if( col ) // If col IsValid... { Dataset ds(col); // Get DataObject (Dataset) of column if( ds ) // If ds IsValid... { ds.SetSize(10); // Set size of data set for(int ii = 0; ii < 10; ii++ ) ds[ii]=2*ii+5; // Fill data set/column with values } } } } }
origin.h