<?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: Problem Importing All Columns from CSV File in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Problem-Importing-All-Columns-from-CSV-File/m-p/637488#M8979</link>
    <description>&lt;P&gt;A line of a CSV file would not look like the tabular thing you posted.&amp;nbsp; It would look like this instead:&lt;/P&gt;
&lt;PRE&gt;ContactID,LastName,FirstName,Company,MailingName,Country,MailingAddressLine1,MailingAddressLine2,MailingAddressLine3,MailingAddressLine4,MailingCity,MailingState,MailingZip,MailingZip4,MailingAddress,PrimaryPhone
&lt;/PRE&gt;
&lt;P&gt;Either your file is using TAB and not COMMA as the delimiter and when you pasted in the tabs the forum editor thought you wanted to make a table.&amp;nbsp; &amp;nbsp;If so then just add the DELIMITER statement to your PROC IMPORT code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;delimiter='09'x;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or more likely you have&amp;nbsp;&lt;STRONG&gt;accidentally&lt;/STRONG&gt;&amp;nbsp;allowed Excel (or some other spreadsheet program) to open the file instead of opening it with a TEXT editor that will show you what the file actually looks like.&amp;nbsp; Perhaps the delimiter is a semi-colon or something else.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Apr 2020 02:54:35 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-04-04T02:54:35Z</dc:date>
    <item>
      <title>Problem Importing All Columns from CSV File</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-Importing-All-Columns-from-CSV-File/m-p/637486#M8978</link>
      <description>&lt;P&gt;Hi!&amp;nbsp; I am having a problem importing all the columns from a CSV file in SAS Studio using Proc Import.&amp;nbsp; There are a total of 24 columns.&amp;nbsp; The first 15 columns import ok but the other column headings are ignored.&amp;nbsp; Data is associated to the wrong columns afterwards.&amp;nbsp; Below is an example of the code and tthe column headings being imported.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile="/folders/myfolders/Files/CNT_tblContactV2.csv"&lt;BR /&gt;dbms=csv&lt;BR /&gt;out=contacts&lt;BR /&gt;replace;&lt;BR /&gt;GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the column headings from the CSV file.&amp;nbsp; The last column the program imports is MailingAddress.&amp;nbsp; The rest of the columns beginning with PrimaryPhone are not included in the input statement automatically created with the Proc Import statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ContactID&lt;/TD&gt;&lt;TD&gt;LastName&lt;/TD&gt;&lt;TD&gt;FirstName&lt;/TD&gt;&lt;TD&gt;Company&lt;/TD&gt;&lt;TD&gt;MailingName&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;MailingAddressLine1&lt;/TD&gt;&lt;TD&gt;MailingAddressLine2&lt;/TD&gt;&lt;TD&gt;MailingAddressLine3&lt;/TD&gt;&lt;TD&gt;MailingAddressLine4&lt;/TD&gt;&lt;TD&gt;MailingCity&lt;/TD&gt;&lt;TD&gt;MailingState&lt;/TD&gt;&lt;TD&gt;MailingZip&lt;/TD&gt;&lt;TD&gt;MailingZip4&lt;/TD&gt;&lt;TD&gt;MailingAddress&lt;/TD&gt;&lt;TD&gt;PrimaryPhone&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't appear that there are any special characters that might cause a problem in the first row.&amp;nbsp; I am not sure how to resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2020 02:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-Importing-All-Columns-from-CSV-File/m-p/637486#M8978</guid>
      <dc:creator>luj</dc:creator>
      <dc:date>2020-04-04T02:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Importing All Columns from CSV File</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-Importing-All-Columns-from-CSV-File/m-p/637488#M8979</link>
      <description>&lt;P&gt;A line of a CSV file would not look like the tabular thing you posted.&amp;nbsp; It would look like this instead:&lt;/P&gt;
&lt;PRE&gt;ContactID,LastName,FirstName,Company,MailingName,Country,MailingAddressLine1,MailingAddressLine2,MailingAddressLine3,MailingAddressLine4,MailingCity,MailingState,MailingZip,MailingZip4,MailingAddress,PrimaryPhone
&lt;/PRE&gt;
&lt;P&gt;Either your file is using TAB and not COMMA as the delimiter and when you pasted in the tabs the forum editor thought you wanted to make a table.&amp;nbsp; &amp;nbsp;If so then just add the DELIMITER statement to your PROC IMPORT code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;delimiter='09'x;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or more likely you have&amp;nbsp;&lt;STRONG&gt;accidentally&lt;/STRONG&gt;&amp;nbsp;allowed Excel (or some other spreadsheet program) to open the file instead of opening it with a TEXT editor that will show you what the file actually looks like.&amp;nbsp; Perhaps the delimiter is a semi-colon or something else.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2020 02:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-Importing-All-Columns-from-CSV-File/m-p/637488#M8979</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-04T02:54:35Z</dc:date>
    </item>
  </channel>
</rss>

