Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue in ABAP Excel

Former Member
0 Likes
6,577

Hello Friends,

I am creating an excel file through ABAP program. I am getting a pop up - "The File format and extension of <filename>.xls don't match. The file could be corrupted or unsafe. Do you want to open it anyway?"

I an using ABAP transformation for creating excel content.

I analyzed the issue and came to know that the pop up is coming because the file format coming from excel transformation is in XML and the file is created in .XLS. But I am not able to convert XML content to XLS.

Can anyone help me in converting the XML content coming from transformation to XLS to avoid the pop up.

Thanks,

Pooja

Hello Friends,

I am creating an excel file through ABAP program. I am getting a pop up - "The File format and extension of <filename>.xls don't match. The file could be corrupted or unsafe. Do you want to open it anyway?"

I an using ABAP transformation for creating excel content.

I analyzed the issue and came to know that the pop up is coming because the file format coming from excel transformation is in XML and the file is created in .XLS. But I am not able to convert XML content to XLS.

Can anyone help me in converting the XML content coming from transformation to XLS to avoid the pop up.

Thanks,

Pooja

4 REPLIES 4
Read only

Former Member
0 Likes
3,954
Read only

abo
Active Contributor
0 Likes
3,954

If you rename the file with "XLSX" extension, you should be fine: Excel is expecting the "old" binary format with "XLS" and the new "XML" format when opening a "XLSX" file.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,954

It's a frequent Excel issue (not ABAP). I tried to explain the Excel formats and corresponding Excel extensions (and vice versa) here: https://stackoverflow.com/questions/65636855/attach-xlsx-file-in-mail-abap

Read only

0 Likes
3,954

Hello

in case you are sending it via Email, a file which you generated with abap2xlsx here you have a problem since you can pass only 3 characters for file. So even if you specify XLSX it will be cut and you end up with XLS instead of a XLSX.

so your attachment in fact is of standard Excel 2007 but the extension is for 2003

you can correct it by passing header information

https://launchpad.support.sap.com/#/notes/1459896

BR

Kairat