cancel
Showing results for 
Search instead for 
Did you mean: 

how to read the excel file using webdynpro abap?

Former Member
0 Kudos

Hi,

how to read and modify excel file using webdynpro abap?

Regards,

Pavani

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

thnx

Former Member
0 Kudos

Hi Pavani,

go thru this thread

in this go for uday response.

you might get help from that.

regards,

anand

Former Member
0 Kudos

Hi ,

Thanx for the responses. If operating system is working on UNIX, will the above code work?

Regards,

Pavani

Former Member
0 Kudos

hi Pavani,

the above code as refered by the WIKI shud work on UNIX based OS as well ,

pls note , u cannot read the excel file as such , u have to convert it into the tab delemitted text file with the

way SAURAV pointed

Former Member
0 Kudos

hi,

for reading the contents of the excel file , u can use the UI element fileupload .

u hv to bind the data property of the element with the context attribute of type xstring

as Saurav pointed u need to convert the contents of the excel file into tab delemitted text file

u cn nw read the contents using FIleupload UI elemnt thn

regds,

amit

Former Member
0 Kudos

For reading excel file follow the steps :

1. Use a File upload UI element and bind it with xstring.

2. Now your excel will be uploaded and stored in Xstring.

3. Convert Xstring to String data using FM 'HR_KR_XSTRING_TO_STRING'.

4. Now split the string at new line so as to make an internal table .

Ex . SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE it_table.

here it_table is type table of string.

5.now loop at the internal table and separate the content of this table separated by tab.

Ex. SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.

it_new type string_table.

6. For more info , refer this thread :

arjun_thakur
Active Contributor
0 Kudos

Hi Pavani,

Please refer this wiki: [Modifying existing excel sheet using WD ABAP |https://wiki.sdn.sap.com/wiki/display/WDABAP/ModifyingexistingexcelsheetusingWDABAP].

I hope it helps.

Regards

Arjun