<?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 keep multiple columns as single header and colour the header in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802469#M315910</link>
    <description>&lt;P&gt;Try Traffic Light.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input pid age gender race drug1 $ drug2 $ event1 $ event2 $;
cards;
101 21 1 1 parac oflox diarr fever
102 21 2 1 dig oflox heada fever
103 31 1 1 nim oflox heada fever
104 43 2 1 dig oflox heada fever
 ;
run;

proc format;
value $ fmt
"Summary data"="red"
"Demography"="orange"
"concomitant"="green"
"Adverse Event"="blue"
;
run;


ods tagsets.excelxp file='c:\temp\want.xls' style=htmlblue ;
proc report data=test nowd  style(header)={background=$fmt.};
columns 
('Summary data' 
('Demography' pid age) 
('concomitant' race gender drug1 drug2) 
("Adverse Event" event1 event2) 
);
define pid/display ;
run;
ods tagsets.excelxp close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1647432262978.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69510i9887DFC86CE6FFA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1647432262978.png" alt="Ksharp_0-1647432262978.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 12:04:33 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-03-16T12:04:33Z</dc:date>
    <item>
      <title>How to keep multiple columns as single header and colour the header</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802243#M315809</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to keep below header as different colour and then export to excel file with ods tagset.excelxp option . How to proceed with this. In the same sheet, I want add data from abc and bcd dataset as separate sheet ( One single excel workbook contain 3 sheets like test, abc and bcd)&lt;/P&gt;&lt;P&gt;Demography --&amp;gt;orange&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;concomitant---&amp;gt;&amp;nbsp;green&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;Adverse Event--&amp;gt; blue &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="header" style="width: 683px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69477i001D241A26598D8A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="header" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;header&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test;
input pid age gender race drug1 $ drug2 $ event1 $ event2 $;
cards;
101 21 1 1 parac oflox diarr fever
102 21 2 1 dig oflox heada fever
103 31 1 1 nim oflox heada fever
104 43 2 1 dig oflox heada fever
 ;
run;&lt;BR /&gt;&lt;BR /&gt;data abc;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;run;&lt;BR /&gt;data bcd;&lt;BR /&gt;set sashelp.heart;&lt;BR /&gt;run;

proc report data=test out=test1;
columns ('Summary data' ('Demography'pid age) ('concomitant'race gender drug1 drug2) ('Adverse Event'event1 event2));
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 15:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802243#M315809</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2022-03-15T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep multiple columns as single header and colour the header</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802244#M315810</link>
      <description>&lt;P&gt;Great example of where looking at the documentation has the answer:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0xcdcilo2yuuwn1t9uks2c1e66e.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0xcdcilo2yuuwn1t9uks2c1e66e.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I may be so bold as to make a recommendation for improvement — use a lighter color blue, this makes the black text of the words Adverse Event easier to read.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 15:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802244#M315810</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-15T15:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep multiple columns as single header and colour the header</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802469#M315910</link>
      <description>&lt;P&gt;Try Traffic Light.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input pid age gender race drug1 $ drug2 $ event1 $ event2 $;
cards;
101 21 1 1 parac oflox diarr fever
102 21 2 1 dig oflox heada fever
103 31 1 1 nim oflox heada fever
104 43 2 1 dig oflox heada fever
 ;
run;

proc format;
value $ fmt
"Summary data"="red"
"Demography"="orange"
"concomitant"="green"
"Adverse Event"="blue"
;
run;


ods tagsets.excelxp file='c:\temp\want.xls' style=htmlblue ;
proc report data=test nowd  style(header)={background=$fmt.};
columns 
('Summary data' 
('Demography' pid age) 
('concomitant' race gender drug1 drug2) 
("Adverse Event" event1 event2) 
);
define pid/display ;
run;
ods tagsets.excelxp close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1647432262978.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69510i9887DFC86CE6FFA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1647432262978.png" alt="Ksharp_0-1647432262978.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 12:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-multiple-columns-as-single-header-and-colour-the/m-p/802469#M315910</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-16T12:04:33Z</dc:date>
    </item>
  </channel>
</rss>

