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

Excel formatting with if_xml_element (zebra pattern)

0 Likes
1,222

Hi Abappers,

I'm working on a program that converts data in a global table into an xls file and sends mail.

The current excel output is like this.

I used the "if_ixml_element" interface to generate this output.

But the output style I need to do should be like this, with zebra.

This is how I did the blue coloring in the first photo.

  r_format  = l_document->create_simple_element( name = 'Interior' parent = r_style1  ).

  r_format->set_attribute_ns( name = 'Color'   prefix = 'ss'  value = '#ADD8E6' ).

  r_format->set_attribute_ns( name = 'Pattern' prefix = 'ss'  value = 'Solid' ).

I ask for your help,

Kind regards.

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
1,087

IF_IXML_ELEMENT is for any kind of XML, not specifically the format XML 2003 for Excel.

Now, about XML 2003, create manually an Excel workbook with all the colors you wish, save it as XML 2003 and open the generated file with notepad, then do your ABAP so that to generate the same XML.

Good luck.