cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting Arabic text to Excel from WebDynpro ABAP not working

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Instead of table UI element , create an ALV ( SALV_WD_Table)and export functionality comes by default .

Which would handle all the functionality you need with out you having to do anything.

Check for examples in google.

Phani