<?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: Writing Dataset to Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Writing-Dataset-to-Excel/m-p/19309#M2971</link>
    <description>&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I have a Macro that writes dataset to Excel and&lt;BR /&gt;
&amp;gt; creates different tabs in excel.  I have fixed fields&lt;BR /&gt;
&amp;gt; in excel as a columnwise like,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Sate&lt;BR /&gt;
&amp;gt; Country&lt;BR /&gt;
&amp;gt; Phone&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I want the output to write next to the above fields&lt;BR /&gt;
&amp;gt; columnwise.  But when I run the job, only Sate value&lt;BR /&gt;
&amp;gt; writes to excel.  &lt;BR /&gt;
&amp;gt; *************&lt;BR /&gt;
&amp;gt; filename output dde "Excel|&amp;amp;a1.!r4c2:r7c2";&lt;BR /&gt;
&amp;gt; data _null_;&lt;BR /&gt;
&amp;gt;   file OUTPUT;&lt;BR /&gt;
&amp;gt;   set pclib.Test&lt;BR /&gt;
&amp;gt;    put Sate Country Phone&lt;BR /&gt;
&amp;gt; ; &lt;BR /&gt;
&amp;gt; *************&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am pretty new to SAS and I appreciate any kind of&lt;BR /&gt;
&amp;gt; help.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
I believe you need to place a tab between each of the output columns and use the notab option on the file statement.&lt;BR /&gt;
&lt;BR /&gt;
file output notab;&lt;BR /&gt;
put sate '09'x county '09'x phnone ;</description>
    <pubDate>Wed, 21 May 2008 17:15:21 GMT</pubDate>
    <dc:creator>LAP</dc:creator>
    <dc:date>2008-05-21T17:15:21Z</dc:date>
    <item>
      <title>Writing Dataset to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-Dataset-to-Excel/m-p/19308#M2970</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a Macro that writes dataset to Excel and creates different tabs in excel.  I have fixed fields in excel as a columnwise like,&lt;BR /&gt;
&lt;BR /&gt;
Sate&lt;BR /&gt;
Country&lt;BR /&gt;
Phone&lt;BR /&gt;
&lt;BR /&gt;
I want the output to write next to the above fields columnwise.  But when I run the job, only Sate value writes to excel.  &lt;BR /&gt;
*************&lt;BR /&gt;
filename output dde "Excel|&amp;amp;a1.!r4c2:r7c2";&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file OUTPUT;&lt;BR /&gt;
    set pclib.Test&lt;BR /&gt;
     put Sate Country Phone&lt;BR /&gt;
RUN; &lt;BR /&gt;
*************&lt;BR /&gt;
&lt;BR /&gt;
I am pretty new to SAS and I appreciate any kind of help.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Tue, 20 May 2008 19:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-Dataset-to-Excel/m-p/19308#M2970</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-05-20T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Dataset to Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-Dataset-to-Excel/m-p/19309#M2971</link>
      <description>&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I have a Macro that writes dataset to Excel and&lt;BR /&gt;
&amp;gt; creates different tabs in excel.  I have fixed fields&lt;BR /&gt;
&amp;gt; in excel as a columnwise like,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Sate&lt;BR /&gt;
&amp;gt; Country&lt;BR /&gt;
&amp;gt; Phone&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I want the output to write next to the above fields&lt;BR /&gt;
&amp;gt; columnwise.  But when I run the job, only Sate value&lt;BR /&gt;
&amp;gt; writes to excel.  &lt;BR /&gt;
&amp;gt; *************&lt;BR /&gt;
&amp;gt; filename output dde "Excel|&amp;amp;a1.!r4c2:r7c2";&lt;BR /&gt;
&amp;gt; data _null_;&lt;BR /&gt;
&amp;gt;   file OUTPUT;&lt;BR /&gt;
&amp;gt;   set pclib.Test&lt;BR /&gt;
&amp;gt;    put Sate Country Phone&lt;BR /&gt;
&amp;gt; ; &lt;BR /&gt;
&amp;gt; *************&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am pretty new to SAS and I appreciate any kind of&lt;BR /&gt;
&amp;gt; help.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
I believe you need to place a tab between each of the output columns and use the notab option on the file statement.&lt;BR /&gt;
&lt;BR /&gt;
file output notab;&lt;BR /&gt;
put sate '09'x county '09'x phnone ;</description>
      <pubDate>Wed, 21 May 2008 17:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-Dataset-to-Excel/m-p/19309#M2971</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2008-05-21T17:15:21Z</dc:date>
    </item>
  </channel>
</rss>

