I have Webdynpro ABAP component. In this I am downloading some internal table data into spread sheet using following code. In that first column is appending with empty data.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
text = ls_text
buffer = ls_xtext.
**path to the word file
i_filename = 'WDP.xls'
i_content = ls_xtext
i_mime_type = 'EXCEL' ).
Please help in resolving this issue.
Edited by: vinoth rajendran on Sep 17, 2010 12:08 PM
Can you please try using class method 'cl_wd_runtime_services=>attach_file_to_response' directly instead of 'wdr_task'.
* Convert to Excel cl_wd_runtime_services=>attach_file_to_response( i_filename = 'C:\FILE.XLS' i_content = lo_final_string i_mime_type = 'APPLICATION/MSEXCEL' * i_in_new_window = abap_true * i_inplace = abap_true ).
Hope this resolves the issue.
>In that first column is appending with empty data.
I'm guessing it has to do with how you built your ls_text string. It is probably text tab delimited. You probably are inserting a tab before the first column of data. We would have to see your logic for building ls_text to be sure, but it seems like the likely candidate.