<?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: Does SAS ODS support Excel Array Formulas (CSE-Formulas)? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Does-SAS-ODS-support-Excel-Array-Formulas-CSE-Formulas/m-p/580175#M23160</link>
    <description>&lt;P&gt;I don't know of a way to have ODS embed excel formulas into an excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, you could use R and a package like openxlsx or xlconnect and SAS IML to add Excel functions to an excel spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To improve the functionality of creating excel files from within SAS, I create the data to be placed into an excel file using SAS and then call IML from within SAS to invoke R, pass the data to R and any commands associated with openxlsx or xlconnect to create and modify the excel file I want to create.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This paper provides details on how we do that:&lt;/P&gt;&lt;P&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf" target="_blank"&gt;https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2019 15:28:53 GMT</pubDate>
    <dc:creator>DWilson</dc:creator>
    <dc:date>2019-08-09T15:28:53Z</dc:date>
    <item>
      <title>Does SAS ODS support Excel Array Formulas (CSE-Formulas)?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Does-SAS-ODS-support-Excel-Array-Formulas-CSE-Formulas/m-p/559269#M22761</link>
      <description>&lt;P&gt;Hey guys I hope you are doing marvelously well,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to write Excel ArrayFormulas in ODS? To create legacy ArrayFormulas (prior to 2018), you need to press Ctrl+Shift+Enter in Excel. I need to do this in SAS ODS however for automatic reporting. I am using SAS Data Integration Studio 4.8 and Microsoft Office 2010.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have so far:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;[tagattr= "formula: =COUNT(1/FREQUENCY(IF((SUBTOTAL(3,OFFSET(R[+4]C[-15],ROW(R[+4]C[-15]:R[+&amp;amp;anzahlZeilen.]C[-15])-ROW(R[+4]C[-15]),0))=1) * (R[+4]C[-15]:R[+&amp;amp;anzahlZeilen.]C[-15]&amp;lt;&amp;gt;""""), MATCH(R[+4]C[-15]:R[+&amp;amp;anzahlZeilen.]C[-15],R[+4]C[-15]:R[+&amp;amp;anzahlZeilen.]C[-15],0)), ROW(INDIRECT(""1:""&amp;amp;COUNTA(R[+4]C[-15]:R[+&amp;amp;anzahlZeilen.]C[-15])))))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This results in the following Excel Formula:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;=COUNT(1/FREQUENCY(IF((SUBTOTAL(3;OFFSET(C10;ROW(C10:C4293)-ROW(C10);0))=1) * (C10:C4293&amp;lt;&amp;gt;""); MATCH(C10:C4293;C10:C4293;0)); ROW(INDIRECT("1:"&amp;amp;COUNTA(C10:C4293)))))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The results is I am looking for however is (same as above but encapsulated with {}):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;{=ANZAHL(1/HÄUFIGKEIT(WENN((TEILERGEBNIS(3;BEREICH.VERSCHIEBEN(C10;ZEILE(C10:C4293)-ZEILE(C10);0))=1) * (C10:C4293&amp;lt;&amp;gt;""); VERGLEICH(C10:C4293;C10:C4293;0)); ZEILE(INDIREKT("1:"&amp;amp;ANZAHL2(C10:C4293)))))}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any solutions or workarounds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Houssam&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 10:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Does-SAS-ODS-support-Excel-Array-Formulas-CSE-Formulas/m-p/559269#M22761</guid>
      <dc:creator>Houssam</dc:creator>
      <dc:date>2019-05-16T10:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Does SAS ODS support Excel Array Formulas (CSE-Formulas)?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Does-SAS-ODS-support-Excel-Array-Formulas-CSE-Formulas/m-p/580175#M23160</link>
      <description>&lt;P&gt;I don't know of a way to have ODS embed excel formulas into an excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, you could use R and a package like openxlsx or xlconnect and SAS IML to add Excel functions to an excel spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To improve the functionality of creating excel files from within SAS, I create the data to be placed into an excel file using SAS and then call IML from within SAS to invoke R, pass the data to R and any commands associated with openxlsx or xlconnect to create and modify the excel file I want to create.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This paper provides details on how we do that:&lt;/P&gt;&lt;P&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf" target="_blank"&gt;https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 15:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Does-SAS-ODS-support-Excel-Array-Formulas-CSE-Formulas/m-p/580175#M23160</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-08-09T15:28:53Z</dc:date>
    </item>
  </channel>
</rss>

