Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Write to stored Excel Template

0 Likes
1,349

Hello,

Does anyone know how to store a custom formatted Excel Template in SAP, and then retrieve and populate it with data using an ABAP program?

thanks,

Martin

Hello,

Does anyone know how to store a custom formatted Excel Template in SAP, and then retrieve and populate it with data using an ABAP program?

thanks,

Martin

2 REPLIES 2
Read only

geert-janklaps
SAP Mentor
SAP Mentor
0 Likes
1,103

Hi,

You could store the file on a file share which is accessible from the SAP system (e.g. via transaction cg3z or via the OPEN DATASET statement in ABAP).

Afterwards you can read the file with the OPEN DATASET statement and process it using the ABAP2XLSX framework which can be installed using abapGit. You can find ABAP2XLSX here:

https://github.com/sapmentors/abap2xlsx

Best regards,

Geert-Jan Klaps

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,103

Some people published blog posts about that. There are two distinct things to think of:

  • where you store and retrieve the template (Web Repository, MIME Repository, BDS, KPro/CMS/Content server, File System...),
  • and how you include data in the Excel file (classic text placeholders, "custom XML parts"...)

If you plan to use OLE, don't, prefer abap2xlsx or custom XML parts.

Among many others, there's this post: How to - Add Custom XML Parts to Microsoft Excel using ABAP