Skip to Content
Former Member
Jan 20, 2008 at 06:12 PM

Export ABAP List to Excel and send it as email attachment



I have a program that sends email to employees, using SAP Office, this email sends an attachment in html (an abap lisp exported to html). To create this attachment I use LIST_FROM_MEMORY to recover data and then WWW_HTML_FROM_LISTOBJECT to create the html file.

Then the email is sent using SO_NEW_DOCUMENT_ATT_SEND_API1 and it works fine. But now I need to send this ABAP List as an Excel instead of sending as a HTML file.

How can I do this? Is this possible?

Thanks in advance

Best regards

P.S: I've tried to recover information from ABAP List as an ASCII file (using LIST_TO_ASCII instead of WWW_HTML_FROM_LISTOBJECT) and then sending the file as an XLS instead of HTM (this is determined in PACKING_LIST parameter of SO_NEW_DOCUMENT_ATT_SEND_API1), but when I open the excel file, all information is stored in the first cell, so you cannot perform any operation on it.