Skip to Content
0
Jan 29, 2015 at 11:43 AM

Excel-File per Email with class CL_DOCUMENT_BCS

191 Views

Hi all,

What I need is an excel file with subtotals as EMail-Attachment.

I created an ALV-List with the subtotals, converted the ALV to BIN-Data via Method CL_SALV_TABLE->TO_XML and created the attachment in the mail via class CL_DOCUMENT_BCS.

The Email is looking fine and the excel Attachment is there.

But If I try to open the attachment in SOST I get the following Message:

Excel cannot open the file ''Attachment_20150129111717.173_X.XLS' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

If I open the file the excel is showing the correct data including the subtotals.

Is there any posiibilty to avoid the message above?

Remark: I can open the file without any problems with office version 2003, but in all newer versions I get the above message.

Thanks a lot.

Kind regards

Frank