Code: Alles auswählen.
*---------------------------------------------------------------------*
* FORM FILL_CELL *
*---------------------------------------------------------------------*
* --> I Zeile *
* --> J Spalte *
* --> SIZE Größe *
* --> BOLD Fett=1, Normal=0 *
* --> VAL Wert *
* --> FORMAT Format der Zahl (Bsp.: 10.000,00)=1, Normal=0
* --> COL Farbe: *
* 1=Schwarz, 2=weiss, 3=rot, 4=grün, 5=blau, 6=gelb *
*---------------------------------------------------------------------*
FORM fill_cell USING p_obj_xls_worksheet TYPE ole2_object
i j size bold col format val.
DATA:
obj_xls_cell TYPE ole2_object, "Zelle
obj_xls_font TYPE ole2_object. "Farbe/Fett
CALL METHOD OF p_obj_xls_worksheet 'Cells' = obj_xls_cell
EXPORTING #1 = i #2 = j.
SET PROPERTY OF obj_xls_cell 'Value' = val.
GET PROPERTY OF obj_xls_cell 'Font' = obj_xls_font.
SET PROPERTY OF obj_xls_font 'Bold' = bold .
* SET PROPERTY OF obj_xls_font 'ColorIndex' = col.
SET PROPERTY OF obj_xls_font 'Size' = size.
IF format = 1.
SET PROPERTY OF obj_xls_cell 'NumberFormat' = '#,##0.00'.
ELSE.
ENDIF.
ENDFORM.