<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Read Excel file from application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796663#M40513</link>
    <description>&lt;P&gt;Please someone help me to read .Xls(only .Xls not a .xlsx) file from application server (al11).&lt;/P&gt;
  &lt;P&gt;I tried with this code &lt;A href="https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-internal-table_1.pdf" target="test_blank"&gt;https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-internal-table_1.pdf&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt; and cl_xlxs_document class to do this but it is not working properly.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Feb 2019 07:50:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-02-16T07:50:41Z</dc:date>
    <item>
      <title>Read Excel file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796663#M40513</link>
      <description>&lt;P&gt;Please someone help me to read .Xls(only .Xls not a .xlsx) file from application server (al11).&lt;/P&gt;
  &lt;P&gt;I tried with this code &lt;A href="https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-internal-table_1.pdf" target="test_blank"&gt;https://praveensg8.files.wordpress.com/2015/04/reading-excel-file-from-application-server-into-abap-internal-table_1.pdf&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt; and cl_xlxs_document class to do this but it is not working properly.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2019 07:50:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796663#M40513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-02-16T07:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796664#M40514</link>
      <description>&lt;P&gt;Does it work with .xls? I.e. the non-open format.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2019 11:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796664#M40514</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-02-16T11:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796665#M40515</link>
      <description>&lt;P&gt;Matthew is right, the code you tried says it's for both XLS (implied that it means the binary file format) and XLSX, but in fact it works only for XLSX ! The binary file formats can be read only in dialog using OLE (if you use SAP ERP, you may use the function module TEXT_CONVERT_XLS_TO_SAP which does the OLE for you)&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2019 19:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796665#M40515</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-02-16T19:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel file from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796666#M40516</link>
      <description>&lt;P&gt;You can use this code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lv_app_server_file TYPE rlgrap-filename,
        ls_file_data       TYPE string,
        lt_file_data       TYPE truxs_t_text_data,
        lv_file_separator  TYPE c,
        lv_mess            TYPE string,
        lv_codepage        TYPE cpcodepage.

  DATA: lt_tab_excel TYPE STANDARD TABLE OF alsmex_tabline.

  lv_app_server_file = pa_file.

  CALL FUNCTION 'NLS_GET_FRONTEND_CP'
    EXPORTING
      langu                 = sy-langu
      fetype                = 'MS'
    IMPORTING
      frontend_codepage     = lv_codepage
    EXCEPTIONS
      illegal_syst_codepage = 1
      no_frontend_cp_found  = 2
      internal_or_db_error  = 3
      OTHERS                = 4.

  OPEN DATASET lv_app_server_file FOR INPUT IN TEXT MODE ENCODING UTF-8 MESSAGE lv_mess.
  DO.
    READ DATASET lv_app_server_file INTO ls_file_data.
    IF sy-subrc = 0.
      APPEND ls_file_data TO lt_file_data.
    ELSE.
      EXIT.
    ENDIF.
  ENDDO.
  CLOSE DATASET lv_app_server_file.

  lv_file_separator = ';'.

    CALL FUNCTION 'TEXT_CONVERT_TEX_TO_SAP'
      EXPORTING
        i_field_seperator    = lv_file_separator
        i_tab_raw_data       = lt_file_data
        i_line_header        = 'X'
      TABLES
        i_tab_converted_data = gt_tab
      EXCEPTIONS
        conversion_failed    = 1
        OTHERS               = 2.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Feb 2021 14:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file-from-application-server/m-p/796666#M40516</guid>
      <dc:creator>former_member746581</dc:creator>
      <dc:date>2021-02-28T14:23:36Z</dc:date>
    </item>
  </channel>
</rss>

