Download an internal table into excel file with extension '.xls'.

2 months ago 15

Hello experts,

My request is to download an interior array into excel record with hold '.xls'.  I person tried the beneath 3 ways to bash it.

  1. Using FM ' SAP_CONVERT_TO_XLS_FORMAT '
  2. Using Class  cl_salv_table=>to_xml (Convert to xstring and download utilizing GUI_download)
  3. Concatenate the texts into a drawstring with separators tab abstraction and caller line. (then person it to xstring and download utilizing GUI_download).

With these methods, one tin download the record successfully. But whenever one unfastened it, one getting a popular up connection "The record format and hold of 'File.xls' don't match. The record could beryllium corrupted oregon unsafe. ". 

We should not get this pop-up connection arsenic bot volition usage the record successful further process.

NOTE: I tin make the record with (.xlsx) oregon (.csv) hold and one don't look this issue. But our clients privation lone successful .xls format. I tin effort to convice them to usage immoderate different extension, but earlier that one would similar to if it is imaginable to make the excel record with '.xls' hold and unfastened it without the popup message.

I person searched to my champion successful the assemblage but one got nary solution for this. I can't usage abap2xlsx arsenic well.

Any suggestions volition beryllium appreciated.

Read Entire Article