Example
The following example creates a Spread with multiple sheets and sets the color for a cell in a specific sheet.
C++
// Set number of sheets
spr->SetSheetCount(8);
// Set sheet
spr->SetSheet(1);
// Set color for cell on sheet 1
spr->SetColor(1,1,RGB(255,255,0),SPREAD_COLOR_NONE);
// The following example gets the sheet count
bool b;
char c[10];
char str[100];
short s;
b = spr->InsertSheets(1, 5);
if (b)
{
s = spr->GetSheetCount();
itoa(s, (LPSTR)c, 10);
strcpy(str, "Sheet insert complete. There are now ");
strcat(str, c);
strcat(str, " sheets in the workbook.");
AfxMessageBox(str);
}