<?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: Read Excel File in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854979#M47031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi bhavana,&lt;/P&gt;&lt;P&gt;I proceed as follow (because we will used this prog just one time):&lt;/P&gt;&lt;P&gt;1/ save my excel in txt file TAB DELIMITED&lt;/P&gt;&lt;P&gt;2/ create a abap program that read this file and put the data in internal table that contains the excact structure that I want (length, zero leading....)&lt;/P&gt;&lt;P&gt;3/ then from this internal table I create a NEW file that i save on the server.&lt;/P&gt;&lt;P&gt;4/ now I can read read the file in a correct format with "open dataset".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i said, this program will be used one time, so what the hell, it took me 10 minutes to do that and everyone is happy &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way WS_UPLOAD is obsolete. I use&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, i appriciated your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2005 07:58:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-16T07:58:24Z</dc:date>
    <item>
      <title>Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854967#M47019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I can read an excel file by using this code in FORGROUND:&lt;/P&gt;&lt;P&gt;  CREATE OBJECT gv_excel 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;  SET PROPERTY OF gv_excel 'VISIBLE' = 0.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF gv_excel 'WORKBOOKS' = gv_books.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF gv_books 'OPEN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      #1 = p_file&lt;/P&gt;&lt;P&gt;      #2 = 1.&lt;/P&gt;&lt;P&gt;Do.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i lunch my program in Background, I can't read the file.&lt;/P&gt;&lt;P&gt;idea?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 13:03:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854967#M47019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T13:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854968#M47020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From where are you reading this file from?  The local PC?  Like other methods of reading files from the PC,  you can not do it in background.  The background process is not "attached" to a PC, and hence does not know where "C:\test.xls" is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read files from the application server in background using the OPEN DATASET, READ DATASET commmands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 13:06:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854968#M47020</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-15T13:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854969#M47021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;but if use OPEN DATASET i must transform my Excel file to a text file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 13:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854969#M47021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T13:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854970#M47022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the code inside your DO loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 13:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854970#M47022</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-15T13:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854971#M47023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF gv_excel 'CELLS' = gv_cell&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      #1 = p_row&lt;/P&gt;&lt;P&gt;      #2 = p_col.&lt;/P&gt;&lt;P&gt;                                                                        &lt;/P&gt;&lt;P&gt;  GET PROPERTY OF gv_cell 'VALUE' = p_val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move p_val to struct-name.&lt;/P&gt;&lt;P&gt;  append struc to tab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: joseph fryda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 13:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854971#M47023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T13:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854972#M47024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'v tested it, and I am getting junk when reading it from application server using READ DATASET.  Maybe someone has a tip/trick?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 14:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854972#M47024</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-06-15T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854973#M47025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you aleady tried to upload the xls file to your app server via FTP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 14:45:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854973#M47025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T14:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854974#M47026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry to ask but how do you do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 14:53:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854974#M47026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T14:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854975#M47027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you do what?! Uploading the file via FTP?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 14:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854975#M47027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T14:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854976#M47028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes. But I will ask to receive a text file instead an excel it's more easy to read it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;even if can upload the excel file via ftp, what it's give me? Can I read the excel file in background?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 15:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854976#M47028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T15:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854977#M47029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, in thix case you will be able to read the file in btc processing!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 15:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854977#M47029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T15:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854978#M47030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understood,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use open dataset,read dataset when reading from the application server and please make sure you get the file saved in .dat format. You can also get the file saved in txt format but when uploading you have to use split statement with '' in between each field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still want to read it from presentation server please use WS_UPLOAD in which you can read it in excel or txt or ansi format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT the end of the day, it is you who should decide whether you want to read it from appliocation or presentation server or in txt format or xls format or dat format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know if you have any further questions or concerns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Bhavana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 21:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854978#M47030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T21:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854979#M47031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi bhavana,&lt;/P&gt;&lt;P&gt;I proceed as follow (because we will used this prog just one time):&lt;/P&gt;&lt;P&gt;1/ save my excel in txt file TAB DELIMITED&lt;/P&gt;&lt;P&gt;2/ create a abap program that read this file and put the data in internal table that contains the excact structure that I want (length, zero leading....)&lt;/P&gt;&lt;P&gt;3/ then from this internal table I create a NEW file that i save on the server.&lt;/P&gt;&lt;P&gt;4/ now I can read read the file in a correct format with "open dataset".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i said, this program will be used one time, so what the hell, it took me 10 minutes to do that and everyone is happy &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way WS_UPLOAD is obsolete. I use&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, i appriciated your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2005 07:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854979#M47031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-16T07:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854980#M47032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you call Excel this way, you use the OLE2-Automation/SAP Desktop Office Integration to communicate with Excel. Using this technology requires a SAPGui-Connection as in this case the Gui "scripts" Excel (Word etc). When your program runs in background this link is not available therefor the OLE2-Automation fails. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the file with open dataset from the application server does not help as you cannot open Excel for editing (the same holds true if you retrieve the file via ftp or http). Uploading the file from the Desktop (WS_UPLOAD/GUI_UPLOAD/CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_UPLOAD dependent on the R/3-Basis Release you use) on the other hand only works if a Gui is connected (so not if the report runs in background processing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion would be dependent on the Office Version for downloading data to use either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a tab-separated text in an internal table and write the content as a textfile with extension ".xls" to the location where you want to have the Excel. If you then open the file via double-click Excel usualy imports it by using the tab as field-separator (as of ABAP-Basis 620 cl_abap_char_utilities=&amp;gt;horizontal_tab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative you could check out the XML-schema for MS Excel and build an XML by using the iXML-library (or by lots of concatenations and manual masking). This requires (as far as I know) for the iXMl library ABAP Basis-Release 4.6 or higher and for Excel XP or higher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For uploading data just go the other way round, save the Excel as Tab-Separated Text or as XML-file in your external Application and use the split/iXML-Library to extract the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case your report runs in batch you only can use:&lt;/P&gt;&lt;P&gt;open dataset or http/ftp requests to exchange files. Please keep in mind that for using these possibilities you have to be able to access the resources from the application server the program is running on (firewalls/authorization/missing proxies etc. may cause problems).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2005 08:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854980#M47032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-16T08:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Read Excel File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854981#M47033</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;Can you pls send me all the methods related to excel file reading, using OLE interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 12:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-excel-file/m-p/854981#M47033</guid>
      <dc:creator>graghavendra_sharma</dc:creator>
      <dc:date>2006-05-30T12:56:38Z</dc:date>
    </item>
  </channel>
</rss>

