09-08-2016 11:54 PM
Good evening,
I'd like to ask for your help in an issue that I'm facing with excel attachment. I'm creating a Excel formatted file and send it to users through the function SO_DOCUMENT_SEND_API1. However, when they try to open it in smartphones a message appears indicating that the format is not valid.
Could you suggest any solution or alternative to solve the issue? If some of you have faced the same problem, I'd appreciate your help to solve it.
Thanks a lot.
09-09-2016 8:39 AM
Hello Erick,
I believe you are trying to send an email and the recipient is trying to open the email and the excel attachment using smartphone. Can you first check are you able to open the same email in desktop/laptop having MS Office installed. If you can, we need to see if in the smartphone the appropriate app is available to open excel attachment.
Also let me know what is kind of excel attachment(.xls or .xlsx) and mime type you are passing when you are sending the email using the said FM. Just a suggestion, you can even send email using class CL_BCS. Please find the link below for code snippet.
Sending attachment using cl_bcs classes - Code Gallery - SCN Wiki
Thanks,
Mainak
09-09-2016 3:39 PM
Hello Mainak.
thanks for your help. I can open the file in desktops and laptops without problem. The extension is "XLS". I tried a program with the class you told me and the result is the same, I can't open it in smartphone.
When I try to open it with android appears the message: "This kind of file is not compatible with this Office version", and when I try with IOS the message is: "Worksheet Microsoft Excel 97-2004".
I'm thinking that the file can be opened in desktops and laptops because the version of MS Excel can support old versions unlike the version for mobile. Although, this wouldn't be totally true, because if I create an Excel file in an old version from MS Office and then I send it through SAP, I can open it in smartphones.
Some suggestion?
Thanks again!
Erick.
09-09-2016 3:47 PM
09-09-2016 3:53 PM
09-09-2016 11:46 PM
Hi Eric,
IF_XML is used to create xml files (that can be read an interpreted by MS Ecel) but not by every smartphone application. Open the file with text editor and see the structure.
Does not look like an SAP question.
Regards Clemens
09-12-2016 10:16 AM
Hi
I've same problem (but in this moment smartphone is not important),my excel file is created in XML, I'm not use IF_XML., but a transformation based on excel XML structure.
Perhaps you can try to create it by ABAP2XLSX,here you can try the main tool https://wiki.scn.sap.com/wiki/display/ABAP/Excel+with+SAP+-+An+overview