Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example creates a workbook with two sheets, sets the sheet names, sets the active sheet, and sets a cell type for a cell in the second sheet.

C++

// Set number of sheets
m_Spread.SetSheetCount(2);
// Set sheet names
m_Spread.SetSheet(1);
m_Spread.SetSheetName("Tab A");
m_Spread.SetSheet(2);
m_Spread.SetSheetName("Tab B");
// Set active sheet
m_Spread.SetActiveSheet(2);
// Set cell type to check box on sheet 2
m_Spread.SetSheet(2);
m_Spread.SetCol(1);
m_Spread.SetRow(1);
m_Spread.SetCellType(CellTypeCheckBox);

Visual Basic

' Set number of sheets
fpSpread1.SheetCount = 2
' Set sheet names
fpSpread1.Sheet = 1
fpSpread1.SheetName = "Tab A"
fpSpread1.Sheet = 2
fpSpread1.SheetName = "Tab B"
' Set active sheet
fpSpread1.ActiveSheet = 2
' Set cell type to check box on sheet 2
fpSpread1.Col = 1
fpSpread1.Row = 1
fpSpread1.CellType = CellTypeCheckBox

Copyright © GrapeCity, inc. All rights reserved.