<?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: How to remove trailing blanks when exporting data from SAS to excel? in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10654#M347</link>
    <description>What is the value of &amp;amp;AREA.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; put (response_codes nation &amp;amp;area.) (+(-1) '09'x);  &lt;BR /&gt;
&lt;BR /&gt;
This is NOT like the PUT statement in my last post.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
put response_codes (nation &amp;amp;area.) (+(-1) '09'x);&lt;BR /&gt;
[/pre]</description>
    <pubDate>Wed, 25 Mar 2009 13:29:14 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2009-03-25T13:29:14Z</dc:date>
    <item>
      <title>How to remove trailing blanks when exporting data from SAS to excel?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10651#M344</link>
      <description>I had a question regarding exporting data from Windows SAS to excel.&lt;BR /&gt;
I am using a DDE statement to export the data to excel from SAS, but what is happening is, when the data is getting exported, there is a trailing blank space after the value.&lt;BR /&gt;
For eg: "Shalini" is getting exported as "Shalini ". &lt;BR /&gt;
I have confirmed that there are no trailing blank spaces in the raw data, this problem occurs only when the exporting is happening.&lt;BR /&gt;
&lt;BR /&gt;
Do you know how I could avoid this, or why this could be happening. &lt;BR /&gt;
&lt;BR /&gt;
Also, in DDE is there a possibility of exporting data into a defined named range instead of a range of cells?</description>
      <pubDate>Wed, 25 Mar 2009 10:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10651#M344</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-25T10:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove trailing blanks when exporting data from SAS to excel?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10652#M345</link>
      <description>If you could show your code that would be helpful.  However I was able to produce similar result using NOTAB and LIST put.  Try adding a pointer control +(-1) after each variable before you write the tab.  Similar to code below.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
   /*triplet = 'excel|[Book1]sheet1!r1c1:r19c7';*/&lt;BR /&gt;
   triplet = 'excel|[Book1]sheet1!print_area';&lt;BR /&gt;
   file dummy2 dde filevar=triplet notab;&lt;BR /&gt;
   do until(eof);&lt;BR /&gt;
      set sashelp.class end=eof;&lt;BR /&gt;
      weight = weight*1000;&lt;BR /&gt;
      put name (sex--weight)(+(-1) '09'x);&lt;BR /&gt;
      end;&lt;BR /&gt;
[/pre]

Write to named range PRINT_AREA&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: data _null_;</description>
      <pubDate>Wed, 25 Mar 2009 11:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10652#M345</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-25T11:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove trailing blanks when exporting data from SAS to excel?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10653#M346</link>
      <description>This is the code that i modified after you recommended using a pointer:&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
filename stat_test dde   'excel|D:\[test.xls]UI_2A_raw!r8c22:r12c30' notab;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set sasdata.&amp;amp;outpds._stat_test ; &lt;BR /&gt;
file stat_test;   &lt;BR /&gt;
put (response_codes nation &amp;amp;area.) (+(-1) '09'x);  &lt;BR /&gt;
run;&lt;BR /&gt;
***************************************************************&lt;BR /&gt;
&lt;BR /&gt;
But this still did not help, am I doing something wrong?</description>
      <pubDate>Wed, 25 Mar 2009 12:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10653#M346</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-25T12:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove trailing blanks when exporting data from SAS to excel?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10654#M347</link>
      <description>What is the value of &amp;amp;AREA.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; put (response_codes nation &amp;amp;area.) (+(-1) '09'x);  &lt;BR /&gt;
&lt;BR /&gt;
This is NOT like the PUT statement in my last post.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
put response_codes (nation &amp;amp;area.) (+(-1) '09'x);&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 25 Mar 2009 13:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/How-to-remove-trailing-blanks-when-exporting-data-from-SAS-to/m-p/10654#M347</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-25T13:29:14Z</dc:date>
    </item>
  </channel>
</rss>

