TdxCustomSpreadSheet.AddSheet(string,TdxSpreadSheetCustomViewClass) Method
Adds a new empty worksheet to the current document.
#Declaration
function AddSheet(const ACaption: string = ''; AViewClass: TdxSpreadSheetCustomViewClass = nil): TdxSpreadSheetCustomView;
#Parameters
Name | Type | Description |
---|---|---|
ACaption | string | Optional. The created worksheet’s caption. The The specified caption’s length (in characters) should not exceed the dx The caption length limitation ensures compatibility with supported popular spreadsheet document formats. If you omit this parameter, the function automatically generates a name that consists of the |
AView |
Tdx |
Optional. Specifies the created worksheet’s type (the class-reference to a terminal Tdx If you omit this parameter, the function creates a Tdx Note In v24. |
#Returns
Type | Description |
---|---|
Tdx |
The created worksheet. Tip You need to cast the returned object to the actual worksheet class (a terminal Tdx |
#Remarks
Call the AddSheet
functions to add new worksheets to the current spreadsheet document. The created worksheet is accessible through Sheets and VisibleSheets properties; the active worksheet does not change.
#End-User Functionality
A user can click the New Worksheet button or press the Shift+F11 keystroke to create a new worksheet with an automatically generated name.
#UI Command/Action
In addition, you can create the InsertSheet user command (action object) and link it to a UI element in your application. The automatic Ribbon/Toolbar UI generator creates this command and associates it with the corresponding Ribbon or toolbar item.