<?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: IMPORT EXCEL FILE; numbers do not appear as numbers in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539363#M7055</link>
    <description>&lt;P&gt;Your example looks fine to me.&amp;nbsp; It is just that the numbers in your second column are too large to display using the default BEST12. format.&amp;nbsp; Just use a different format to display them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But they also look like they might really be identifiers instead of numbers that you are going to use in calculations. In that case if you convert them to strings in Excel then SAS will import them as character strings instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your third column is NOT a date in Excel, why would you expect it to appears as a date in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 16:28:00 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-02-28T16:28:00Z</dc:date>
    <item>
      <title>IMPORT EXCEL FILE; numbers do not appear as numbers</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539292#M7042</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to import an excel file into SAS EG, every time&amp;nbsp;I do this however the numbers appear different to what they are in the spread sheet. I am also struggling with date formats&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is an exmaple&amp;nbsp;of the excel file&amp;nbsp;I am changing, the first column is a DOB, middle column&amp;nbsp;is a Idenfier number and the last column is date registered;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3091991&lt;/TD&gt;&lt;TD&gt;1400000000033&lt;/TD&gt;&lt;TD&gt;15012018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17031977&lt;/TD&gt;&lt;TD&gt;1400000000044&lt;/TD&gt;&lt;TD&gt;15012018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3101982&lt;/TD&gt;&lt;TD&gt;1400000000055&lt;/TD&gt;&lt;TD&gt;16012018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After importing to SAS the columns and rows appear as below, the&amp;nbsp;date columns do not register as a dates and the identifier number becomes what can be seen below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3091991&lt;/TD&gt;&lt;TD&gt;1.4E+12&lt;/TD&gt;&lt;TD&gt;15012018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17031977&lt;/TD&gt;&lt;TD&gt;1.4E+12&lt;/TD&gt;&lt;TD&gt;15012018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3101982&lt;/TD&gt;&lt;TD&gt;1.4E+12&lt;/TD&gt;&lt;TD&gt;16012018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What&amp;nbsp;I basically want to do is import the excel file with the correct formats for each column. dates as dates and the indentifier number as full number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help this please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 13:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539292#M7042</guid>
      <dc:creator>Shoref_Rahman</dc:creator>
      <dc:date>2019-02-28T13:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORT EXCEL FILE; numbers do not appear as numbers</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539299#M7043</link>
      <description>&lt;P&gt;This is because Excel is a bad data format, and I assume you are using proc import which is a guessing procedure.&amp;nbsp; Combine the two and what you get out will be garbage half the time.&lt;/P&gt;
&lt;P&gt;From the Excel data create a CSV file - plain text, delimited, cross platform, easy to use = much better than Excel.&lt;/P&gt;
&lt;P&gt;Write a datastep import program (you can take the shell from the log after a proc import has run to save time), and apply in the datastep formats, informats, lengths etc.&amp;nbsp; Eg:&lt;/P&gt;
&lt;PRE&gt;data want;
  infile ".../myfile.csv";
  length ...;
  format ...;
  informat ...;
  input ...;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Feb 2019 14:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539299#M7043</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-28T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORT EXCEL FILE; numbers do not appear as numbers</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539363#M7055</link>
      <description>&lt;P&gt;Your example looks fine to me.&amp;nbsp; It is just that the numbers in your second column are too large to display using the default BEST12. format.&amp;nbsp; Just use a different format to display them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But they also look like they might really be identifiers instead of numbers that you are going to use in calculations. In that case if you convert them to strings in Excel then SAS will import them as character strings instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your third column is NOT a date in Excel, why would you expect it to appears as a date in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IMPORT-EXCEL-FILE-numbers-do-not-appear-as-numbers/m-p/539363#M7055</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-02-28T16:28:00Z</dc:date>
    </item>
  </channel>
</rss>

