<?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: ODS EXCEL display &amp;quot;Total&amp;quot; label PROC report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813457#M321054</link>
    <description>Hi, thank you for your request. Would you mind giving an example of how can i do that ?</description>
    <pubDate>Mon, 16 May 2022 13:41:46 GMT</pubDate>
    <dc:creator>elsfy</dc:creator>
    <dc:date>2022-05-16T13:41:46Z</dc:date>
    <item>
      <title>ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813183#M320883</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In the "COMPUTE AFTER" instruction, i want to display in the summary row "TOTAL" as a label. It works with proc report result &amp;amp; html output but when i use ODS EXCEL, the cell is empty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc report data= a 
	style(column)={backgroundcolor=white cellwidth=2 bordercolor=white  just=r width=150 font_weight=bold tagattr='format:###,###,###,###,###0') ; 

columns ("^{style[backgroundcolor=MediumVioletRed color=white]Category}" var1 var2 var3 var4 var5 var6 var7) 
;
define var1 / display;
define var2 / display ;
define var3  / display ;
define var4 / display  ; 
define var5 / display  ;  
define var6 / display  ;  &lt;BR /&gt;define var7 / display  ;  &lt;BR /&gt;
rbreak after / summarize ; 
 
compute after ;  
call define ('var4','style','style={bordertopcolor=lightgrey borderbottomcolor=lightgrey}') ; 
&lt;STRONG&gt;if _break_ ne ' ' then call define ('var5','style','style=[pretext="Total" bordertopcolor=lightgrey borderbottomcolor=lightgrey]') ;
&lt;/STRONG&gt;endcomp ; 
run ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isgnr_0-1652443660906.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71417i76D083DB3AC46D6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_0-1652443660906.png" alt="isgnr_0-1652443660906.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;in the yellow cell in excel, it must be written "Total".&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 12:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813183#M320883</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-13T12:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813186#M320885</link>
      <description>&lt;P&gt;This exact question is answered here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-can-you-place-descriptive-text-in-a-BREAK-or-RBREAK/td-p/431401" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-can-you-place-descriptive-text-in-a-BREAK-or-RBREAK/td-p/431401&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 12:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813186#M320885</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-13T12:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813190#M320887</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;doing this, it's not working :&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data= a 
	style(column)={backgroundcolor=white cellwidth=2 bordercolor=white  just=r width=150 font_weight=bold tagattr='format:###,###,###,###,###0') ; 

columns ("^{style[backgroundcolor=MediumVioletRed color=white]Category}" var1 var2 var3 var4 var5 var6 var7) 
;
define var1 / display;
define var2 / display ;
define var3  / display ;
define var4 / display  ; 
define var5 / display  ;  
define var6 / display  ;  define var7 / display  ;  
rbreak after / summarize ; 
 
compute after ;  
call define ('var4','style','style={bordertopcolor=lightgrey borderbottomcolor=lightgrey}') ; 
endcomp ; 
compute after var5 ; 
var5 = "TOTAL' ; &lt;BR /&gt;endcomp ;
run ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With this error message : "ERROR: You can only BREAK on GROUPing and ORDERing variables."&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 12:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813190#M320887</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-13T12:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813191#M320888</link>
      <description>&lt;P&gt;That's because you must have a GROUP or ORDER variable to use BREAK, and you don't have that. So maybe yours is not the exact same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example that should work without a GROUP or ORDER variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 length sex $ 40;
 set sashelp.class;
 sex=ifc(sex='F','Female','Male');
run;
proc report data=class nowd; 
    columns sex height weight;
    define sex/display;
    define height/display mean format=10.1;
    define weight/display mean format=10.1;
    rbreak after/summarize;
    	compute after;
	  sex='Mean';
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 12:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813191#M320888</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-13T12:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813194#M320889</link>
      <description>It's not working not even on the HTML proc report output</description>
      <pubDate>Fri, 13 May 2022 13:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813194#M320889</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-13T13:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813195#M320890</link>
      <description>&lt;P&gt;IMPORTANT CONCEPT: saying it doesn't work and providing no additional information never helps. The next question is always to show us&amp;nbsp; the LOG and/or the incorrect output.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813195#M320890</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-13T13:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813225#M320899</link>
      <description>&lt;P&gt;So i tried this but it returns an empty cell in the final output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc report data= a 
	style(column)={backgroundcolor=white cellwidth=2 bordercolor=white  just=r width=150 font_weight=bold tagattr='format:###,###,###,###,###0') ; 

