CGridCtrl:GetNumSheets, CGridView:GetNumSheets


The GetNumSheets method returns the number of sheets in the grid. Typically, grids are created with only 1 sheet. To add sheets after the grid is created, use the AddSheet method. To switch the grid to use a particular sheet, use the SelectSheet method.

Syntax

nSheets = CGridCtrl:GetNumSheets()

bullet.gif    Where nSheets is the number of sheets in the grid.

bullet.gif    On failure, 0 is returned.

Example

The following script returns the number of sheets in the grid window:

V = attach_gridview()

-- attach the top-most grid window to the script

G = new_gridctrl(V)

-- create a CGridCtrl for the window

nSheets = G:GetNumSheets()

-- return the number of sheets

Related Topics

CGridCtrl class

GetNumCols

GetNumRows

AddSheet

SelectSheet


Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.