[ABAP] ExcelOle – Zelle lesen / schreiben

DATA: o_excel TYPE ole2_object.
DATA: o_cell TYPE ole2_object.
DATA: cell_value TYPE string.

...

* Zelle ermitteln
CALL METHOD OF o_excel 'Cells' = o_cell
   EXPORTING
	 #1 = 1   " Zeile
	 #2 = 1.  " Spalte

* Wert schreiben
SET PROPERTY OF o_cell 'Value' = 'Text 1_1'.

* Zellwert holen
GET PROPERTY OF o_cell 'Value' = cell_value.

* Zellwert ausgeben
WRITE: / cell_value.

* Objekt wieder freigeben
FREE OBJECT: o_cell.