<?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 How to add a footnote with asterisk to an excel table using ODS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737300#M229844</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running a proc report that I am exporting to excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to put a footnote at the end of the excel sheet on a condition in the table. That is, if a clinic has a certain characteristic e.g. if a clinic has an ID that has an "A", then put an asterisk (*) next to the cell and put a footnote with the asterisk at the end of the excel table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the SAS code that I have written out which works with what I need, except figuring out the footnote.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what I would need to add to the code below?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file ='C:\Excel_table.xlsx';
ods escapechar ='^';
ODS excel options(Embedded_Titles ='yes' sheet_name='New Cases');

title1 j=l h=11pt color=black font=Calibri bold 
"^{style[fontweight=bold]
Summary of ^{style[fontstyle=italic] New} Cases by clinic}";

title2 j=l h=11pt color=black font=Calibri  
"^{style[fontweight=bold]Date Complete: ^{style[color=blue fontstyle=italic]%sysfunc(date(),worddate18.)}}";

 proc report data=have 
 style(header)=[background=darkmagenta color=white font_face='Calibri' fontsize=11pt fontweight=bold]
 style(column)={font_face='Calibri' fontsize=11pt};
  column clinic new_patients new_cases;
  define clinic / group;
  define new_patients / sum;
  define new_cases / sum;

  /*break after Program_Name / summarize style={background=lightgrey};*/

  rbreak after / summarize style=Header;

  Compute after;
  clinic ='GRAND TOTAL';
  endcomp;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Apr 2021 15:59:23 GMT</pubDate>
    <dc:creator>sas_student1</dc:creator>
    <dc:date>2021-04-27T15:59:23Z</dc:date>
    <item>
      <title>How to add a footnote with asterisk to an excel table using ODS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737300#M229844</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running a proc report that I am exporting to excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to put a footnote at the end of the excel sheet on a condition in the table. That is, if a clinic has a certain characteristic e.g. if a clinic has an ID that has an "A", then put an asterisk (*) next to the cell and put a footnote with the asterisk at the end of the excel table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the SAS code that I have written out which works with what I need, except figuring out the footnote.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what I would need to add to the code below?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file ='C:\Excel_table.xlsx';
ods escapechar ='^';
ODS excel options(Embedded_Titles ='yes' sheet_name='New Cases');

title1 j=l h=11pt color=black font=Calibri bold 
"^{style[fontweight=bold]
Summary of ^{style[fontstyle=italic] New} Cases by clinic}";

title2 j=l h=11pt color=black font=Calibri  
"^{style[fontweight=bold]Date Complete: ^{style[color=blue fontstyle=italic]%sysfunc(date(),worddate18.)}}";

 proc report data=have 
 style(header)=[background=darkmagenta color=white font_face='Calibri' fontsize=11pt fontweight=bold]
 style(column)={font_face='Calibri' fontsize=11pt};
  column clinic new_patients new_cases;
  define clinic / group;
  define new_patients / sum;
  define new_cases / sum;

  /*break after Program_Name / summarize style={background=lightgrey};*/

  rbreak after / summarize style=Header;

  Compute after;
  clinic ='GRAND TOTAL';
  endcomp;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 15:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737300#M229844</guid>
      <dc:creator>sas_student1</dc:creator>
      <dc:date>2021-04-27T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a footnote with asterisk to an excel table using ODS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737476#M229928</link>
      <description>&lt;P&gt;I don't see where you add your&amp;nbsp;asterisk, but this should do what you want.&lt;/P&gt;
&lt;P&gt;Run something like this before the proc report:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data _null_;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; set HAVE;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; if index(ID,'A') then do;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; call execute('footnote "* This cell contains an ''A'' ";');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; stop;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 00:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737476#M229928</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-28T00:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a footnote with asterisk to an excel table using ODS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737480#M229931</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is exactly what I needed!&lt;/P&gt;&lt;P&gt;I tweaked the code so it would left justify and change the font. A follow-up how do I change the font size of the footnote? I tried fontsize=11pt or font=11pt but that didnt work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set have ;
if index(client,'*') then do;
call execute 
('footnote justify=left font=Calibri color=black bold  "* Multiple clients are reported here";');
stop;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Apr 2021 02:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737480#M229931</guid>
      <dc:creator>sas_student1</dc:creator>
      <dc:date>2021-04-28T02:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a footnote with asterisk to an excel table using ODS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737481#M229932</link>
      <description>Have you tried option h= ?&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Apr 2021 02:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737481#M229932</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-28T02:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a footnote with asterisk to an excel table using ODS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737483#M229933</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked!!! Whoot whoot! You rock!!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 02:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-footnote-with-asterisk-to-an-excel-table-using-ODS/m-p/737483#M229933</guid>
      <dc:creator>sas_student1</dc:creator>
      <dc:date>2021-04-28T02:54:13Z</dc:date>
    </item>
  </channel>
</rss>

