Code: Alles auswählen.
CL_SALV_TABLE=>FACTORY( IMPORTING R_SALV_TABLE = DATA(LO_SALV_TABLE)
CHANGING T_TABLE = EXCEL_OUTPUT_TABLE )
DATA(LV_XSTRING) = LO_SALV_TABLE->TO_XML( XML_TYPE = IF_SALV_BS_XML=>C_TYPE_XLSX ).
Code: Alles auswählen.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING BUFFER = IV_XSTRING
IMPORTING OUTPUT_LENGTH = SIZE
TABLES BINARY_TAB = GT_BINTAB.
CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD( EXPORTING BIN_FILESIZE = SIZE
FILENAME = FILENAME
FILETYPE = 'BIN'
CHANGING DATA_TAB = GT_BINTAB
EXCEPTIONS ACCESS_DENIED = 1 ).