Activates the worksheet SheetName in the active workbook in the Microsoft Excel application. This worksheet will be placed in the workbook foreground.
The ReturnCode parameter will be set to "0" if the method was executed successfully, and to a value other than "0" in the event of a problem.
Syntax | |
CALL_METHOD NameExcelClientObject WKSH_ACTIVATE SheetName ReturnCode |
|
Parameters |
|
SheetName |
ALPHA(50) type (input parameter) |
ReturnCode |
NUM_BIN_4 type (output parameter) |
* At the beginning of the program
* Connecting to Excel
CALL_METHOD EXCEL_CLI APPL_CONNECT RETURN_CODE
* Opening an existing model of workbook to be updated
FILE_PATH = 'D:\production\client\obj\employees.xls'
CALL_METHOD EXCEL_CLI WKBK_OPEN FILE_PATH RETURN_CODE
* Saving as another workbook in order not to replace the model
FILE_PATH = 'D:\production\client\obj\employees_lst.xls'
CALL_METHOD EXCEL_CLI WKBK_SAVE_AS FILE_PATH RETURN_CODE
* Positioning in the Employees worksheet
SHEET_NAME = 'Employees'
CALL_METHOD EXCEL_CLI WKSH_ACTIVATE SHEET_NAME RETURN_CODE
Adds a worksheet to the active workbook in the Microsoft Excel application, according to the following parameters:
Position |
position of the worksheet to be added, |
SheetNamePos |
name of the sheet used for positioning; this must be completed if Position is set to "_EXL_POSITION_BEFORE" or "_EXL_POSITION_AFTER", |
NewSheetName |
name of the new worksheet, |
SheetType |
type of worksheet to be added to the new workbook. |
The ReturnCode parameter will be set to "0" if the method was executed successfully, and to a value other than "0" in the event of a problem.
Syntax | |||||||||||||
CALL_METHOD NameExcelClientObject WKSH_ADD Position SheetNamePos NewSheetName SheetType ReturnCode |
|||||||||||||
Parameters |
|||||||||||||
Position |
NUM_BIN_2 type (input parameter) Possible values:
|
||||||||||||
SheetNamePos |
ALPHA(50) type (input parameter) |
||||||||||||
NewSheetName |
ALPHA(50) type (input parameter) |
||||||||||||
SheetType |
NUM_BIN_2 type (input parameter)
|
||||||||||||
ReturnCode |
NUM_BIN_4 type (output parameter) |
Calculates the active worksheet in the Microsoft Excel application.
The ReturnCode parameter will be set to "0" if the method was executed successfully, and to a value other than "0" in the event of a problem.
Syntax | |
CALL_METHOD NameExcelClientObject WKSH_CALCULATE ReturnCode |
|
Parameters |
|
ReturnCode |
NUM_BIN_4 type (output parameter) |
Moves the active worksheet in the Microsoft Excel application, using the following parameters:
Position |
new position of the worksheet, |
SheetNamePos |
name of the sheet used for positioning; this must be completed if Position is set to "_EXL_POSITION_BEFORE" or "_EXL_POSITION_AFTER". |
The ReturnCode parameter will be set to "0" if the method was executed successfully, and to a value other than "0" in the event of a problem.
Syntax | |||||||||||
CALL_METHOD NameExcelClientObject WKSH_MOVE Position SheetNamePos |
|||||||||||
Parameters |
|||||||||||
Position |
NUM_BIN_2 type (input parameter) Possible values:
|
||||||||||
SheetNamePos |
ALPHA(50) type (input parameter) |
||||||||||
ReturnCode |
NUM_BIN_4 type (output parameter) |
Prints the pages in the active worksheet to Microsoft Excel's default printer according to the following parameters:
FromPage |
number of the first page to be printed, |
ToPage |
number of the last page to be printed, |
NbCopies |
number of copies to be printed. |
Any blank pages will be excluded from the page numbering scheme.
Syntax | |||||||
CALL_METHOD NameExcelClientObject WKBK_PRINT_OUT FromPage ToPage NbCopies ReturnCode |
|||||||
Parameters |
|||||||
FromPage |
NUM_BIN_2 type (input parameter) |
||||||
ToPage |
NUM_BIN_2 type (input parameter)
|
||||||
NbCopies |
NUM_BIN_2 type (input parameter) |
||||||
ReturnCode |
NUM_BIN_4 type (output parameter) |
Sets the background picture used for the active worksheet in the Microsoft Excel application in the file whose full path is specified in FileNamePath . This picture will not be printed when pages are printed out.
The ReturnCode parameter will be set to "0" if the method was executed successfully, and to a value other than "0" in the event of a problem.
Syntax | |
CALL_METHOD NameExcelClientObject WKSH_SET_BACKGROUND_PICTURE FileNamePath ReturnCode |
|
Parameters |
|
FileNamePath |
ALPHA(260) type (input parameter) |
ReturnCode |
NUM_BIN_4 type (output parameter) |
Sets the name ( SheetName ) of the active worksheet in the Microsoft Excel application. It must not have the same name as any other sheets in the workbook.
Syntax | |
CALL_METHOD NameExcelClientObject WKSH_SET_NAME SheetName ReturnCode |
|
Parameters |
|
SheetName |
ALPHA(50) type (input parameter) |
ReturnCode |
NUM_BIN_4 type (output parameter) |