<?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: export with excel function in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305141#M17170</link>
    <description>&lt;P&gt;Use ods tagesets.excelxp (or the other one), and set the attribute of the tag i.e:&lt;/P&gt;
&lt;P&gt;compute result;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if category="total" then call&amp;nbsp;define (_COL_,'style', 'style={tagattr="formula:SUM(E2:E20)"}');&lt;/P&gt;
&lt;P&gt;endcomp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2016 16:47:57 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-10-17T16:47:57Z</dc:date>
    <item>
      <title>export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305127#M17169</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to export and add a function at cell E21: "=SUM(E2:E20)"&amp;nbsp; to calculate total weight of all people.how to do it in SAS??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't want the result from SAS sum function or proc means from SAS, I only want excel output with&amp;nbsp;excel function in that cell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS code:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;export&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=sashelp.class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=xlsx &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outfile&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"c:\temp\class1017.XLSx"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;replace&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305127#M17169</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2016-10-17T15:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305141#M17170</link>
      <description>&lt;P&gt;Use ods tagesets.excelxp (or the other one), and set the attribute of the tag i.e:&lt;/P&gt;
&lt;P&gt;compute result;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if category="total" then call&amp;nbsp;define (_COL_,'style', 'style={tagattr="formula:SUM(E2:E20)"}');&lt;/P&gt;
&lt;P&gt;endcomp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 16:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305141#M17170</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-17T16:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305168#M17171</link>
      <description>&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to set the Formulas=Yes option to within tagsets as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the demo for an example with formulas&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305168#M17171</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-17T19:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305200#M17172</link>
      <description>&lt;P&gt;Would you please give me the full program SAS code? I can't figured it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305200#M17172</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2016-10-17T19:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305201#M17173</link>
      <description>I can't open the second link.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 17 Oct 2016 19:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305201#M17173</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2016-10-17T19:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305202#M17174</link>
      <description>&lt;P&gt;See the link now. It has full code.&lt;/P&gt;
&lt;P&gt;Note that formulas need to use RowColumn referencing, A### referencing typically seen in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305202#M17174</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-17T19:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305258#M17175</link>
      <description>&lt;P&gt;Another option, assuming you are summing the values of a column could be to use proc print with a SUM statement.Then the value is calculated by SAS before export and no issues with the Excel formula at all.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 22:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/305258#M17175</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-17T22:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: export with excel function</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/308298#M17283</link>
      <description>ods listing close;&lt;BR /&gt;  ods tagsets.excelxp file="test.xls" style=statistical &lt;BR /&gt;&lt;BR /&gt;options(auto_subtotals='yes' ABSOLUTE_COLUMN_WIDTH='8,8,7,9,9,8,12,6,15,15,9'&lt;BR /&gt;          frozen_headers='yes' sheet_name='CHECK'&lt;BR /&gt;              autofilter='all' );&lt;BR /&gt;&lt;BR /&gt;  proc print data=p1 noobs label split='*';&lt;BR /&gt;*id a b c;&lt;BR /&gt;var Mai class   MON  REV PI a b c &lt;BR /&gt;;&lt;BR /&gt;var diff/style={tagattr='formula:RC[-6]/RC[-5]'};&lt;BR /&gt;  sum rev pi wei;&lt;BR /&gt;label &lt;BR /&gt;&lt;BR /&gt;CLASS='_CLASS   * * ' &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;diff='Rev*Per*Pi  * * '&lt;BR /&gt;;&lt;BR /&gt;  run;quit;&lt;BR /&gt;  ods tagsets.excelxp close;&lt;BR /&gt;  ods listing;</description>
      <pubDate>Mon, 31 Oct 2016 15:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/export-with-excel-function/m-p/308298#M17283</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2016-10-31T15:27:21Z</dc:date>
    </item>
  </channel>
</rss>

