<?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 How to get SAS to import MS xlsx files with date fields as all numeric (or all character) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166863#M32143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&amp;nbsp; Any help you can give is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've successfully imported the 40 xlslx spreadsheets using the code I found on this communities website - program attached.&lt;/P&gt;&lt;P&gt;But, I'm unable to append them because I'm getting error messages that some variables are both character and numeric.&lt;/P&gt;&lt;P&gt;This happens with the date fields (formatted as short date in xlsx) which have some missing observations.&lt;/P&gt;&lt;P&gt;How do I get around this?&amp;nbsp; MIXED=YES gives me more date fields that come up as character than numeric.&lt;/P&gt;&lt;P&gt;Is it better to import as character or as numeric?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 21:55:33 GMT</pubDate>
    <dc:creator>jcis7</dc:creator>
    <dc:date>2014-05-20T21:55:33Z</dc:date>
    <item>
      <title>How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166863#M32143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&amp;nbsp; Any help you can give is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've successfully imported the 40 xlslx spreadsheets using the code I found on this communities website - program attached.&lt;/P&gt;&lt;P&gt;But, I'm unable to append them because I'm getting error messages that some variables are both character and numeric.&lt;/P&gt;&lt;P&gt;This happens with the date fields (formatted as short date in xlsx) which have some missing observations.&lt;/P&gt;&lt;P&gt;How do I get around this?&amp;nbsp; MIXED=YES gives me more date fields that come up as character than numeric.&lt;/P&gt;&lt;P&gt;Is it better to import as character or as numeric?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 21:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166863#M32143</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2014-05-20T21:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166864#M32144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code was truncated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 22:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166864#M32144</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-20T22:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166865#M32145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And you probably want to start with the code you used to import the data.&lt;/P&gt;&lt;P&gt;The quickest fix might end up making changes in the Excel data or exporting the data to CSV and reading that with more control than proc import gives, such as control over whether a variable is numeric or character, associated formats and use of appropriate informats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 22:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166865#M32145</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-20T22:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166866#M32146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I highlighted all the date columns in each Excel spreadsheet and changed them to 'short date' but still unable to import the fields (esp ones with more missing values) as numeric.&lt;/P&gt;&lt;P&gt;I can try to export into CSV and import into SAS unless you suggest anything else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 23:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166866#M32146</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2014-05-20T23:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166867#M32147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; Uploaded SAS file because it wasn't pasting properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 23:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166867#M32147</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2014-05-20T23:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166868#M32148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; background-color: #ffffff;"&gt;While importing excel files some of the variables may contain missing values in the first row that creates a problem. PROC IMPORT with an Excel file, uses the first eight lines to determine if a variable is numeric or character. So importing csv files will provide more flexibility. You can put &lt;SPAN style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; background-color: #ffffff;"&gt;GUESSINGROWS =&amp;nbsp; (max number of rows to be examined) option in proc import to determine the exact variable type.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 14px; background-color: #ffffff; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 14px; background-color: #ffffff; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 14px; background-color: #ffffff; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"&gt;Naeem&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 23:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/166868#M32148</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-20T23:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/278418#M56015</link>
      <description>&lt;P&gt;If you want PROC IMPORT to have an option to import all fields as character, please vote:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/PROC-IMPORT-all-fields-as-character/idi-p/278415#M2011" target="_blank"&gt;PROC IMPORT -- all fields as character&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2016 22:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/278418#M56015</guid>
      <dc:creator>agoldma</dc:creator>
      <dc:date>2016-06-18T22:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get SAS to import MS xlsx files with date fields as all numeric (or all character)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/278424#M56017</link>
      <description>&lt;P&gt;If you want PROC IMPORT to have an option to import all fields as character, please vote:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/PROC-IMPORT-all-fields-as-character/idi-p/278415#M2011" target="_blank"&gt;PROC IMPORT -- all fields as character&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2016 00:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-SAS-to-import-MS-xlsx-files-with-date-fields-as-all/m-p/278424#M56017</guid>
      <dc:creator>agoldma</dc:creator>
      <dc:date>2016-06-19T00:08:52Z</dc:date>
    </item>
  </channel>
</rss>

