<?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 OLE using SUMIF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386874#M1238455</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 m making an Excel workbook with OLE object.&lt;/P&gt;&lt;P&gt;I would like to use the SUMIF function of excel but it doesn't work &lt;/P&gt;&lt;P&gt;I dont understand why because it works with the simple SUM function &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(you can copy/paste it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INCLUDE ole2incl.

DATA application TYPE ole2_object.
DATA excel TYPE ole2_object.
DATA workbook TYPE ole2_object.
DATA cell1 TYPE ole2_object.
DATA cells TYPE ole2_object.

CREATE OBJECT excel 'EXCEL.APPLICATION'.
SET PROPERTY OF excel 'Visible' = 1.
GET PROPERTY OF excel 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
GET PROPERTY OF workbook 'Application' = application.
SET PROPERTY OF application 'SheetsInNewWorkbook' = 1. " nbsheets.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 5
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 'ok'.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 6
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 7
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 5
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 1.


CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 6
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 7
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 4.



CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 8
  #2 = 6.
SET PROPERTY OF cell1 'Value' = '=SUMIF(C5:C7;"ok";F5:F7)'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function works when I use it in the excel after generation that's why I dont understand why it doesn't work during the genration !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the information my excel is in French but it works with the SUM -&amp;gt; SOMME function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ?  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2009 13:47:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-20T13:47:26Z</dc:date>
    <item>
      <title>OLE using SUMIF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386874#M1238455</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 m making an Excel workbook with OLE object.&lt;/P&gt;&lt;P&gt;I would like to use the SUMIF function of excel but it doesn't work &lt;/P&gt;&lt;P&gt;I dont understand why because it works with the simple SUM function &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(you can copy/paste it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INCLUDE ole2incl.

DATA application TYPE ole2_object.
DATA excel TYPE ole2_object.
DATA workbook TYPE ole2_object.
DATA cell1 TYPE ole2_object.
DATA cells TYPE ole2_object.

CREATE OBJECT excel 'EXCEL.APPLICATION'.
SET PROPERTY OF excel 'Visible' = 1.
GET PROPERTY OF excel 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
GET PROPERTY OF workbook 'Application' = application.
SET PROPERTY OF application 'SheetsInNewWorkbook' = 1. " nbsheets.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 5
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 'ok'.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 6
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 7
  #2 = 3.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 5
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 1.


CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 6
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 2.

CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 7
  #2 = 6.
SET PROPERTY OF cell1 'Value' = 4.



CALL METHOD OF excel 'Cells' = cell1
  EXPORTING
  #1 = 8
  #2 = 6.
SET PROPERTY OF cell1 'Value' = '=SUMIF(C5:C7;"ok";F5:F7)'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function works when I use it in the excel after generation that's why I dont understand why it doesn't work during the genration !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the information my excel is in French but it works with the SUM -&amp;gt; SOMME function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ?  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 13:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386874#M1238455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T13:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: OLE using SUMIF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386875#M1238456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an error in your function '=SUMIF(C5:C7;"ok";F5:F7)'? You have semi-colon (&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; where my Excel requires comma (,) characters in the function - but maybe this is different in French?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a SUMIF formula in cell F8 from a copy of your program if I change the last line to&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET PROPERTY OF cell1 'Value' = '=SUMIF(C5:C7,"ok",F5:F7)'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best wishes&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Mar 2009 04:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386875#M1238456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-21T04:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: OLE using SUMIF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386876#M1238457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excactly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel in french version uses ;&lt;/P&gt;&lt;P&gt;Excel in english uses ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOMME.SI(x:y;c;v)  bercomes  SUMIF(x:y,c,v)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 12:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386876#M1238457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T12:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: OLE using SUMIF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386877#M1238458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, OK, I understand now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the code in the example mixed the syntax. It should be &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET PROPERTY OF cell1 'Value' = '=SUMIF(C5:C7,"ok",F5:F7)'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET PROPERTY OF cell1 'Value' = '=SOMME.SI(C5:C7;"ok";F5:F7)'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is really not it, maybe there is some problem similar to that described in [this Microsoft forum post|http://social.microsoft.com/Forums/en-US/vbide/thread/3ff4843c-de78-4575-9f9b-b3f2d9edd917] but as I only have English installed I can't test it myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best wishes&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 14:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386877#M1238458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: OLE using SUMIF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386878#M1238459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The macro by default only understand the english version of formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOMME.SI can't be used !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 16:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole-using-sumif/m-p/5386878#M1238459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T16:21:17Z</dc:date>
    </item>
  </channel>
</rss>

