ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Spreadsheet functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a worksheet into a Spreadsheet control found in a window.
Note: To use this function, the Spreadsheet control must allow the management of several spreadsheets:
  • In the "Detail" tab of the control description window, check the "Allow multiple worksheets" option..
  • Through programming, use the MultiWorksheet property.
Example
// Ajout d'une feuille de calcul
nFeuille is int 
nFeuille = TBLR_MonTableur.AjouteFeuille()
// Sélection de la feuille de calcul
TBLR_MonTableur.FeuilleEnCours = nFeuille
Syntax
<Result> = <Spreadsheet control>.AddWorksheet([<Worksheet name>])
<Result>: Integer
Number of the worksheet created in the Spreadsheet control.
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Worksheet name>: Optional character string
Name of the worksheet to create. If this parameter is not specified, the worksheet is created with a default name ("WorksheetX"). This name:
  • appears in the tab used to select the worksheet (at the bottom of the Spreadsheet control).
  • is used to identify the worksheet in the formulas. For example, a formula using a cell in "Sheet2" might be: "=SUM(Sheet2!B4:D4)".
Remarks
  • The function fails and displays a WLanguage error in the following cases:
    • The Spreadsheet control does not manage several worksheets.
    • The name of the worksheet is invalid or it is already used by another worksheet.
  • This function can only be used on a Spreadsheet control found in a window.
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help