Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example creates a workbook with two sheets, and provides a button for users to delete the second sheet.

C++

BOOL CAboutDlg::OnInitDialog()
{
    CDialog::OnInitDialog();
    //Set number of sheets
    m_Spread.SetSheetCount(2);
}

void CAboutDlg::OnClickFpbtn1()
{
    //Delete one sheet starting with the second sheet
    m_Spread.DeleteSheets(2, 1);
}

Visual Basic

Private Sub Form_Load()
    ' Set number of sheets
    fpSpread1.SheetCount = 2
End Sub

Private Sub Command1_Click()
    ' Delete one sheet starting with the second sheet
    fpSpread1.DeleteSheets 2, 1
End Sub

Copyright © GrapeCity, inc. All rights reserved.