Exporting to Microsoft Excel 
To generate an Excel list from the ALV output, the user simply chooses the corresponding pushbutton from the toolbar. The user cannot affect the result in advance.
At this time, the following Excel formats are supported:
Excel for Office 2007
Excel (MHTML format)
Excel (MHTML format for 2000/97)
To specify the required standard format, execute the activity Maintaining Web Dynpro ABAP-Specific Settings in Customizing (transaction code SIMGH) for SAP Web Application Server under SAP List Viewer (ALV) and select the required format.
However, in your application, you can define whether information other than the ALV output is also copied to the Excel file when the user triggers the export. This applies to:
Design objects for header and footer areas
Result rows for calculations
If you have defined a design object for a header or footer for the ALV output, you can define whether the content of this design object should also be copied into the Excel file. You use the methods of interface class IF_SALV_WD_EXPORT_SETTINGS for this (implementing class CL_SALV_WD_CONFIG_TABLE).
Methods for copying design objects into the Excel file
Function |
Method |
Copy design object for the Excel header |
SET_EXPORT_NO_TOL |
Check whether the design object is to be copied for the Excel header |
GET_EXPORT_NO_TOL |
Copy design object for the Excel footer |
SET_EXPORT_NO_EOL |
Check whether the design object is to be copied for the Excel footer |
GET_EXPORT_NO_EOL |
You can define whether result rows containing the results or interim results of aggregations should be copied to Microsoft Excel when the export takes place. You use the methods of interface class IF_SALV_WD_EXPORT_SETTINGS for this (implementing class CL_SALV_WD_CONFIG_TABLE).
Methods for copying result rows into the Excel file
Function |
Method |
Copy result rows to Excel |
SET_EXPORT_NO_SUMS |
Check whether result rows are copied to Excel |
GET_EXPORT_NO_SUMS |
Note
If you have implemented cell variants in your ALV, then these are not exported as well. For more information, see SAP Note 1399946.