<?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: Use Column Labels in export in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4944#M1984</link>
    <description>Hi:&lt;BR /&gt;
  Sadly, according to the documentation, PROC EXPORT does not support writing labels as column names. Instead, try one of these techniques: ODS CSV or ODS HTML (or ODS MSOFFICE2K) to export (or even ODS EXCELXP):&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv file='c:\temp\class.csv';&lt;BR /&gt;
ods msoffice2k(1) file='c:\temp\class.html' style=minimal;&lt;BR /&gt;
ods msoffice2k(2) file='c:\temp\class2.xls' style=minimal;&lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\class_xp.xls' style=minimal;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=sashelp.class label;&lt;BR /&gt;
var name age height;&lt;BR /&gt;
label name = 'Wombat'&lt;BR /&gt;
        age = 'Koala'&lt;BR /&gt;
        height = 'Armadillo';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 04 Oct 2007 03:45:45 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-10-04T03:45:45Z</dc:date>
    <item>
      <title>Use Column Labels in export</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4943#M1983</link>
      <description>I am trying to export to excel and I want to use the column labels in the output to Excel.  Can anyone tell me how to do this preferably with PROC EXPORT?&lt;BR /&gt;
&lt;BR /&gt;
example "Member_ID" exported to Excel like "Member Id".</description>
      <pubDate>Thu, 04 Oct 2007 03:34:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4943#M1983</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-04T03:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use Column Labels in export</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4944#M1984</link>
      <description>Hi:&lt;BR /&gt;
  Sadly, according to the documentation, PROC EXPORT does not support writing labels as column names. Instead, try one of these techniques: ODS CSV or ODS HTML (or ODS MSOFFICE2K) to export (or even ODS EXCELXP):&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv file='c:\temp\class.csv';&lt;BR /&gt;
ods msoffice2k(1) file='c:\temp\class.html' style=minimal;&lt;BR /&gt;
ods msoffice2k(2) file='c:\temp\class2.xls' style=minimal;&lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\class_xp.xls' style=minimal;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=sashelp.class label;&lt;BR /&gt;
var name age height;&lt;BR /&gt;
label name = 'Wombat'&lt;BR /&gt;
        age = 'Koala'&lt;BR /&gt;
        height = 'Armadillo';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 04 Oct 2007 03:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4944#M1984</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-10-04T03:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Use Column Labels in export</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4945#M1985</link>
      <description>Hey Cynthia,  that did the trick however now when I print to Excel it drops the leading 0's.&lt;BR /&gt;
&lt;BR /&gt;
For example Member ID = 00001234&lt;BR /&gt;
Now it shows as Member ID = 1234&lt;BR /&gt;
&lt;BR /&gt;
I still need the 0's to show,  any ideas?

Message was edited by: kmgreen</description>
      <pubDate>Thu, 04 Oct 2007 16:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4945#M1985</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-04T16:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use Column Labels in export</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4946#M1986</link>
      <description>Hi:&lt;BR /&gt;
  Not with ODS CSV -- but with HTML or ExcelXP, you have to use a MICROSOFT format for the number. See these previous forum postings:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=1833ܩ" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=1833ܩ&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=3664๐" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=3664๐&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  Since it involves, in some cases, using ODS style attributes and creating an updated tagset, you might want to contact Tech Support for more help with this.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 04 Oct 2007 17:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Use-Column-Labels-in-export/m-p/4946#M1986</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-10-04T17:31:38Z</dc:date>
    </item>
  </channel>
</rss>

