<?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 Re: Reading Excel file from Application Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209043#M1910841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bad news first. There is no such thing as an easy approach to working with excel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assumed you got the import (in binary format) alright - what would you do then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can never be certain that the contents matches the extension. And excel is not equal to excel.&lt;/P&gt;&lt;P&gt;Through the generations, the format has undergone several changes, probably the reason, why there is no FM dealing with that (which on?) format directly.&lt;/P&gt;&lt;P&gt;Older versions have a proprietory format, which is accessible (with reasonable effort) only by OLE integration.&lt;/P&gt;&lt;P&gt;The provided links will give you some insight but they don't cover the topic by far.&lt;/P&gt;&lt;P&gt;If you really have to read the file from application server, OLE is not an option. On the lucky side, you usually don't have true excel on the application server, unless they got there by some file transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So first step for you - analyse an examplary file on byte level. Which format does it really have.&lt;/P&gt;&lt;P&gt;Some "excel" files are in truth csv-files, only provided with the wrong extension.&lt;/P&gt;&lt;P&gt;If it is really an excel, you can only hope, that it's an xlsx, since they do have a readable format.&lt;/P&gt;&lt;P&gt;Xlsx-files are in truth zip archives, containing a number of xml-files, that can be interpreted.&lt;/P&gt;&lt;P&gt;Don't get me wrong, it's still a lot of work but can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If bad comes to worst and you're stuck with a proprietory xls, you might think of an intermedeate step, involving transferring to presentation server and then, depending on the actual business case, reopening from there by means of OLE, or converting to csv (involving VB-macro?) and process as plain text.&lt;/P&gt;&lt;P&gt;Again, depending on the actual case, there are limitations to this, regarding the file size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is plenty of stuff here on scn and you can dump a lot of hours only by gathering the basics.&lt;/P&gt;&lt;P&gt;On the other hand, you can try to change the outer conditions towards a more easy to handle format (csv)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case - good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 08:19:09 GMT</pubDate>
    <dc:creator>jrg_wulf</dc:creator>
    <dc:date>2015-07-23T08:19:09Z</dc:date>
    <item>
      <title>Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209040#M1910838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am reading Excel file from Application server using OPEN DATASET IN TEXT or BINARY MODE but got dump like &lt;/P&gt;&lt;P&gt;Runtime Errors&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVT_CODEPAGE&lt;/P&gt;&lt;P&gt;Except.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CX_SY_CONVERSION_CODEPAGE&lt;/P&gt;&lt;P&gt;Please suggest how to read Excel file from Application server into internal table,kindly suggest me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 07:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209040#M1910838</guid>
      <dc:creator>former_member382811</dc:creator>
      <dc:date>2015-07-23T07:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209041#M1910839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer this link it surely help you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://scn.sap.com/thread/3714770"&gt;https://scn.sap.com/thread/3714770&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 07:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209041#M1910839</guid>
      <dc:creator>hiriyappa_myageri</dc:creator>
      <dc:date>2015-07-23T07:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209042#M1910840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or refer to &lt;A href="http://wiki.scn.sap.com/wiki/display/ABAP/abap2xlsx" title="http://wiki.scn.sap.com/wiki/display/ABAP/abap2xlsx"&gt;abap2xlsx - ABAP Development - SCN Wiki&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 07:40:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209042#M1910840</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2015-07-23T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209043#M1910841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bad news first. There is no such thing as an easy approach to working with excel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assumed you got the import (in binary format) alright - what would you do then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can never be certain that the contents matches the extension. And excel is not equal to excel.&lt;/P&gt;&lt;P&gt;Through the generations, the format has undergone several changes, probably the reason, why there is no FM dealing with that (which on?) format directly.&lt;/P&gt;&lt;P&gt;Older versions have a proprietory format, which is accessible (with reasonable effort) only by OLE integration.&lt;/P&gt;&lt;P&gt;The provided links will give you some insight but they don't cover the topic by far.&lt;/P&gt;&lt;P&gt;If you really have to read the file from application server, OLE is not an option. On the lucky side, you usually don't have true excel on the application server, unless they got there by some file transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So first step for you - analyse an examplary file on byte level. Which format does it really have.&lt;/P&gt;&lt;P&gt;Some "excel" files are in truth csv-files, only provided with the wrong extension.&lt;/P&gt;&lt;P&gt;If it is really an excel, you can only hope, that it's an xlsx, since they do have a readable format.&lt;/P&gt;&lt;P&gt;Xlsx-files are in truth zip archives, containing a number of xml-files, that can be interpreted.&lt;/P&gt;&lt;P&gt;Don't get me wrong, it's still a lot of work but can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If bad comes to worst and you're stuck with a proprietory xls, you might think of an intermedeate step, involving transferring to presentation server and then, depending on the actual business case, reopening from there by means of OLE, or converting to csv (involving VB-macro?) and process as plain text.&lt;/P&gt;&lt;P&gt;Again, depending on the actual case, there are limitations to this, regarding the file size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is plenty of stuff here on scn and you can dump a lot of hours only by gathering the basics.&lt;/P&gt;&lt;P&gt;On the other hand, you can try to change the outer conditions towards a more easy to handle format (csv)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case - good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 08:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209043#M1910841</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2015-07-23T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209044#M1910842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes your right.already done with VB macros to XLS to CSV its working fine.we suggested client to place files in FTP only .csv but they are not agreed to that.we searching to any possibility using abap code to convert.thanks for your answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 08:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209044#M1910842</guid>
      <dc:creator>former_member382811</dc:creator>
      <dc:date>2015-07-23T08:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209045#M1910843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;You can even ask them to convert the XLS to TAB delimited text file or. It's pretty is easy using "SAVE AS" option in Microsoft excel.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I understand that there might be a situation when description may contain comma in it and .csv causes issue. . But tab delimited should work in any situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 08:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209045#M1910843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-23T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209046#M1910844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try to ask they AT LEAST manage them as XLSX which is, basically XML, and then you can use one of the thousand solutions provided here in SCN.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Otherwise you can pretty hardly find a working solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 09:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209046#M1910844</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2015-07-23T09:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209047#M1910845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case your only hope is xlsx.&lt;/P&gt;&lt;P&gt;For that, there are some ready to use aproaches here on scn.&lt;/P&gt;&lt;P&gt;I have done that and it's not too hard.&lt;/P&gt;&lt;P&gt;Basically it consists of three steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;read the content in binary format as xstring&lt;/LI&gt;&lt;LI&gt;unzip it (using class &lt;STRONG&gt;CL_OPENXML_ZIP&lt;/STRONG&gt;)&lt;/LI&gt;&lt;LI&gt;from the contained files, you mainly need two - the worksheetfile and the sharedstrings&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You have to know, that xlsx store all strings of all sheets in one file "sharedstrings.xml" and references them by index.&lt;/P&gt;&lt;P&gt;So basically you have to read the strings into an internal table and whenever a string reference in your worksheet occurs, read the respective line from your indexed table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the class&lt;STRONG&gt; cl_sxml_string_reader&lt;/STRONG&gt; to be very helpful with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-excel-file-from-application-server/m-p/11209047#M1910845</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2015-07-23T10:55:45Z</dc:date>
    </item>
  </channel>
</rss>

