CGrid:DeleteSheet
The DeleteSheet method deletes a sheet by its index. All information in the sheet is lost. The target sheet must be in the range 1 through GetNumSheets.
bSuccess = G:DeleteSheet( nIndex )
where
nIndex is the index of the sheet to be deleted. It must be in the range 1 to GetNumSheets.
bSuccess is the returned success code. On success it is true, otherwise false.
The following script creates a CGrid with 4 shewets, then deleted sheet 3:
|
-- new grid with 3 cols, 10 rows, 4 sheets |
|
-- result: Num Sheets = 4 |
|
-- Delete sheet 6 (not valid) |
|
-- result: Num Sheets = 4 |
|
-- Delete sheet 2 |
|
-- result: Num Sheets = 3 |