<?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: Opening Excel Spreadsheet from ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885486#M52403</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;I'm using the same technique to run a macro in excel which selects a tab to become active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I need it to save excel &amp;amp; return to SAP, but I'm left in Excel.  Do you know how to do this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2005 10:12:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-03-04T10:12:18Z</dc:date>
    <item>
      <title>Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885482#M52399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to put data from an ABAP program into an existing Excel spreadsheet? I know how to put the data into a new spreadsheet but my users want to put the data into an existing spreadsheet where they have developed macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Becky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2005 20:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885482#M52399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-07T20:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885483#M52400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are going to want to look into OLE2 controls.  &lt;/P&gt;&lt;P&gt;Check demo program RSDEMO01.  I am using 46c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2005 20:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885483#M52400</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-01-07T20:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885484#M52401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can open the Excel file in append mode, that will help you to retain the previous entries. Then in case of the Macro, i am not sure about that, if i find anything i will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kathirvel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Jan 2005 06:10:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885484#M52401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-08T06:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885485#M52402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Becky&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a procedure using OLE automation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA gs_excel TYPE ole2_object .
DATA gs_wbooks TYPE ole2_object .
DATA gs_wbook TYPE ole2_object .
DATA gs_application TYPE ole2_object .

CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
SET PROPERTY OF gs_excel 'Visible' = 1 .
GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
GET PROPERTY OF gs_wbooks 'Application' = gs_application .

*--Opening the existing document
CALL METHOD OF gs_wbooks 'Open' = gs_wbook
     EXPORTING #1 = &amp;lt;file_path_var&amp;gt; .

"*--After this point you can go on processing the sheet
using OLE Automation techniques"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is just the template to be stored you can save the template .xls file at the application server each time downloading it to a temporary place to open. Or you can store it at SAP Office templates folder. For SAP Office operations you can inspect "BC_SO_*" masked FMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as a last thing, let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;&lt;/P&gt;&lt;P&gt;- one 10 points (solved)&lt;/P&gt;&lt;P&gt;- two 6 points (very helpful answer)&lt;/P&gt;&lt;P&gt;- many 2 points (helpful answer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jan 2005 14:09:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885485#M52402</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-01-09T14:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885486#M52403</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;I'm using the same technique to run a macro in excel which selects a tab to become active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I need it to save excel &amp;amp; return to SAP, but I'm left in Excel.  Do you know how to do this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2005 10:12:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885486#M52403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-04T10:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885487#M52404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls also check Thomas Jung Weblogs&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2005/02/14/bsp-and-microsoft-excel--learning-to-live-together&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2005/02/23/bsp-and-microsoft-excel--learning-to-live-together-part-2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2005 10:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885487#M52404</guid>
      <dc:creator>eddy_declercq</dc:creator>
      <dc:date>2005-03-04T10:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885488#M52405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is below, it leaves me in Excel after running the macro rather than returning to my ABAP??&lt;/P&gt;&lt;P&gt;DATA gs_excel TYPE ole2_object .&lt;/P&gt;&lt;P&gt;DATA gs_wbooks TYPE ole2_object .&lt;/P&gt;&lt;P&gt;DATA gs_wbook TYPE ole2_object .&lt;/P&gt;&lt;P&gt;DATA gs_application TYPE ole2_object .&lt;/P&gt;&lt;P&gt;CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .&lt;/P&gt;&lt;P&gt;SET PROPERTY OF gs_excel 'Visible' = 1 .&lt;/P&gt;&lt;P&gt;GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .&lt;/P&gt;&lt;P&gt;GET PROPERTY OF gs_wbooks 'Application' = gs_application .&lt;/P&gt;&lt;P&gt;*--Opening the existing document&lt;/P&gt;&lt;P&gt;CALL METHOD OF gs_wbooks 'Open' = gs_wbook&lt;/P&gt;&lt;P&gt;EXPORTING #1 = 'C:\BOOK1.XLS'.&lt;/P&gt;&lt;P&gt;CALL METHOD OF GS_EXCEL 'RUN' EXPORTING #1 = 'MACRO4'.&lt;/P&gt;&lt;P&gt;FREE OBJECT EXCEL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2005 10:40:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885488#M52405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-04T10:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Opening Excel Spreadsheet from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885489#M52406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may I ask you how do you define your 'MACRO4'?&lt;/P&gt;&lt;P&gt;Is this excel macro or ABAP macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 21:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-excel-spreadsheet-from-abap/m-p/885489#M52406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T21:13:50Z</dc:date>
    </item>
  </channel>
</rss>