columns ("^{style[backgroundcolor=MediumVioletRed color=white]Category}" var1 var2 var3 var4 var5 var6 var7) 
;
define var1 / display;
define var2 / display ;
define var3  / display ;
define var4 / display  ; 
define var5 / display  ;  
define var6 / display  ;  define var7 / display  ;  
rbreak after / summarize ; 
 
compute after ;  
call define ('var4','style','style={bordertopcolor=lightgrey borderbottomcolor=lightgrey}') ; 
var5 = "TOTAL";
endcomp ; 
run ; &lt;/LI-CODE&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813225#M320899</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-13T13:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813231#M320904</link>
      <description>&lt;P&gt;I guess I am going to need to see a portion of data set A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide the data set as SAS data step code, which you can type in yourself or using&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;. Do not provide the data in any other form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Minor detail which probably doesn't matter in this case, but we prefer it if you provide the LOG when the code doesn't work.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 14:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813231#M320904</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-13T14:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813240#M320910</link>
      <description>Hi:&lt;BR /&gt;  And, in this previous posting, I showed how to get Total and how to hide the cell borders: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291&lt;/A&gt; I'm confused why the accepted solution to the previous posting is not working now.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 13 May 2022 15:12:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813240#M320910</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-13T15:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813245#M320914</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi:&lt;BR /&gt;And, in this previous posting, I showed how to get Total and how to hide the cell borders: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291&lt;/A&gt; I'm confused why the accepted solution to the previous posting is not working now.&lt;BR /&gt;Cynthia&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A guess is that all of the OP variables are numeric so the column doesn't like "Total"?&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 15:28:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813245#M320914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-13T15:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813263#M320928</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi:&lt;BR /&gt;And, in this previous posting, I showed how to get Total and how to hide the cell borders: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/Proc-report-Merge-grand-total-cells-or-hide-some/m-p/811888#M320291&lt;/A&gt; I'm confused why the accepted solution to the previous posting is not working now.&lt;BR /&gt;Cynthia&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A guess is that all of the OP variables are numeric so the column doesn't like "Total"?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Good guess, I like it. If so, the user could assign it a value like -9999 and then format the variable such that -9999 appears as "Total"&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 16:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813263#M320928</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-13T16:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813268#M320929</link>
      <description>&lt;P&gt;Hi: That's one workaround. Using PRETEXT is another workaround (but that isn't reliable in all destinations) and just making a COMPUTED variable that's character is the method I usually use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fakedata;
  set sashelp.shoes(obs=10);
  var1 = Region;
  var2 = Subsidiary;
  var3 = round(divide(inventory,10000),1.);
  var4 = sales;
  var5 = returns;
run;

title;

  
ods excel file='c:\temp\numborders.xlsx';
proc report data=fakedata
  style(summary)=Header{font_weight=bold font_size=2 background=lightgrey just=r };
  column var1 var2 var3 alt3 var4 var5;
  define var1 / display;
  define var2 / display;
  define var3 / display f=5.0 noprint;
  define alt3 / computed f=$5. style(column)={just=r};
  define var4 / f=dollar9.0;
  define var5 / f=dollar9.0;
  rbreak after / summarize;
  compute alt3 / character length=5;
    alt3 = put(var3,5.0);
  endcomp;
  compute after;
     call define('var1','style','style={borderrightcolor=lightgrey}');
     call define('var2','style','style={borderleftcolor=lightgrey borderrightcolor=lightgrey}');
     call define('alt3','style','style={borderleftcolor=lightgrey}');
	 alt3 = 'Total';
  endcomp;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 13:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813268#M320929</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-16T13:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL display "Total" label PROC report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813457#M321054</link>
      <description>Hi, thank you for your request. Would you mind giving an example of how can i do that ?</description>
      <pubDate>Mon, 16 May 2022 13:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-EXCEL-display-quot-Total-quot-label-PROC-report/m-p/813457#M321054</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-16T13:41:46Z</dc:date>
    </item>
  </channel>
</rss>

