PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 worksheets:
  • In the window editor: In the "Details" tab of the description window of control, check "Allow the management of several worksheets".
  • By programming, use ..MultiWorksheet.
Example
// Add a worksheet
nWorksheet is int
nWorksheet = SpreadsheetAddWorksheet(PSHEET_MySpreadsheet)
// Select the worksheet
PSHEET_MySpreadsheet..CurrentWorksheet = nWorksheet
Syntax
<Result> = SpreadsheetAddWorksheet(<Spreadsheet Control> [, <Worksheet Name>])
<Result>: Integer
Number of the worksheet created in the Spreadsheet control.
<Spreadsheet Control>: Control name
Name of Spreadsheet control to use.
<Worksheet Name>: Optional character string (with quotes)
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 that is using a cell of "Worksheet2" can be: "=SUM(Worksheet2!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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment