Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Exporting Arabic text to Excel from WebDynpro ABAP not working

Dears,

I am using a WD Table UI element and toolbar button to export data to excel. When exporting Arabic text, the cells of excel displays garbage value. Please find the below snippet of the code used to export Arabic text to excel. The below code works perfectly when exporting English text. Kindly suggest if there are any option to achieve the same. Also attached table screenshot FYR..

Also note: The Export to Excel works fine even with Arabic text when using WD ALV Table. But I need this functionality  onclick of webdynpro table toolbar button.

CONCATENATE l_xls  <fs_result_item>  cl_abap_char_utilities=>horizontal_tab INTO l_xls.

* fill the file content

   lh_conv_out = cl_abap_conv_out_ce=>create( encoding  = '4103' ).

   lh_conv_out->convert(

     EXPORTING

       data      = l_xls

     IMPORTING

       buffer = l_xls_x ).

   l_filename = wd_assist->if_wd_component_assistance~get_text( '012' ).

   CALL METHOD cl_wd_runtime_services=>attach_file_to_response

     EXPORTING

       i_filename      = l_filename

       i_content       = l_xls_x

*     i_mime_type     = 'application/vnd.ms-excel'

       i_mime_type     = 'APPLICATION/MSEXCEL; charset=UTF-16LE'

       i_in_new_window = abap_false

       i_inplace       = abap_true.

Any suggestions?

Kind Regards,

Harish

File.JPG (27379 B)
Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question