<?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: Exporting to Excel 2 rows of column names using SAS EG. in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/443000#M20594</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Before you buy a book, I recommend searching for user group papers on ODS on the &lt;A href="http://www.lexjansen.com" target="_blank"&gt;www.lexjansen.com&lt;/A&gt; web site -- there's an index of over 30,000 user group papers indexed on the web site. And the papers are free to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I have a few papers that I can recommend:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/366-2013.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/366-2013.pdf&lt;/A&gt; (there's a long reference section at the end of this paper)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/300-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/300-2011.pdf&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/099-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; And if you want to buy a book, there are a few by Art Carpenter on PROC REPORT and by Lake and McKnight on PROC TABULATE that include using ODS with those procedures. And I have a book with Lauren Haworth Lake and Michele Burlew on ODS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 18:32:14 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2018-03-06T18:32:14Z</dc:date>
    <item>
      <title>Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442672#M20583</link>
      <description>&lt;P&gt;How do I export to excel, Row1 with the label names, Row 2 with the SAS variable names, and Rows3 - Rows n the data, which can be numeric or text depending on the column?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 00:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442672#M20583</guid>
      <dc:creator>sallyjo</dc:creator>
      <dc:date>2018-03-06T00:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442688#M20584</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You can't use PROC EXPORT to do it, but you can do it with PROC REPORT and writing code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="two_row_excel.png" style="width: 559px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18990i727D0FF4E94EBEED/image-size/large?v=v2&amp;amp;px=999" role="button" title="two_row_excel.png" alt="two_row_excel.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC REPORT allows spanning headers in the COLUMN statement,where you can put the labels you want and that will allow the variable names to be in row 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code using ODS EXCEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\temp\two_row_head.xlsx';
proc report data=sashelp.class;
column ('Name Label' name) ('Gender Label' sex) ('Age Label' age)
       ('Height Label' height) ('Weight Label' weight);
define name / order;
define sex / display;
define age / display;
define height / display;
define weight / display;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 01:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442688#M20584</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-06T01:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442870#M20586</link>
      <description>&lt;P&gt;Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your timely response!&amp;nbsp; I used your data and code, my excel exported two rows of label names.&amp;nbsp; Can you see what I did incorrectly?&lt;/P&gt;&lt;P&gt;ODS EXCEL FILE = '/Informatics_Customers/GP/GP/Temp/saj/Sample_ODS_Excel.xlsx';&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;REPORT&lt;/STRONG&gt; DATA=Sample_ODS_Excel;&lt;/P&gt;&lt;P&gt;COLUMN ('Name Label' Name)&lt;/P&gt;&lt;P&gt;('Gender Label' Sex )&lt;/P&gt;&lt;P&gt;('Age Label' Age)&lt;/P&gt;&lt;P&gt;('Height Label' Height)&lt;/P&gt;&lt;P&gt;('Weight Label' Weight);&lt;/P&gt;&lt;P&gt;DEFINE Name / Order;&lt;/P&gt;&lt;P&gt;DEFINE Sex / DISPLAY;&lt;/P&gt;&lt;P&gt;DEFINE Age / DISPLAY;&lt;/P&gt;&lt;P&gt;DEFINE Height / DISPLAY;&lt;/P&gt;&lt;P&gt;DEFINE Weight / DISPLAY;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;ODS EXCEL CLOSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Name Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Gender Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Age Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Height Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Weight Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Name Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Gender Label&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Age Label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&gt;&lt;TD&gt;59.8&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;84.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Janet&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;62.5&lt;/TD&gt;&lt;TD&gt;112.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV&gt;Alphabetic List of Variables and Attributes# Variable Type Len Label &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Age Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Height&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Height Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;Name Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Gender Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Weight&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Weight Label&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Mar 2018 13:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442870#M20586</guid>
      <dc:creator>sallyjo</dc:creator>
      <dc:date>2018-03-06T13:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442937#M20588</link>
      <description>Hi:&lt;BR /&gt;  You did not submit the same code. My program used SASHELP.CLASS. Your program used Sample_ODS_Excel -- please run my exact program using SASHELP,CLASS and you should see my SAME results. If I had to guess, I would guess that when you created the test dataset, you had a LABEL statement in your code. So the labels got permanently assigned to the data.&lt;BR /&gt;&lt;BR /&gt;In your case, this is NOT what you want. You do NOT want permanent labels assigned to the data because PROC REPORT uses labels by default. When I used SASHELP.CLASS, I did it because I know that the data does NOT have any permanent labels.&lt;BR /&gt;&lt;BR /&gt;Please run the code as I posted it.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 06 Mar 2018 15:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442937#M20588</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-06T15:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442989#M20593</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I appreciate you timely response to my questions.&amp;nbsp; Do you know if there's a&amp;nbsp; book I can buy so that I can learn all the options available to me with ODS and excel?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 18:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/442989#M20593</guid>
      <dc:creator>sallyjo</dc:creator>
      <dc:date>2018-03-06T18:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/443000#M20594</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Before you buy a book, I recommend searching for user group papers on ODS on the &lt;A href="http://www.lexjansen.com" target="_blank"&gt;www.lexjansen.com&lt;/A&gt; web site -- there's an index of over 30,000 user group papers indexed on the web site. And the papers are free to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I have a few papers that I can recommend:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/366-2013.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/366-2013.pdf&lt;/A&gt; (there's a long reference section at the end of this paper)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/300-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/300-2011.pdf&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/099-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; And if you want to buy a book, there are a few by Art Carpenter on PROC REPORT and by Lake and McKnight on PROC TABULATE that include using ODS with those procedures. And I have a book with Lauren Haworth Lake and Michele Burlew on ODS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 18:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/443000#M20594</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-06T18:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to Excel 2 rows of column names using SAS EG.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/443337#M20599</link>
      <description>&lt;P&gt;Thanks, Cynthia!!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 15:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-to-Excel-2-rows-of-column-names-using-SAS-EG/m-p/443337#M20599</guid>
      <dc:creator>sallyjo</dc:creator>
      <dc:date>2018-03-07T15:13:21Z</dc:date>
    </item>
  </channel>
</rss>

