<?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 exporting a CSV in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458527#M116371</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a dataset called new which have three columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name age salary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I am exporting this dataset into CSV through proc export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data=new dbms=csv&lt;BR /&gt;outfile="L\new\sample.csv" replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I am opening the CSV file it shows all the three columns in one column in CSV&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name,age,salary&lt;BR /&gt;rohit,12,20000&lt;BR /&gt;sagar,15,50000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what i want all the three columns in three columns in CSV not in one column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I acheive that&lt;/P&gt;</description>
    <pubDate>Mon, 30 Apr 2018 06:55:22 GMT</pubDate>
    <dc:creator>Rohit12</dc:creator>
    <dc:date>2018-04-30T06:55:22Z</dc:date>
    <item>
      <title>exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458527#M116371</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a dataset called new which have three columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name age salary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I am exporting this dataset into CSV through proc export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data=new dbms=csv&lt;BR /&gt;outfile="L\new\sample.csv" replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I am opening the CSV file it shows all the three columns in one column in CSV&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name,age,salary&lt;BR /&gt;rohit,12,20000&lt;BR /&gt;sagar,15,50000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what i want all the three columns in three columns in CSV not in one column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I acheive that&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 06:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458527#M116371</guid>
      <dc:creator>Rohit12</dc:creator>
      <dc:date>2018-04-30T06:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458533#M116373</link>
      <description>&lt;P&gt;You do have three "columns" here, separated by commas, which is what a CSV file is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I take it you open this file in some Spreadsheet program like Microsoft Excel and want it to appear in three columns instead of 1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this either in Excel itself or by simply exporting the file as an .xlsx&amp;nbsp;file to begin with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do a Google search, millions of examples there...&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 07:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458533#M116373</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-04-30T07:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458550#M116377</link>
      <description>&lt;P&gt;What is it you actually want?&amp;nbsp; &amp;nbsp;CSV = Comma Separated Variable file.&amp;nbsp; This is one optional row with headers, each separated by commas, then one row per data line with data separated by commas.&amp;nbsp; &amp;nbsp;Which is exactly what you have there.&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;when I am opening the CSV file" - and how and with what are you opening the file?&amp;nbsp; If its association is with a text program like notepad then you will see it as plain text, if you associate it with Excel then Excel will open and parse it into a grid - this does not change the underlying structure or anything unless you save it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 08:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458550#M116377</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-30T08:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458560#M116382</link>
      <description>&lt;P&gt;working perfectly fine&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CSV_TEST;
input name $ age salary;
datalines;
rohit 12 20000
sagar 15 50000
run;

proc export data=Work.csv_test dbms=csv
outfile=".....\sample.csv" replace; /*Add your Path*/
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Apr 2018 09:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458560#M116382</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-04-30T09:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458562#M116383</link>
      <description>Your CSV file is created perfectly. It's just you have to use the MS Excel or any other spreasheet program to open it to show in 3 columns.&lt;BR /&gt;&lt;BR /&gt;A text editor like notepad wordpad etc will show it in one line only, like you mentioned.</description>
      <pubDate>Mon, 30 Apr 2018 09:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458562#M116383</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-04-30T09:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458565#M116385</link>
      <description>&lt;P&gt;I just opened this file with notepad++ and it is perfectly in three line and comma separated as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;name,age,salary&lt;BR /&gt;rohit,12,20000&lt;BR /&gt;sagar,15,50000&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 09:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458565#M116385</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-04-30T09:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: exporting a CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458687#M116427</link>
      <description>&lt;P&gt;CSV -&amp;gt; comma separated values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your file has comma separated values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CSV files have no concept of 'columns'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you open the file in Excel, unfortunately, the default, it will show as three separate 'columns'. In this example it will work fine, but Excel can also misinterpret your data so be careful working that way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 15:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/exporting-a-CSV/m-p/458687#M116427</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-30T15:20:24Z</dc:date>
    </item>
  </channel>
</rss>

