<?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 Merge header cells in report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merge-header-cells-in-report/m-p/49291#M6350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using tagsets.ExcelXp to export data to excel and have multiple levels on my header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way using tagsets to get the Name variable to merge into the top two left cells?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached picture shows the output at the top and what I'd like at the bottom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file='C:\sample.xls';&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;/P&gt;&lt;P&gt;column ( 'name' name) ('measurements' age sex height weight);&lt;/P&gt;&lt;P&gt;define name /'';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11197i10038F261F0475B3/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="merge cells example.jpg" title="merge cells example.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Mar 2012 00:04:53 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-03-30T00:04:53Z</dc:date>
    <item>
      <title>Merge header cells in report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merge-header-cells-in-report/m-p/49291#M6350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using tagsets.ExcelXp to export data to excel and have multiple levels on my header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way using tagsets to get the Name variable to merge into the top two left cells?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached picture shows the output at the top and what I'd like at the bottom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file='C:\sample.xls';&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;/P&gt;&lt;P&gt;column ( 'name' name) ('measurements' age sex height weight);&lt;/P&gt;&lt;P&gt;define name /'';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11197i10038F261F0475B3/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="merge cells example.jpg" title="merge cells example.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 00:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merge-header-cells-in-report/m-p/49291#M6350</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-03-30T00:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Merge header cells in report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merge-header-cells-in-report/m-p/49292#M6351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&amp;nbsp; PROC REPORT does not give you a way to merge cells the way you want. You can put the label for NAME on the same row with AGE, SEX, HEIGHT and WEIGHT labels. but with your current code, the string in your spanning header for NAME will be on the same row with the label 'Measurements'. Either way, you will have 1 row for the text 'Measurements' and 1 row for the column headers. The row created for 'Measurements" will put an empty cell above the label for NAME. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; TABULATE has a BOX area that looks the way you want, but TABULATE usually does summary reports and while you could get SEX into the report, you could not get it positioned the way you want. And, with 2 variables in the ROW dimension, you couldn't get them both in the BOX and lined up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Compare the 2 outputs produced by the program below. I think the REPORT example looks better than the TABULATE example and a detailed report is easier to produce with PROC REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;ods tagsets.excelxp file='C:\temp\sample.xls';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc report data=sashelp.class nowd split='*';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;column name ('measurements' age sex height weight);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;define name /'Name';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc tabulate data=sashelp.class;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp; class name sex;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var age height weight;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp; table name*sex,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum='Measurements'*(age height weight)/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; box='Box Area';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 04:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merge-header-cells-in-report/m-p/49292#M6351</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-30T04:28:38Z</dc:date>
    </item>
  </channel>
</rss>

