<?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 merge vertically cells in proc report (xls) ? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402505#M19547</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I merge vertically cells in proc report ? (see example for column unit price).&lt;/P&gt;&lt;P&gt;I have try with spanrows but it doesn't work (it seems to work&amp;nbsp;only for first column but it isn't in my case).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2017 20:34:10 GMT</pubDate>
    <dc:creator>Atennissa</dc:creator>
    <dc:date>2017-10-09T20:34:10Z</dc:date>
    <item>
      <title>how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402505#M19547</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I merge vertically cells in proc report ? (see example for column unit price).&lt;/P&gt;&lt;P&gt;I have try with spanrows but it doesn't work (it seems to work&amp;nbsp;only for first column but it isn't in my case).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 20:34:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402505#M19547</guid>
      <dc:creator>Atennissa</dc:creator>
      <dc:date>2017-10-09T20:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402604#M19555</link>
      <description>&lt;P&gt;SPANROWS works with GROUP or ORDER columns.&amp;nbsp; Below is code and output using the SASHELP.CLASS data set.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class nowd spanrows;
  columns name age sex height weight;
  define sex / group style(column)={vjust=c just=c};
  title j=l 'SPANROWS option works on column that uses GROUP or ORDER';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SPANROWS in PROC REPORT works with GROUP or ORDER columns" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15737iA3DA4E20EC5135E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPANROWS in PROC REPORT works on GROUP or ORDER column.jpg" alt="SPANROWS in PROC REPORT works with GROUP or ORDER columns" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SPANROWS in PROC REPORT works with GROUP or ORDER columns&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 05:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402604#M19555</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-10-10T05:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402808#M19570</link>
      <description>&lt;P&gt;My table has an "across" statement and it seems to create a problem with spanrows. Here is an example of my SAS code with sashelp.class.&lt;BR /&gt;&lt;BR /&gt;data test2;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;id_num = "Information";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;ods excel file="&amp;amp;export" options(sheet_name="test");&lt;BR /&gt;ods escapechar='~';&lt;BR /&gt;ods text="~S={font_size=14pt font_weight=bold vjust=m}~SAS Community";&lt;BR /&gt;ods text="~S={font_size=14pt font_weight=bold vjust=m}";&lt;BR /&gt;proc report data=test2 nowd&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;column ('Measures' weight height)&amp;nbsp; id_num, (name age sex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define weight / display ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define height / display ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define id_num / across '' ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define name / display ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define age / display&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;define sex / display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;run;&lt;BR /&gt;&lt;BR /&gt;ods excel close;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another way to have headers "Measures" and "Information" and also to have sex in merged cells like in your example ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402808#M19570</guid>
      <dc:creator>Atennissa</dc:creator>
      <dc:date>2017-10-10T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402843#M19573</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="&amp;amp;export" options(sheet_name="test");
ods escapechar='~';
ods text="~S={font_size=14pt font_weight=bold vjust=m}~SAS Community";
ods text="~S={font_size=14pt font_weight=bold vjust=m}";

proc report data=sashelp.class nowd spanrows ;
     column ('Measures' weight height)  ('Information' name age sex);
     define sex / order style(column)={vjust=c just=c};
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC REPORT using SPANROWS with order variable and header" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15751i2EB7E8D2C116297C/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC REPORT using SPANROWS with headers.jpg" alt="PROC REPORT using SPANROWS with order variable and header" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC REPORT using SPANROWS with order variable and header&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 16:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402843#M19573</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-10-10T16:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402939#M19574</link>
      <description>&lt;P&gt;Thanks a lot Suzanne for this answer.&lt;/P&gt;&lt;P&gt;I have another constraint in my table that I didn't mention and which explains the way I've decided to code that table.&amp;nbsp; I need different styles for headers "Measures" and Information". That's why in my SAS code I can specify a general header style in proc report which is applied to "Measures" and another header style in the define line for "Informations". How can I do that in your example ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 20:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402939#M19574</guid>
      <dc:creator>Atennissa</dc:creator>
      <dc:date>2017-10-10T20:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402947#M19575</link>
      <description>&lt;P&gt;In the code below, I applied different colors to the "Measures" and "Information" headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I figured out how to do this based on Cynthia Zender's reply (method 2) on this thread:&amp;nbsp; &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-STYLE-IN-HEADER/td-p/91381" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-STYLE-IN-HEADER/td-p/91381&lt;/A&gt;&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="&amp;amp;export" options(sheet_name="test");
ods escapechar='~';
ods text="~S={font_size=14pt font_weight=bold vjust=m}~SAS Community";
ods text="~S={font_size=14pt font_weight=bold vjust=m}";

proc report data=sashelp.class nowd spanrows ;
     column ('~S={foreground=purple}Measures' weight height)  
            ('~S={foreground=green}Information' name age sex);
     define sex / order style(column)={vjust=c just=c};
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC REPORT using SPANROWS with headers with different styles" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15758iE9FF587FECBAE7BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC REPORT using SPANROWS with headers with different styles.jpg" alt="PROC REPORT using SPANROWS with headers with different styles" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC REPORT using SPANROWS with headers with different styles&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 20:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/402947#M19575</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-10-10T20:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to merge vertically cells in proc report (xls) ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/403284#M19583</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks a lot, it's perfect !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 17:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-to-merge-vertically-cells-in-proc-report-xls/m-p/403284#M19583</guid>
      <dc:creator>Atennissa</dc:creator>
      <dc:date>2017-10-11T17:44:48Z</dc:date>
    </item>
  </channel>
</rss>

