SAP ABAP - Generating Excel file for downloading or sending over email
Creating excel content from data in an internal table? Getting the following message when opening an excel created out of SAP - "The file you are trying to open, ‘filename.xls’ is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?" Below is the best solution. This solution is based on the approach used by standard SAP to created excel content from ALV. Once any ALV is displayed, you can get the data into excel using the menu bar option LIST -> EXPORT -> SPREADSHEET. If there are any questions, put them in the comments. Sample working code: *&---------------------------------------------------------------------* *& Report Y_EXCEL *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT Y_EXCEL ...
Comments
Post a Comment