<?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: How to compute a Cell for Excel output using  the PROC REPORT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/883099#M348950</link>
    <description>&lt;P&gt;It worked, Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2023 13:57:09 GMT</pubDate>
    <dc:creator>SASuserlot</dc:creator>
    <dc:date>2023-06-30T13:57:09Z</dc:date>
    <item>
      <title>How to compute a Cell for Excel output using  the PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/882707#M348740</link>
      <description>&lt;P&gt;&amp;nbsp;I have the data that need to be output in Excel format, I am having difficulty how I can create a spanning extra cell like shown in the image. Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input student age math1 math2 sci1 sci2;
cards;
01 10 36 34 54 45
02 12 34 43 45 56 
03 12 34 43 45 56 
04 16 34 43 15 46 
05 15 34 47 75 56 
06 12 34 43 35 76 
07 15 33 43 25 66 
08 14 34 43 55 56 
09 12 38 41 45 54 

;
run; 

ods listing close;
ods ESCAPECHAR = '^';
ods excel file="\desktop\est1.xlsx" 
options(sheet_name='LIFE Version'
  autofilter='all' ) style= SeasidePrinter   ;

/*BASELINE VERSION -LIFETIME*/

PROC REPORT data=have nowindows
					      style(report)=[font=("Times New Roman", 10pt) protectspecialchars=on]
					      style(header)=[font=("Times New Roman", 10pt, bold) backgroundcolor= yellow just=center protectspecialchars=on]
					      style(column)=[font=("Times New Roman", 10pt) protectspecialchars=on];
 *where cond2='Y';

      COLUMN    student age math1 math2 sci1 sci2;

      DEFINE student	/ "student" display style=[just=c vjust=t cellwidth=2.882cm /*tagattr='type:num format:Text'*/];
      DEFINE age 		/"Age" display style=[just=c vjust=t cellwidth=1.5cm /*tagattr='type:num format:Text'*/];
	  DEFINE math1		/ "Maths 1" display style=[just=c vjust=t cellwidth=1.882cm tagattr='type:num '];
      DEFINE math2 		/"Maths 2" display style=[just=c vjust=t cellwidth=2.5cm /*tagattr='type:num format:Text'*/];
      DEFINE sci1 		/"Science 1" display style=[just=c vjust=t cellwidth= 2 cm /*tagattr='type:num format:Text'*/];
      DEFINE sci2 		/"Science 2" display style=[just=c vjust=t cellwidth= 2 cm /*tagattr='type:num format:Text'*/];

run;

ods excel close;
ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;How I have&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1687900208519.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85425i6BD43E4E89EA304A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1687900208519.png" alt="SASuserlot_0-1687900208519.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How I want&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_1-1687900256129.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85426i29E55F5FE191CEBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_1-1687900256129.png" alt="SASuserlot_1-1687900256129.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 21:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/882707#M348740</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2023-06-27T21:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute a Cell for Excel output using  the PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/882717#M348746</link>
      <description>&lt;P&gt;This gets you closer:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  COLUMN    student age ('Maths Total' math1 math2) ('Science Total' sci1 sci2);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 22:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/882717#M348746</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-27T22:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute a Cell for Excel output using  the PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/883099#M348950</link>
      <description>&lt;P&gt;It worked, Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 13:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compute-a-Cell-for-Excel-output-using-the-PROC-REPORT/m-p/883099#M348950</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2023-06-30T13:57:09Z</dc:date>
    </item>
  </channel>
</rss>

