|
|
|
|
|
xlsCurrentWorksheet (Function) In french: xlsFeuilleEnCours Used to find out and modify the current worksheet in an XLS file. Remarks: - In multi-sheet mode, the functions used to manage the XLS files always apply to the current worksheet. When the XLS file is opened, the 1st worksheet of the workbook is the current worksheet.
- This function has no effect in compatible mode.
FileIdentifier is int
FileIdentifier = xlsOpen("C:\My Documents\Test.XLS")
Worksheet is int = xlsCurrentWorksheet(FileIdentifier)
Info("The current worksheet is " + Worksheet)
FileIdentifier is int = xlsOpen("C:\My Documents\Test.XLS")
NbWorksheet is int = xlsNbWorksheet(FileIdentifier)
IF xlsCurrentWorksheet(FileIdentifier, NbWorksheet) = True THEN
Info("The current worksheet was modified.")
END
cMyXLSFile is xlsDocument
sMyFile is string = "File.xls"
cMyXLSFile = xlsOpen(sMyFile, xlsWrite)
IF ErrorOccurred = False THEN
Azz is int = xlsCurrentWorksheet(cMyXLSFile)
Info("Current worksheet in the Excel file: " + Azz)
IF xlsCurrentWorksheet(cMyXLSFile, 2) = True THEN
Info("The current worksheet was modified.")
Info(xlsData(cMyXLSFile, 11, 2))
ELSE
Error("The selected file does not include a second worksheet!")
END
ELSE
Error(ErrorInfo(errFullDetails))
END
xlsClose(cMyXLSFile)
Syntax
Finding out the current worksheet Hide the details
<Result> = xlsCurrentWorksheet(<XLS document>)
<Result>: Integer Index of the current worksheet. This value is included between 1 and xlsNbWorksheet. <XLS document>: xlsDocument variable Name of the xlsDocument variable to be used.
Modifying the current worksheet Hide the details
<Result> = xlsCurrentWorksheet(<XLS document> , <Worksheet number>)
<Result>: Boolean - True if the current worksheet was modified,
- False otherwise (if the worksheet specified in <Worksheet number> does not exist for example).
<XLS document>: xlsDocument variable Name of the xlsDocument variable to be used. <Worksheet number>: Integer Index of the new worksheet. This value is included between 1 and xlsNbWorksheet.
Finding out the current worksheet (syntax kept for backward compatibility with version 12) Hide the details
<Result> = xlsCurrentWorksheet(<XLS file identifier>)
<Result>: Integer Index of the current worksheet. This value is included between 1 and xlsNbWorksheet. <XLS file identifier>: Integer Identifier of the XLS file to handle, returned by xlsOpen.
Modifying the current worksheet (syntax kept for backward compatibility with version 12) Hide the details
<Result> = xlsCurrentWorksheet(<XLS file identifier> , <Worksheet number>)
<Result>: Boolean - True if the current worksheet was modified,
- False otherwise (if the worksheet specified in <Worksheet number> does not exist for example).
<XLS file identifier>: Integer Identifier of the XLS file to handle, returned by xlsOpen. <Worksheet number>: Integer Index of the new worksheet. This value is included between 1 and xlsNbWorksheet.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|