Problem while exporting data to Excel sheet.......

Advertisement

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.....

Advertisement

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

October 11, 2015

Problem while exporting data to Excel sheet.......

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

Exporting data into excel sheet from CRM

Hi All, I am facing problem while extracting data from CRM - Service Process Monitor. I tried to extract data(records) from executed service process monitor through System -> List ->Save->Local file->Spreadsheet I am not getting actual records

Export Data into Excel Sheet in UNIX

Hi All How to export the table data into excel sheet in unix. ThanksCreate a csv file. A csv file is just an ascii file, so it doesn't matter what OS you are on.Read other 2 answers

Problems in exporting data to Excel from WebDynpro

Hi, I'm trying to transport data to Excel using the WebDynpro Binary Cache. The table data I have has certain special characters like & , < and > . I get an XML Parse error while trying to retrieve the XML List from the Binary Cache. The detaile

Using oracle reports designer can we export data to excel sheet

using oracle reports designer can we export oracle data to excel sheetThere is a big discussion on this topic in the following link. I think you might be helpfull . The link is: A newbie question for a newbie user Regards Samujjwal BasuRead other 3 a

Problem in loding data from excel sheet

hi , i hav some problem with sqlloader.i m using oracle8i this is my loader.ctl file load data infile 'c:\data\emp.xls'           into table employee fields terminated by "," optionally enclosed by '"'           ( empno, empname, sal, deptn

Getting short dumps while reading bulky data from excel sheet

Hi all, We have converted our non-unicode based sap system (R/3 4.7, Windows 2003, SQL 2000) into a unicode based system recently. We are facing two peculiar problems for last few days. *Problem 1 - *Whenever we want to upload the data from excel she

Downloading table data into Excel sheet - Webdynpro Java

Hi All, We have developed a custom webdynpro application that executes an RFC and displays data in Table UI element. We have provided a button to download the data in excel sheet. When data is huge like, total number of rows filled up in the table ar

How to  send ALV output data into Excel sheet format via Mail to the user?

Hi friends, I have a doubt ie, How to  send ALV output data into Excel sheet format via Mail to the user? regards MoosaHi, Provide the output internal table to the objbin in the below FM Send Message   CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'   

Error while importing data from excel to forms

Hi, I am working on Oracle forms 10g, and I'm supposed to import data from excel sheet to forms. While the user enters the data,sometimes after entering a particular word he/she hits the alt+enter button. As a result the data appears in two lines in

How export report into excel sheet automatically using SSRS 2010?

Hi, I have created many reports using SQL Server Data Tool 2010 and at my work, we are using active batch to ran reports every month. Now question is, my boss want me to set up reports such a way that when active batch is ran, reports should be expor

Export data to Excel

Hello All,             I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM CALL FUNCTION 'RH_START_EXCEL_WITH_DATA' EXPORTING   DATA_FILENAME             =   DATA_PATH_FLAG            = 'W'   DATA_

To transfer data in excel sheet..

hi experts,      please let me know how do we transfer the sap data to excel sheet?...using any method.. thanks in advance...Hi, If you are using ALV there should be an icon ( F9 Function ) for download to spreadsheet also using GUI_DOWNLOAD FM also

How to downlaod vednor master data into excel sheet in SAP Application ser

Hi friends I want to download SAP vendor master data into excel sheet and the file should be stored in SAP Application server Location with padding zeros. Please help me. ThanksHi Ramesh, You can download the data into application server using the fo

Downloading data in excel sheet

Hi All,     I want to download data in excel sheet. My requirment is to use the same excle sheet to fill data. The next data should be entered in the column of the excel sheet. Is there a possible to write data in excel sheet at a particular row/colu

Urgent - Migrate data from Excel sheets

Hello all.. I want to move data from excel sheets into oracle9i Database I have a bout 50 table with average of 5000 row per table How could I do it I will be so obligated if you could detail it for me Thanks in advanceI want to insert data using loa

Problem while uploading data with GUI UPLOAD Function

Hi,   I am facing problem while uploading data with FM GUI UPLOAD    in out text file there are 7 row  but after the FM GUI UPLOAD  there are 14 entries are coming in Internal table   and each alternate row is coming as blank  with  0000 in some colu

How to read the data in excel sheet

Dear sir, How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that Cell A       Cell B    A           Apple     B           Ball    C           Cat    D           Doll when i recieve

Problem While Exporting the Output

Dear All , I am facing a problem while exporting the ALV output to Spreadsheet. When I click on Menu LIST->Export-->Spreadsheet, One pop is coming with title "Save XXL list object in SAPOffice" In that it is asking me to save Name of the L

Read data from excel sheet and then perform the required operations.

Hi all I need to write a procedure which can read data from excel sheet.I have excel sheet in which i have to options one is modification and other is addition.so if it reads modification then i need to read the concerned table name then check its av