a month ago
Hi everyone,
We are facing an issue with a custom SAP ABAP program that generates an Excel file and sends it internally via email through the SAP system.
When we check the sent email in SOST, we see the attachment, but trying to open the Excel file results in the following error:
“File format and extension of [filename] don’t match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?”
We suspect there might be a problem with how the file is being created or attached in the ABAP code, but we are unsure how to resolve this.
Has anyone encountered this issue before or can suggest best practices for generating and sending Excel files from ABAP to avoid this error?
Any guidance or code examples would be greatly appreciated.
Thanks in advance!
Request clarification before answering.
If the file is a plain text file (e.g. CSV) and you save it with an XLS or XLSX extension, this is standard behaviour nowadays.
If this is not already a true Excel file, consider creating an actual XLSX file with modern tools, or use a more appropriate (honest) suffix such as CSV or TXT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 32 | |
| 17 | |
| 16 | |
| 6 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.