Products Downloads


French version


 

Calculates all the open workbooks 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 APPL_CALCULATE ReturnCode

Parameters

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Connects the Visual Adelia application to the Microsoft Excel application.

If the Microsoft Excel application is not already running on the workstation, it will be started but remain unseen.

If the application is already connected, the method will have no effect.

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 APPL_CONNECT ReturnCode

Parameters

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

 

 

Connects the Visual Adelia application to the Microsoft Excel application.

If the NewExcelAppli parameter is set to *TRUE, a new Microsoft Excel process opens, to which the Visual Adelia application connects.

If the NewExcelAppli parameter is set to *FALSE, the Visual Adelia application connects either to the Microsoft Excel application (if any) running on the workstation, or to a new Microsoft Excel process.

If the process is not already running on the workstation, the Microsoft Excel application is started but remains unseen.

 

The ExcelStarted parameter is *TRUE if the Microsoft Excel process to which the Visual Adelia application connects is already running; otherwise it is *FALSE.

If the Visual Adelia application is already connected, the method will have no effect and the ExcelStarted parameter is set to *TRUE.

 

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 APPL_CONNECT_EX NewExcelAppli ExcelStarted ReturnCode

Parameters

NewExcelAppli

BOOL type (input parameter)

ExcelStarted

BOOL type (output parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Disconnects the Visual Adelia application from the Microsoft Excel application.

If the Microsoft Excel application was only used via method calls made from the Visual Adelia application, it will be terminated.

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 APPL_DISCONNECT ReturnCode

Parameters

ReturnCode

NUM_BIN_4 type (output parameter)

* When exiting the window

* the workbook is closed without saving changes

SAVE_CHANGES = *FALSE

CALL_METHOD EXCEL_CLI WKBK_CLOSE SAVE_CHANGES -

FILE_PATH RETURN_CODE

VISIBLE = *FALSE

CALL_METHOD EXCEL_CLI APPL_SET_VISIBLE VISIBLE RETURN_CODE

CALL_METHOD EXCEL_CLI APPL_DISCONNECT RETURN_CODE

*

TERMINATE

 

 

Instructs the Microsoft Excel application whether or not it is to display alert or warning messages when certain methods are called.

If DisplayAlerts is set to "*FALSE", Microsoft Excel will use the default responses and will not initiate a dialog with the user, thereby interrupting the execution of the method. If this is not the case, Microsoft Excel will display a dialog box and indicate that it expects a reply by causing its title bar and its taskbar icon to flash.

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 APPL_DISPLAY_ALERTS DisplayAlerts ReturnCode

Parameters

DisplayAlerts

BOOL type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Sets whether or not the user can perform actions in the Microsoft Excel application, according to the value of the GrantedInteraction parameter.

If interactions are not enabled, Microsoft Excel will not react to events returned by the mouse or keyboard.

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 APPL_ENABLE_INTERACTION GrantedInteraction ReturnCode

Parameters

GrantedInteraction

BOOL type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

Note: This method is not implemented by the Cloud generator.

 

Sets whether or not Microsoft Excel is to update its display, according to the value of the GrantedUpdating parameter.

This method can be useful, letting you save time by freezing the screen while a series of methods are run.

Syntax

CALL_METHOD NameExcelClientObject APPL_ENABLE_SCREEN_UPDATING GrantedUpdating ReturnCode

Parameters

GrantedUpdating

BOOL type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

Note: This method is not implemented by the Cloud generator.

 

Sets the visibility of the Microsoft Excel application, according to the value of the Visible parameter.

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 APPL_SET_VISIBLE Visible ReturnCode

Parameters

Visible

BOOL type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

Note: This method is not implemented by the Cloud generator.

 

* When exiting the window

* the Visual Adelia program connects to Excel

CALL_METHOD EXCEL_CLI APPL_CONNECT RETURN_CODE

* Excel is made visible

VISIBLE = *TRUE

CALL_METHOD EXCEL_CLI APPL_SET_VISIBLE VISIBLE RETURN_CODE

* Opening the XLS workbook model to be filled in with data

WorkbookName = 'D:\production\client\obj\weight.xls'

CALL_METHOD EXCEL_CLI WKBK_OPEN WORKBOOKNAME RETURN_CODE

 

 

Stops the Microsoft Excel application to which the Visual Adelia application is connected.

If unsaved workbooks are open and you want to use the method, Microsoft Excel displays a dialog box asking you if you want to save the changes you made. You can avoid this by saving all the workbooks before using the APPL_QUIT method or by using the APPL_DISPLAY_ALERTS method set to *FALSE. In this case, no dialog box is displayed and the changes to workbooks are not saved.

 

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 APPL_QUIT ReturnCode

Parameters

ReturnCode

NUM_BIN_4 type (output parameter)

 

Note: This method is not implemented by the Cloud generator.

 

 

 

↑ Top of page