Skip to Content
Feb 07, 2014 at 11:24 AM

create Excel file out of WebDynpro application


Hi experts,

I am trying to export a table I display in WebDynpro to an Excel file.

After reading lots of threads I am trying to do this via XML transformation.

Therefore I followed the guide from ABAP WebDynpro - Download Formatted Excel using XML | ABAP Help Blog

I created a transformation and put the xml code of my Excel template into it. The test is succesful - the template file is generated as expected.

In the next step I try to put the table data into the transformation - I need to add the rows under the header columns. So on ABAP side I fill an internal table itab which should be processed in the transformation.

In the transformation I added a loop to read this itab into rows:

<tt:loop name="line" ref=".ROOT"> <Row ss:AutoFitHeight="0" ss:Height="25.5"> <Cell ss:Index="2" ss:StyleID="s69"> <Data ss:Type="String"> <tt:value ref="$line.zcustno"/> </Data> </Cell> <Cell ss:StyleID="s69"> <Data ss:Type="String"> <tt:value ref="$line.zname"/> </Data> </Cell> </Row> </tt:loop>

The xml file is generated without problems, during transformation rows according to the itab data are added. But when opening the file in Excel, I receive the message that the file is corrupt 😔

Why is that?

Regards, Richard