Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Read Excel file using OPEN DATASET from application server

Former Member
0 Kudos


Hi Gurus , I was trying to read a .XLS as well as .XLSX file from Application server and I am getting a junk while using the OPEN DATASET edition

OPEN DATASET L_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE MESSAGE L_MSG IGNORING CONVERSION ERRORS. After using the OPEN DATASET command as shown , while reading the file using READ DATASET I am getting a junk something like "PK##########!#bî#h^###########[Content_Types].xml" . I have read all the posts related to this , but it is not working , I have tested with .txt file and .CSV file it is working though .

Thanks

Sanjib kumar Bharali

1 ACCEPTED SOLUTION

Former Member

Hi All , Praveen Singh has replied to this post . Please open the link below .

https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-...

I thank Praveen for this post . I have to try it .

12 REPLIES 12

Former Member
0 Kudos

Put it on your desktop and then use FM ALSM_EXCEL_TO_INTERNAL_TABLE to read it.

Rob

0 Kudos

Hi Rob , But I need to read from Application server only . I know it works from presentation server using FM ALSM_EXCEL_TO_INTERNAL_TABLE or  TEXT_CONVERT_XLS_TO_SAP.

0 Kudos

Hello Sanjib,

Please let me know if you have found a solution for this, it would be of great help to us.

Thanks,

Nikhil

0 Kudos

Hi Nikhil , I have not found the solution . I have rather told my client to convert the .xls file into a .csv file , which they agreed.

vamsixk
Active Participant
0 Kudos

HI Sanjib,

onlky txt files and csv files can be opened via the open data set statement.

you cannot read xls files using the "open dataset" statement.

If you have to read it in the XLS format then it has to be placed on the Desktop as suggested by rob.

this is because the FM uses the OLE functionality to interpret the data that is there in the excel file format.

do let us know if you still face challenges.

regards,

Vamsi

former_member334777
Active Participant
0 Kudos

This message was moderated.

Former Member

Hi All , Praveen Singh has replied to this post . Please open the link below .

https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-...

I thank Praveen for this post . I have to try it .

0 Kudos

Welcome Sanjib!!

It will work for sure..just developed it after lot of hard work..

BR,

Praveen

0 Kudos

Hi Sanjib,

Do you have the code of your solution?

BR

Ricardo

0 Kudos

Hi Ricardo ,

                    Please see the answer given by Praveen Singh. He has given the right answer.

regards

Sanjib

0 Kudos

This message was moderated.

thirukt
Member
0 Kudos

Dear Narendra

Are you able to solve the issue. I am also facing the same, getting blank internal table

Thanks