on 12-26-2007 4:01 PM
Hi
I have written the following code to export data to excel sheet...
data:
conv_out TYPE REF TO cl_abap_conv_out_ce,
content TYPE xstring.
data : itab_slsrl type table of znslsrlitm.
data: xml_out TYPE string.
Data:
Node_slsrl type ref to If_Wd_Context_Node,
Elem_slsrl type ref to If_Wd_Context_Element,
Stru_slsrl type ref to if_wd_context_element .
call transformation ('ID') source tab = itab_slsrl[] result xml xml_out.
CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
EXPORTING
INSTRING = xml_out
*
IMPORTING
OUTXSTRING = content.
conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
DATA: lv_filename TYPE string.
conv_out->convert( exporting data = xml_out IMPORTING buffer = content ).
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'Sales_order_release.xls'
i_content = content
i_mime_type = 'application/msexcel'
i_in_new_window = i_in_new_window
i_inplace = i_inplace ).
But when i am trying to export data to excel sheet i am getting
following error...
"Switch from current encode to specified encoding is not supported"
"<?xml version="1.0" encoding='utf-16"?>"
if i change encoding utf-8 to utf-16 in my code its giving dump..
"The conversion of certain code pages is not supported"
Did i miss any step...?
How to resolve this problem please help me....
Thanks & Regards
Sowmya.....
Hi Sowmya,
I do had a similar issue, but I avoided that problem temporarily by commenting the following code.
l_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
attach the first file
l_conv_out->convert( exporting data = l_xml_out IMPORTING buffer = l_content ).
Once this is done, you can export the data to Excel and open it and see too...But this is a temporary solution only. Implement this solution to get to understand more flaws of this.
Regards
Raja Sekhar
Edited by: Raja Sekhar on Dec 26, 2007 7:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.