<?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 How to Change Formats when Exporting from SAS to Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317392#M69488</link>
    <description>&lt;P&gt;I have data that I am exporting from SAS to Excel for our data managers. &amp;nbsp;There are a couple of issues that I am noticing that I cannot correct. &amp;nbsp;I want to see if there is a way to change this in SAS instead of manually doing it in Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, we have site numbers that are 3-digit character values, usually containing leading zeros. &amp;nbsp;For example, site 001, 002, 003, etc. &amp;nbsp;When it exports into Excel, it displays as numeric 1, 2, 3, etc. &amp;nbsp;Is there a way to keep the leading zeros in Excel? &amp;nbsp;If it can be retained as a character value, that would be ideal, but not necessary if we can at least keep the leading zeros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, I have tried adding to the SAS variable an apostrophe since Excel uses an apostrophe to treat a numeric value as a character string, but that does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, I have long ID variables containing values like "5086074278593750", but they display in Excel as "5.08607E+15". &amp;nbsp;I want to ignore the scientific notation and display it as the raw value. &amp;nbsp;I can manually change the format in Excel from general to number and then remove the 2 decimal places, but I don't want to have to do that every time to every variable that is reformated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, I want my data to show up in Excel exactly as I have it in SAS. &amp;nbsp;Not format changes. &amp;nbsp;Any solutions would be much appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2016 17:18:11 GMT</pubDate>
    <dc:creator>djbateman</dc:creator>
    <dc:date>2016-12-07T17:18:11Z</dc:date>
    <item>
      <title>How to Change Formats when Exporting from SAS to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317392#M69488</link>
      <description>&lt;P&gt;I have data that I am exporting from SAS to Excel for our data managers. &amp;nbsp;There are a couple of issues that I am noticing that I cannot correct. &amp;nbsp;I want to see if there is a way to change this in SAS instead of manually doing it in Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, we have site numbers that are 3-digit character values, usually containing leading zeros. &amp;nbsp;For example, site 001, 002, 003, etc. &amp;nbsp;When it exports into Excel, it displays as numeric 1, 2, 3, etc. &amp;nbsp;Is there a way to keep the leading zeros in Excel? &amp;nbsp;If it can be retained as a character value, that would be ideal, but not necessary if we can at least keep the leading zeros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, I have tried adding to the SAS variable an apostrophe since Excel uses an apostrophe to treat a numeric value as a character string, but that does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, I have long ID variables containing values like "5086074278593750", but they display in Excel as "5.08607E+15". &amp;nbsp;I want to ignore the scientific notation and display it as the raw value. &amp;nbsp;I can manually change the format in Excel from general to number and then remove the 2 decimal places, but I don't want to have to do that every time to every variable that is reformated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short, I want my data to show up in Excel exactly as I have it in SAS. &amp;nbsp;Not format changes. &amp;nbsp;Any solutions would be much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317392#M69488</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2016-12-07T17:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Formats when Exporting from SAS to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317404#M69490</link>
      <description>&lt;P&gt;HOW are you exporting to Excel?&lt;/P&gt;
&lt;P&gt;Are you&amp;nbsp; exporting a data set, the result of a report procedure (Procs Print, Report and Tabulate) or something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Different content is likely to require different options.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317404#M69490</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-07T18:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Formats when Exporting from SAS to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317406#M69491</link>
      <description>&lt;P&gt;I am typically using ods&amp;nbsp;tagsets.excelxp to export a table through PROC PRINT or PROC REPORT (usually PROC PRINT).&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317406#M69491</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2016-12-07T18:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Formats when Exporting from SAS to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317416#M69497</link>
      <description>&lt;P&gt;Here's an index of the features you want and where you can find sample code that implements that feature.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sas.com/events/cm/867226/ExcelXPPaperIndex.pdf" target="_blank"&gt;http://www.sas.com/events/cm/867226/ExcelXPPaperIndex.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Leading zeroes is halfway down the page.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317416#M69497</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-07T18:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Formats when Exporting from SAS to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317482#M69523</link>
      <description>&lt;PRE&gt;
As Reeza pointed out use TAGATTR.

proc report......
define x /style={tagattr='format:text'}


&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Dec 2016 02:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Change-Formats-when-Exporting-from-SAS-to-Excel/m-p/317482#M69523</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-12-08T02:47:09Z</dc:date>
    </item>
  </channel>
</rss>

