<?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: labels while proc exporting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89607#M19015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;Ksharp wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;call execute(cats(name,"='&lt;STRONG&gt;",label,"'n"&lt;/STRONG&gt; )); if last then call execute(';quit;'); run;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc export data=newclass&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out NLITERAL function.&lt;/P&gt;&lt;H1&gt; &lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2012 13:15:51 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2012-08-10T13:15:51Z</dc:date>
    <item>
      <title>labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89600#M19008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a sas dataset with columns having labels. While using the proc export, I want the labels to be the first row in the excel. I have tried label option and putnames=no too. But nothing works for me. Any idea?&lt;/P&gt;&lt;P&gt;Mine is 64 bit SAS and DBMS = excel(not xls) is used.&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 22:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89600#M19008</guid>
      <dc:creator>maggi2410</dc:creator>
      <dc:date>2012-08-09T22:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89601#M19009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried the label option without the putnames option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at: &lt;A href="http://support.sas.com/kb/41/735.html"&gt;http://support.sas.com/kb/41/735.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 22:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89601#M19009</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-09T22:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89602#M19010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes..nothing worked for me.. but i got this solution finally:&lt;/P&gt;&lt;P&gt;via libname statement use dslabel dataset option. But it doesnt replace your excel. So you have to add an extra piece of code to do so.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 23:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89602#M19010</guid>
      <dc:creator>maggi2410</dc:creator>
      <dc:date>2012-08-09T23:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89603#M19011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*Modify SASHELP.CLASS to include labels for variables*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; data newclass;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label name='First Name'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sex='Gender'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age='Age of Person'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height='Height of Person'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight='Weight of Person';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; proc export data=newclass outfile='c:\classlabel.xls'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label dbms=excel replace;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 23:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89603#M19011</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-09T23:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89604#M19012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. I guess it depends a lot in your sas version and your platform. Mine is 9.1 on UNIX. and somehow didnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 00:10:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89604#M19012</guid>
      <dc:creator>maggi2410</dc:creator>
      <dc:date>2012-08-10T00:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89605#M19013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That option came out with 9.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 00:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89605#M19013</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-10T00:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89606#M19014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for a fun. You can rename its name to its label before export excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data newclass;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label name='First Name'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sex='Gender'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age='Age of Person'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height='Height of Person'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight='Weight of Person';
&amp;nbsp;&amp;nbsp; run;
options validvarname=any;
data _null_;
 set sashelp.vcolumn(keep=libname memname name label where=(libname='WORK' and memname='NEWCLASS')) end=last;
 if _n_ eq 1 then call execute('proc datasets library=work nolist;modify newclass;rename ');
 call execute(cats(name,"='",label,"'n" ));
 if last then call execute(';quit;');
run;



&amp;nbsp;&amp;nbsp; proc export data=newclass outfile='c:\classlabel.xls'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbms=excel replace;
&amp;nbsp;&amp;nbsp; run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 02:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89606#M19014</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-08-10T02:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89607#M19015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;Ksharp wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;call execute(cats(name,"='&lt;STRONG&gt;",label,"'n"&lt;/STRONG&gt; )); if last then call execute(';quit;'); run;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc export data=newclass&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out NLITERAL function.&lt;/P&gt;&lt;H1&gt; &lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 13:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89607#M19015</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-08-10T13:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89608#M19016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found this SAS sample useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/35/574.html"&gt;http://support.sas.com/kb/35/574.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 22:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89608#M19016</guid>
      <dc:creator>ezetina</dc:creator>
      <dc:date>2012-08-10T22:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89609#M19017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course. If you can accept the non-legitimacy EXCEL file , using PROC REPORT which default use LABEL as header of column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data newclass;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label name='First Name'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sex='Gender'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age='Age of Person'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height='Height of Person'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight='Weight of Person';
&amp;nbsp;&amp;nbsp; run;
ods listing close;
ods tagsets.excelxp file='c:\x.xls' ;
proc report data=newclass&amp;nbsp; nowd;
run;
ods tagsets.excelxp close;
ods listing;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 04:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89609#M19017</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-08-13T04:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: labels while proc exporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89610#M19018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha. That could make my code better and stronger .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 04:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/labels-while-proc-exporting/m-p/89610#M19018</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-08-13T04:53:53Z</dc:date>
    </item>
  </channel>
</rss>

