on 05-03-2010 10:40 AM
Hi,
I have Webdynpro ABAP component. In this I am downloading some internal table data into spread sheet using following code. I need to Format data like giving Cell coloring. Could any one please tell me where i can make this format in WebDynpro ABAP.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = ls_text
IMPORTING
buffer = ls_xtext.
wdr_task=>client_window->client->attach_file_to_response(
**path to the word file
i_filename = 'WDP.xls'
* String Variable
i_content = ls_xtext
* File Type
i_mime_type = 'EXCEL' ).
Thanks,
Sekhar.J
Edited by: sekhar J on May 3, 2010 11:50 AM
How are you actually building the string LS_TEXT? If this is tab delimited string then this file type doesn't support any cell formatting. This is an Excel limitations not a Web Dynpro one. If you need cell formatting you must use the Excel XML format. Build a spreadsheet with the features you want and then choose save as XML from within Excel. Then look at the resulting file with a text editor to see how the XML format is built. This is what you need to duplicate in ABAP using Concatenations, the iXML library or XSLTs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashish
You can convert excel as XML by File ->save as -> XML Data ..
if you get error as
"cannot save XML data because the workbench does not contain any XML Mapping"
Then try to save File ->save as -> XML spreadsheet 2003 format
And then open the excel in note pad you will get the XML Data
below is the tutorial for cell formating in excel using XML data
http://scn.sap.com/docs/DOC-25024
Regards
Chinnaiya Pandian
Hello,
We did the saved the excel in Excel XML format and duplicated the code using concatenations as given in thread http://scn.sap.com/docs/DOC-25024
.But I always see the below error
XML PARSE ERROR: Missing whitespace between attributes
Error occurs at or below this element stack:
<ss:Workbook>
<ss:Worksheet>
But the XML tags are concatenated as well in to field of type STRING .
Please advise how to resolve this .
Thanks
Shishupal.
Hi,
You can download the contents to Excel with this method cl_wd_runtime_services=>attach_file_to_response
For further please check the follwoing wiki
[Download a file into excel sheet|http://wiki.sdn.sap.com/wiki/x/AANqBg]
Hope this solves the issue,Let me know if you have any queries.
Thanks,
Rajani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Up to my knowledge, we cann't set the Cell colouring of the Excel using Web dynpro. Let wait for other Gurus replies on the same.
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.