ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XLS file functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds or inserts a new worksheet into an Excel document. The added worksheet becomes the current worksheet.
Note: This document must be manipulated using a variable of type xlsDocument and be opened in write mode.
Example
MyXLSDocument is xlsDocument
MyXLSDocument = xlsOpen("C:\Temp\Example.xls", xlsWrite)
IF MyXLSDocument.NumberWorksheet() = 1 THEN
	MyXLSDocument.AddWorksheet("MyWorksheet 2")
	MyXLSDocument.Save()
END
Syntax
<Result> = <XLS document>.AddWorksheet(<Worksheet name> [, <Worksheet position>])
<Result>: Boolean
  • True is the worksheet was added,
  • False if an error occurs. To get more details on the error, use ErrorInfo.
If the addition is performed, the added worksheet becomes the current worksheet.
<XLS document>: xlsDocument variable
Name of the variable of type xlsDocument to be used.
<Worksheet name>: Character string
Name of the worksheet that must be added or inserted. This name can contain between 1 and 31 characters. This name is not case sensitive.
<Worksheet position>: Optional integer
Position of the worksheet that must be added (included between 1 and 255).
If this parameter is specified, the worksheet is inserted at the specified position.
If this parameter is specified, the worksheet is added after the existing worksheets.
Component: wd300xls.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help