cancel
Showing results for 
Search instead for 
Did you mean: 

Dowload data to Excel has problem when data contains comma(,) and "

Former Member
0 Kudos

Hi All

I am using attach_file_to_response method to download data. But the problem is when any column data contains a double quote and comma, then next column will be merged into this column. How to avoid this scenario.

Process followed...

1. Created an internal table with horizontal char and new line characters

2. Converted String to Xstring using FM : 'SCMS_STRING_TO_XSTRING'

3. Calling the below method

lv_filename = 'Result.xls'.

wdr_task=>client_window->client->attach_file_to_response(

i_filename = lv_filename

i_content = lv_data_xstring

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

Any help is highly appreciated.

Thanks

Ashok

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

add double quotes before and after the description field.

Former Member
0 Kudos

Hi Sowmya

If the text has already double quotes in it, this solution does not work.

Ex: Source text: "abcd,ef

Modified text: ""abcd,ef"

Result text in excel cell: abcd,ef"

Regards

Ashok

Answers (0)