cancel
Showing results for 
Search instead for 
Did you mean: 

How to Download Table Data into Excel Multiple sheets in Webdynpro

Former Member
0 Kudos

Hi All,

i've a table data that data needs to be export into excel multiple sheets. in abap i know the process same its nt working in WD.

any one know about this in wd kindly reply.

Regards,

Jack.

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Jack,

You need to convert table data into xml format and then use wdr_task=>client_window->client->attach_file_to_response( )

Refer the below link and build the xml file as per your requirement.

Download Webdynpro table data in Cell formatted Excel Sheet

Please refer the below sample,

xml format for the excel with 3 sheets with some data

<book>
       <sheet id="1" name="Sheet1">
              <row id="1_1">
                     <col1>Column1</col1>

                     <col2>Column2</col2>

                 </row>

              <row id="1_2">

                     <col1>test</col1>

                 </row>

          </sheet>

       <sheet id="2" name="Sheet2">

              <row id="2_1">
                     <col1>Column1</col1>

                     <col2>Column2</col2>

                 </row>

              <row id="2_2">

                     <col1>2.0</col1>

                     <col2>4.0</col2>

                 </row>

          </sheet>

       <sheet id="3" name="Sheet3"></sheet>

   </book>


Hope this helps you.

Regards,

Rama

kaushiksampathkumar
Discoverer
0 Kudos

Hi Ramakrishnappa,

I have a requirement to download & upload data into/from Excel sheets. I referred the link you mentioned and converted the data into XML code and download the data as .xls file.

Download Webdynpro table data in Cell formatted Excel Sheet

While uploading, i used the FM: 'CALL FUNCTION 'POC_HR_KR_XSTRING_TO_STRING', and i can able to retrieve the XML code back.


My problem is, I found difficulty to extract the data from XML. So is there any class/method to get only the table details from the XML?

Or this there any way to download the XML code in .XLSX format?.

Could you please me on this. Thanks in advance.

Regards,

Kaushik

Answers (0)