Products Downloads


French version


 

* An Excel Workbook is filled from a graphical list elements.

* Each element contains the following variables: ZZ_EMPL_ID, ZZ_EMPL_LAST_NAME,

* ZZ_EMPL_FIRST_NAME, ZZ_EMPL_CITY.

* The range comprises four cells: from A,I to D,I.

* Creating a new Excel workbook and worksheet

SHEET_TYPE = _EXL_WORKSHEET

CALL_METHOD EMPLOYEE_WIN.EXCEL_CLI WKBK_CREATE SHEET_TYPE RETURN_CODE

*

* Loading sheet cells (cells A,I B, C,I D,I)

I = 0

*

READ_F_ELT EMPLOYEE_WIN.EMPLOYEE_LST:LIST

* if not empty

IF &LST_CODE(EMPLOYEE_WIN.EMPLOYEE_LST:LIST) = *NORMAL

*

READ_LST  EMPLOYEE_WIN.EMPLOYEE_LST:LIST

*

VAR_OR_ARRAY = *BLANK

VAR_OR_ARRAY (1,1) = ZZ_EMPL_ID

VAR_OR_ARRAY (1,2) = ZZ_EMPL_LAST_NAME

VAR_OR_ARRAY (1,3) = ZZ_EMPL_FIRST_NAME

VAR_OR_ARRAY (1,4) = ZZ_EMPL_CITY

*

I = I + 1

* Defining the range: from cell A,I to D,I (four cells)

Range = 'A' // I // ':D' // I

NB_ELEMENTS = 4

CALL_METHOD EMPLOYEE_WIN.EXCEL_CLI RANG_SET_VALUES RANGE -

VAR_OR_ARRAY NB_ELEMENTS RETURN_CODE

END_READ_LST

END

* Displaying the Excel sheet

VISIBILITY = *TRUE

CALL_METHOD EMPLOYEE_WIN.EXCEL_CLI APPL_SET_VISIBLE VISIBILITY RETURN_CODE

 

Back

 

↑ Top of page

  • Aucune étiquette