<?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: Pretext and Posttext with ODS Excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Pretext-and-Posttext-with-ODS-Excel/m-p/297047#M60246</link>
    <description>&lt;P&gt;I think I was thinking abou this too hard.&amp;nbsp; I solved this with the following code:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="C:\test\test.xlsx";
proc report data=sashelp.class;
columns Name Sex Age Height Weight Dummy;
define Name /"Name" group;
define Sex /"Sex" group;
define age /"Age" analysis sum;
define height /"Height" analysis sum;
define weight /"Weight" analysis sum;
define dummy /computed noprint;
RBREAK AFTER / SUMMARIZE;

compute dummy/char;
IF _break_='_RBREAK_' then Name="Total";
endcomp;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Sep 2016 19:14:19 GMT</pubDate>
    <dc:creator>statistician13</dc:creator>
    <dc:date>2016-09-07T19:14:19Z</dc:date>
    <item>
      <title>Pretext and Posttext with ODS Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Pretext-and-Posttext-with-ODS-Excel/m-p/297046#M60245</link>
      <description>&lt;P&gt;I am using proc report with ODS Excel.&amp;nbsp; I have applied a style to a summary row and attempted to use the pretext or posttext statement to add the word 'Grand Total' on the summary row, but it doesn't seem to work.&amp;nbsp; It does using ODS PDF, RTF, and HTML however.&lt;BR /&gt;&lt;BR /&gt;Is this a bug with Excel?&amp;nbsp; Does a workaround exist for this?&amp;nbsp; Here's an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="D:\test\Test.xlsx";
proc report data=sashelp.class;
columns Name Sex Age Height Weight Dummy;
define Name /"Name" group;
define Sex /"Sex" group;
define age /"Age" analysis sum;
define height /"Height" analysis sum;
define weight /"Weight" analysis sum;
define dummy /computed noprint;
RBREAK AFTER / SUMMARIZE;

compute dummy;
IF _break_='_RBREAK_' THEN CALL DEFINE('Name','style','style=[pretext="Grand Total" background=red]');
endcomp;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 19:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Pretext-and-Posttext-with-ODS-Excel/m-p/297046#M60245</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2016-09-07T19:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pretext and Posttext with ODS Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Pretext-and-Posttext-with-ODS-Excel/m-p/297047#M60246</link>
      <description>&lt;P&gt;I think I was thinking abou this too hard.&amp;nbsp; I solved this with the following code:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="C:\test\test.xlsx";
proc report data=sashelp.class;
columns Name Sex Age Height Weight Dummy;
define Name /"Name" group;
define Sex /"Sex" group;
define age /"Age" analysis sum;
define height /"Height" analysis sum;
define weight /"Weight" analysis sum;
define dummy /computed noprint;
RBREAK AFTER / SUMMARIZE;

compute dummy/char;
IF _break_='_RBREAK_' then Name="Total";
endcomp;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2016 19:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Pretext-and-Posttext-with-ODS-Excel/m-p/297047#M60246</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2016-09-07T19:14:19Z</dc:date>
    </item>
  </channel>
</rss>

