<?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: Selecting multiple Ranges in Excel using OLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913676#M1330202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever get an answer to this question?  I"m having the same issue and would appreciate any help you could provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I perform a macro recording in excel, I can see the range being done two differnt ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 1:&lt;/STRONG&gt;  Range selecting from/to&lt;/P&gt;&lt;P&gt;Range("B12:F12").Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Optioin 2:&lt;/STRONG&gt;  Range selecting a set of cells (not continuous)  &amp;lt;-----this is what I'm trying to do via ABAP OLE Automation&lt;/P&gt;&lt;P&gt; Range("B5,E5,G5").Select&lt;/P&gt;&lt;P&gt; Range("G5").Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I"m using...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Cells' = l_cell1  "select cell B13&lt;/P&gt;&lt;P&gt;  EXPORTING #1 = 13&lt;/P&gt;&lt;P&gt;            #2 = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Cells' = l_cell2  "select cell M13&lt;/P&gt;&lt;P&gt;  EXPORTING #1 = 13&lt;/P&gt;&lt;P&gt;            #2 = 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Range' = l_range   "setup range, not this actual does option 1 which is not what i want&lt;/P&gt;&lt;P&gt; EXPORTING #1 = l_cell1&lt;/P&gt;&lt;P&gt;           #2 = l_cell2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD OF l_range 'Select'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....(between here there is some code setting up the chart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD OF pie_chart 'SetSourceData' EXPORTING #1 = l_range&lt;/P&gt;&lt;P&gt;                                                   #2 = 1.  "1 = plot as row, 2 = plot as column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:  Chart is created with all cells between column 2 to 13.  But I just want a chart of coumn 2 and 13.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2009 03:12:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-20T03:12:02Z</dc:date>
    <item>
      <title>Selecting multiple Ranges in Excel using OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913672#M1330198</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;Is there any method by which we can select multiple ranges in excel using OLE. For single range selection i am using the below code. As we select multiple ranges in the Excel sheet manually using CTRL button, likewise i want to know whether there is any method in OLE to select multiple ranges at a time.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD OF gv_application 'RANGE' = gv_range&lt;/P&gt;&lt;P&gt;      EXPORTING #1 = lv_low&lt;/P&gt;&lt;P&gt;      #2 = lv_high.&lt;/P&gt;&lt;P&gt;    CALL METHOD OF gv_range 'SELECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 03:42:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913672#M1330198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T03:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting multiple Ranges in Excel using OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913673#M1330199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SIva , &lt;/P&gt;&lt;P&gt;  To the extend i remember we provide the first and last cell as input to the range , now since you want to select multiple ranges , i would suggest you to use the code provide by you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD OF gv_application 'RANGE' = gv_range &lt;/P&gt;&lt;P&gt;EXPORTING #1 = lv_low &lt;/P&gt;&lt;P&gt;#2 = lv_high. &lt;/P&gt;&lt;P&gt;CALL METHOD OF gv_range 'SELECT'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;multiple times with different values of lv_low and lv_high. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see how the system behaves by setting the visibility parameter of the application as 1 . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do reply in case you have any further concerns .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 03:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913673#M1330199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T03:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting multiple Ranges in Excel using OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913674#M1330200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun,&lt;/P&gt;&lt;P&gt;I have already tried that. When it executes code for second RANGE, First range is getting refreshed and selecting the second range.  But it should select First and Second, should not refresh any range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 04:05:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913674#M1330200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T04:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting multiple Ranges in Excel using OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913675#M1330201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/people/alvaro.tejadagalindo/blog/2009/02/05/excel-ole-and-abap--create-fancy-reports&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 07:53:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913675#M1330201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T07:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting multiple Ranges in Excel using OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913676#M1330202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever get an answer to this question?  I"m having the same issue and would appreciate any help you could provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I perform a macro recording in excel, I can see the range being done two differnt ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 1:&lt;/STRONG&gt;  Range selecting from/to&lt;/P&gt;&lt;P&gt;Range("B12:F12").Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Optioin 2:&lt;/STRONG&gt;  Range selecting a set of cells (not continuous)  &amp;lt;-----this is what I'm trying to do via ABAP OLE Automation&lt;/P&gt;&lt;P&gt; Range("B5,E5,G5").Select&lt;/P&gt;&lt;P&gt; Range("G5").Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I"m using...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Cells' = l_cell1  "select cell B13&lt;/P&gt;&lt;P&gt;  EXPORTING #1 = 13&lt;/P&gt;&lt;P&gt;            #2 = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Cells' = l_cell2  "select cell M13&lt;/P&gt;&lt;P&gt;  EXPORTING #1 = 13&lt;/P&gt;&lt;P&gt;            #2 = 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of sheet 'Range' = l_range   "setup range, not this actual does option 1 which is not what i want&lt;/P&gt;&lt;P&gt; EXPORTING #1 = l_cell1&lt;/P&gt;&lt;P&gt;           #2 = l_cell2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD OF l_range 'Select'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....(between here there is some code setting up the chart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD OF pie_chart 'SetSourceData' EXPORTING #1 = l_range&lt;/P&gt;&lt;P&gt;                                                   #2 = 1.  "1 = plot as row, 2 = plot as column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:  Chart is created with all cells between column 2 to 13.  But I just want a chart of coumn 2 and 13.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 03:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-multiple-ranges-in-excel-using-ole/m-p/5913676#M1330202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-20T03:12:02Z</dc:date>
    </item>
  </channel>
</rss>

