Skip to Content
author's profile photo Former Member
Former Member

Unable to Read Excel file using OPEN DATASET from application server


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

Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2015 at 03:58 PM

    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-internal-table_1.pdf

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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 18, 2015 at 06:06 PM

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

    Rob

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 21, 2015 at 11:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 24, 2015 at 03:24 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded