<?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 DDE and truncate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64872#M14097</link>
    <description>I'm using DDE to export data to excel.&lt;BR /&gt;
phynumber has leading zeros and they are getting truncated in excel.how to avoid this?&lt;BR /&gt;
it is defined as phynumber '09'x in the put statement.</description>
    <pubDate>Tue, 17 Aug 2010 20:07:29 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2010-08-17T20:07:29Z</dc:date>
    <item>
      <title>DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64872#M14097</link>
      <description>I'm using DDE to export data to excel.&lt;BR /&gt;
phynumber has leading zeros and they are getting truncated in excel.how to avoid this?&lt;BR /&gt;
it is defined as phynumber '09'x in the put statement.</description>
      <pubDate>Tue, 17 Aug 2010 20:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64872#M14097</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2010-08-17T20:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64873#M14098</link>
      <description>You really need to share your SAS-generated code, preferably pasted into your post/reply from your SAS log output.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 17 Aug 2010 20:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64873#M14098</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-17T20:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64874#M14099</link>
      <description>filename BodyStf  dde "excel|[Pharmacy Template.xls]RX Data!targetdata" notab;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set all;&lt;BR /&gt;
file BodyStf lrecl=15000;  &lt;BR /&gt;
put  &lt;BR /&gt;
&lt;BR /&gt;
phynumber '09'x&lt;BR /&gt;
Name '09'x&lt;BR /&gt;
prsc_addr_1 '09'x&lt;BR /&gt;
prsc_addr_2 '09'x&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
the dataset all has phynumber as 00102049 but when exported to excel the it is displayed as 102049.</description>
      <pubDate>Tue, 17 Aug 2010 20:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64874#M14099</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2010-08-17T20:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64875#M14100</link>
      <description>Hi:&lt;BR /&gt;
  The '09'x is the hexadecimal equivalent of a TAB character. It looks like you are writing into an Excel file with TABs as the delimiter for the columns. Can you set a custom format in Excel for the phynumber column to show leading zeroes????&lt;BR /&gt;
 &lt;BR /&gt;
  The only other way that I know to have Excel respect leading zeroes is to use the Output Delivery System to send a Microsoft format for Excel to use when it opens the file. The method that you use with ODS depends on whether you are using ODS HTML-based methods or XML-based methods, as described in this post:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=41019ꀻ" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=41019ꀻ&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  It is possible that you could write a command (via DDE) to format the phynumber column, but I don't do much with DDE, so I don't know what such a command would look like.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 18 Aug 2010 00:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64875#M14100</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-08-18T00:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64876#M14101</link>
      <description>One method that I have used to solve this problem is to append an invisible character to the every value of the variable before exporting to Excel.  To add an invisible character, hold the Alt key and type the digits 255 on the numeric keypad, with NumLock on.  Upon import, Excel will recognize the value as text and keep the leading zeros.  The only problem is that you will not be able to perform numeric computations on that column from within Excel.</description>
      <pubDate>Thu, 19 Aug 2010 16:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64876#M14101</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2010-08-19T16:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64877#M14102</link>
      <description>There is a way actually to preformat the cell programatically.&lt;BR /&gt;
c1 is the column that needs the performating.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
file cmds;&lt;BR /&gt;
put '[select("C1")]';&lt;BR /&gt;
put '[format.number("@")]';&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 19 Aug 2010 16:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64877#M14102</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2010-08-19T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: DDE and truncate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64878#M14103</link>
      <description>There is a way actually to preformat the cell programatically.&lt;BR /&gt;
c1 is the column that needs the performating.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
file cmds;&lt;BR /&gt;
put '[select("C1")]';&lt;BR /&gt;
put '[format.number("@")]';&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 19 Aug 2010 16:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-and-truncate/m-p/64878#M14103</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2010-08-19T16:43:14Z</dc:date>
    </item>
  </channel>
</rss>

