Skip to Content
0
Apr 02, 2007 at 12:50 PM

Excel download problem relating to u00A3 sign

23 Views

Hi All,

I've written an excel download which takes an internal table of data and sends it to Excel. The function works fine except for one column which contains an amount and currency.

The amount field is in the format '£ n.nnn'. The resulting column in Excel reads '£ n.nn'.

The field in the internal table and the contents of the xstring are correct as they don't contain the 'A' character. It seems to happen on transmission of the excel doc.

The ABAP is below :

concatenate stringValue

stru_Polist-ebeln

cl_abap_char_utilities=>horizontal_tab

stru_Polist-ernam

cl_abap_char_utilities=>horizontal_tab

w_date

cl_abap_char_utilities=>horizontal_tab

stru_PoList-name1

cl_abap_char_utilities=>horizontal_tab

stru_PoList-order_value

cl_abap_char_utilities=>horizontal_tab

cl_abap_char_utilities=>cr_lf

into stringValue.

xbuffer = stringValue.

conv_out->convert(

exporting

data = stringValue

importing

buffer = xbuffer ).

cl_wd_runtime_services=>attach_file_to_response(

i_filename = 'PurchaseOrders.xls'

i_content = xbuffer

i_mime_type = 'application/vnd.ms-excel'

i_in_new_window = abap_false

i_inplace = abap_false ).

I've checked Google and someone has a similar problem relating to MySQL. The suggestion there is to change the character set. I'm not sure I have ny control over it?

Please help

Cheers

Richard