Code: Alles auswählen.
* Excel starten
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
* Excel sichtbar ausführen
SET PROPERTY OF h_excel 'Visible' = 1.
* bestehendes File öffnen
CALL METHOD OF h_excel 'Workbooks' = h_mapl.
CALL METHOD OF h_mapl 'OPEN'
EXPORTING
#1 = 'C:\Temp\test.xls'.
* Sheet selektieren
CALL METHOD OF h_excel 'Sheets' = h_worksheet
EXPORTING
#1 = 'Blatt1'.
CALL METHOD OF h_worksheet 'Select'.
Code: Alles auswählen.
CALL METHOD OF h_excel 'Sheets' = h_worksheets.
CALL METHOD OF h_worksheets 'Item' = h_worksheet
EXPORTING #1 = 'BlattXY'.
CALL METHOD OF h_worksheet 'Delete'.
Code: Alles auswählen.
CALL METHOD OF h_worksheets 'Select'.
CALL METHOD OF h_worksheets 'PrintOut'.