Hi,
I need to create Excel file on Application Server.
I receive the Excel information from SProxy Attachment (SWA)
gs_document-att_type = ls_attach->get_content_type( ). CALL METHOD ls_attach->get_binary_data RECEIVING p_data = gs_document-att_content.
The Excel content is stored in XString (att_content = XString).
I try to build the Excel file with Dataset in Binary Mode :
lv_xstring = gs_document-att_content. OPEN DATASET lv_file FOR OUTPUT IN BINARY MODE.TRANSFER lv_xstring TO lv_file. CLOSE DATASET lv_file.
When i try to open the xls file :
"The file format and extension of XXX don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you wan to open anyway ?"
Content :
PK !Û1(òl Ä [Content_Types].xml ¢ ( ¬”ËnÂ0 E÷•ú ‘·Ub袪* ‹>–-Ré ¸ñ„Xø%ð÷˜‡(¢
6±bûÞ{<òx0jÎ P9[²~Ñc ØÊIe§%ûš¼å,Ã(¬ ÚY(Ù
†·7ƒÉÊ f¤¶X²&FÿÄ9V ...
I do the same method for PDF file and no problem.
I read a lot of information but nothing interesting in my case.
Thanks,
Youri