‎2019 Jan 07 4:12 PM
Hi,
Ive created an Excel document through a XSLT transformation. I have a string that represent an XML structure.
It starts like this :
<?xml version="1.0" encoding="utf-8"?><?mso-application progid="Excel.Sheet"?>
I think my document is fine.
But when I want to display the document with ABAP code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part1234 DATA: l_xml TYPE REF TO cl_xml_document .
CREATE OBJECT l_xml.
CALL METHOD l_xml->parse_string EXPORTING stream = lv_xml_string.
CALL METHOD l_xml->display.
Excel opens and there's also a popup that displays behind.. (see picture)How can I avoid this ?

Thanks
Simon
‎2019 Jan 07 7:28 PM
I guess CL_XML_DOCUMENT displays it in a web page, the Microsoft browser recognizes that it's an Excel file and starts Excel instead. Instead of using CL_XML_DOCUMENT, download the file in a temporary folder on the laptop, with extension .xlsx, and execute the file (using CL_GUI_FRONTEND_SERVICES, methods GET_TEMP_DIRECTORY, GUI_DOWNLOAD and EXECUTE, lots of examples in the forum and www), that will work identically to double-clicking an xlsx file from the Windows file explorer.