Application Development 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: 

How to align the excel sheet generated by abap code as an attachment.

kunnath_rahul
Explorer
0 Kudos

can you please tell how can I align the excel sheet generated by abap report as an attachment in a mail. When I download the excel sheet from sost tcode. The allignment is very bad. I need make this excel with alligning while downloading from mail in sost.


I downloaded abapgit but don’t know the code snippet to use in abap program. I don’t know whether I need to do for every cell seperately. Please help me.

6 REPLIES 6

Sandra_Rossi
Active Contributor

You say that "the alignment is very bad", it's very subjective, could you please show.

It's abap2xlsx, not abapGit.

There are demo programs.

Excel is one thing, emailing/downloading is another thing completely unrelated.

kunnath_rahul
Explorer
0 Kudos

The abap code generates The mail with excel sheet. The excel sheet have the allignment which is not readable. The requirement have that is to make the excel sheet with correct allignment.

For using abap2xlsx, we need to download abapgit in the system right. That’s why I said abapgit.

Also, if you know how can I implement this in existing code. The excel sheet contains some headers and fields data.

xiswanto
Active Participant

If your issue is regarding the alignment and you wanted to use abap2xlsx, take a look at program ZABAP2XLSX_DEMO_SHOW and choose on that suit your requirement (alignment and mail attachment, could be ZDEMO_EXCEL14 or ZDEMO_EXCEL37).

kunnath_rahul
Explorer
0 Kudos

Siswanto Tan

This program not available in se38. How to see that.

raymond_giuseppi
Active Contributor

Sandra_Rossi
Active Contributor
0 Kudos

The demo programs of abap2xlsx are provided in a separate repository: abap2xlsx/demos: Demonstration programs (github.com).

Excerpt from Raymond link installation of Abap2XLSX:

  • To install abap2xlsx click pull.
  • After installing, if you want to install the demo programs, repeat the actions above, starting from New Online to pull, and fill Git repository URL with https://github.com/abap2xlsx/demos. We recommend that you pick a local package name for the demos, for example $abap2xlsxdemos, since you most likely won’t need them in a production system.