Hello Rafi:
I also ran into a similar situation recently.
Here is what I did & This works for me.
I created a .CSV file and it will open up as an excel sheet when you double click on it.
* -------- create and set document with attachment ---------------
* create document object from internal table with text
WRITE: sy-datum TO l_date MM/DD/YYYY.
CONCATENATE 'Invoices' l_date INTO l_subject SEPARATED BY space.
APPEND l_subject TO main_text.
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = main_text
i_subject = 'Interface' ). "#EC NOTEXT
* add the spread sheet as attachment to document object
document->add_attachment(
i_attachment_type = 'CSV' "#EC NOTEXT
i_attachment_subject = ' Invoices' "#EC NOTEXT
i_attachment_size = size
i_att_content_hex = binary_content ).
* add document object to send request
send_request->set_document( document ).
Let me know if this change works for you.
Thanks
Gayathri