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: 

Right alignment in excel attachment

VishwanathV
Participant
0 Kudos
399

Hello,

I'm generating excel attachment for email using cl_bcs class in ABAP and without using XML technique. Almost everything is fine with excel fiel, except for alignment of data in few of the cells of this excel file. Is there a way to force the alignment (Left, Center, Right) on the desired cells of this file through ABAP without using XML technique. By default, any numeric value is currently displayed with Right alignment and any character value is displaying with Left alignment. The customer wants to see certain character values with the Right Alignment.

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos
327

Okay you don't use a XML tool to create the Excel.

So which tool did you use?

VishwanathV
Participant
0 Kudos
327

I'm concatenating itab data into a string variable, converted it into binary format and passing the same to the method attachment of the object generated for the class cl_document_bcs=>create_document.

Sandra_Rossi
Active Contributor
0 Kudos
327

So, I guess you use something like CSV or tab-separated values, which do not permit any rich content (anything which is not a value).

If you want to include rich content, you must use a rich format like Office Open XML, XMLSS, etc.