Downloading into Excel made easy using simple transformations
In this recipe, we will see how we can use simple transformations in order to download the contents of an internal table into Excel format. The advantage of this method is that the Excel file will contain the desired font size and colors without any programming effort required.
We will first create a sample Excel file in XML format. Then, we will upload it via the transformation editor XSLT_TOOL
and generate a transformation accordingly. (The Excel XML and the transformation language may be mixed, thus the Excel XML is converted into a transformation.) The generated transformation will serve as a template representing our Excel file format. We will make slight changes in it and call it in our ABAP program in order to generate the Excel file.
The primary emphasis of this recipe is to generate an XML string containing the content of the Excel data in XML format. The download part of the XML will not be shown.
How to do it...
We will...