How to make an multi-sheet excel file with SAP ABAP


Result:

 

Two sheets excel example.

Sheet1.

1

Sheet2.

2

Codes:

report  zanil.

*** Job: OLE Excel from SAP

***      with two sheets

**  Include objects

includeole2incl.

**  Table definitions

tables:  m_mbmps,

         zperlist1,

         zperlist2.

** Macro Definition

define ole_check_error.

  if &1 ne 0.

    message e000 with &1.

    exit.

  endif.

endofdefinition.

endif.

call method of h_excel  ‘Workbooks’ h_mapl.


Click here for the full code


Leave a comment

Your email address will not be published. Required fields are marked *