<?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 Output data to Excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43618#M11432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; are you using PROC EXPORT or the EXPORT FILE under the FILE drop down menu?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Nov 2011 15:26:37 GMT</pubDate>
    <dc:creator>GreggB</dc:creator>
    <dc:date>2011-11-08T15:26:37Z</dc:date>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43613#M11427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SAS dataset with a variable called region. The values are character type, as '01', '02', '03', ... '10', '11', '12'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I export the SAS dataset to Excel, the values in Excel changed to 1, 2, 3, ... 10, 11, 12.&amp;nbsp;&amp;nbsp; That is, the first digit 0 is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how to keep the values as in the original format '01', '02'...... When output to Excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43613#M11427</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-08T14:31:49Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43614#M11428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way is to export to an XML file.&amp;nbsp; Take a look at: &lt;A href="http://support.sas.com/rnd/papers/sugi29/ExcelXML.pdf"&gt;http://support.sas.com/rnd/papers/sugi29/ExcelXML.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A bit painful, but it does let you control such formatting issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43614#M11428</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-08T14:37:09Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43615#M11429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; A bit paiful, indeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wondering is there any simple way to do that? Simply just keep the format as original.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43615#M11429</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-08T14:45:54Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43616#M11430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you convert it to a character variable?&lt;/P&gt;&lt;P&gt;If you use the EXCEL libname engine then it will preserve the leading zeros in strings that look like numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname test excel 'c:\temp\one.xls' ;&lt;/P&gt;&lt;P&gt;data test.one;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 10;&amp;nbsp; c=put(i,z2.); output; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format i z2.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;libname test clear;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43616#M11430</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-08T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43617#M11431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ODS LISTING CLOSE;&lt;/P&gt;&lt;P&gt;ODS tagsets.ExcelXP FILE="params.xml" PATH="Y:\" STYLE=Statistical;&lt;/P&gt;&lt;P&gt;PROC PRINT DATA=work.params02;&lt;/P&gt;&lt;P&gt;&amp;nbsp; VAR level / STYLE={tagattr='format:text'};&lt;/P&gt;&lt;P&gt;&amp;nbsp; VAR estimate stderr tvalue probt variable;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;ODS tagsets.ExcelXP CLOSE;&lt;/P&gt;&lt;P&gt;ODS LISTING;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43617#M11431</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-08T15:18:14Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43618#M11432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; are you using PROC EXPORT or the EXPORT FILE under the FILE drop down menu?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43618#M11432</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2011-11-08T15:26:37Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43619#M11433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Initially, I used the EXPORT FILE under the FILE drop down menu.&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 16:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43619#M11433</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-08T16:32:23Z</dc:date>
    </item>
    <item>
      <title>Output data to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43620#M11434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I use something like this.&amp;nbsp; If you use the RETAIN statement it will force the vars to stay in the order you want them. Notice the RETAIN statement comes before the SET statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;retain schoolid school Student_Num Last First Middle Grade Engprof Ethnicity Sex&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;set joinall;&lt;/P&gt;&lt;P&gt;school=put(schoolid,psfmt.);&lt;/P&gt;&lt;P&gt;keep school EngTch Engprof Ethnicity First GTclass GTmark&amp;nbsp; GTtch Grade IEP LangRIT Last MathRIT MathTch Middle ReadRIT SciTch Sex ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc export data=final&amp;nbsp; outfile='G:\Departments\Research\MAP\1112\MAP - 1stQ_Grades - PASS\Fall MAP 1stQ Grades PASS - school..xls'&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 17:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-data-to-Excel/m-p/43620#M11434</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2011-11-08T17:09:45Z</dc:date>
    </item>
  </channel>
</rss>

