<?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: Importing an Excel spreadsheet into SAS. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/504307#M948</link>
    <description>Thank you. Your comment about saving the Excel file as a CSV helped me to figure it out. They had saved the Excel file in an odd format. Once I fixed that it imported in fine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Oct 2018 14:01:13 GMT</pubDate>
    <dc:creator>hein68</dc:creator>
    <dc:date>2018-10-15T14:01:13Z</dc:date>
    <item>
      <title>Importing an Excel spreadsheet into SAS.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503908#M883</link>
      <description>&lt;P&gt;I'm trying to import an Excel spreadsheet into SAS.&amp;nbsp; I have data like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VM&lt;/P&gt;&lt;P&gt;44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8/28/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1691.4&lt;/P&gt;&lt;P&gt;44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8/28/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:01:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3001.51&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the data in SAS to be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID: numeric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date: Character $30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Time: Character $30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VM: numeric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I import in the data, the Date and Time variables have all missing values, and I don't know why.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 21:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503908#M883</guid>
      <dc:creator>hein68</dc:creator>
      <dc:date>2018-10-12T21:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Importing an Excel spreadsheet into SAS.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503951#M894</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74483"&gt;@hein68&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to import an Excel spreadsheet into SAS.&amp;nbsp; I have data like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VM&lt;/P&gt;
&lt;P&gt;44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8/28/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1691.4&lt;/P&gt;
&lt;P&gt;44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8/28/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:01:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3001.51&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need the data in SAS to be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID: numeric&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date: Character $30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Time: Character $30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VM: numeric&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I import in the data, the Date and Time variables have all missing values, and I don't know why.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the exact code you ran.&lt;/P&gt;
&lt;P&gt;Or describe any wizards you used.&lt;/P&gt;
&lt;P&gt;My first guess is that the value in excel for date/time is a single cell, is numeric and the approach you used didn't match the data.&lt;/P&gt;
&lt;P&gt;Why do you want DATE to be 30 characters long if the longest value is likely to be 10?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have to start by using Excel and do a file save as to CSV format to read/import as there can be more control involved.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 23:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503951#M894</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-12T23:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Importing an Excel spreadsheet into SAS.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503998#M899</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you will import an Excel sheet , date value will be character by default and time would be numeric. Post Import you can change the length of date variable by using Length statement and put function can be use to create new variable by time as character type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a sample code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT DATAFILE="PATH\bOOK1.XLS" 
OUT=HAVE DBMS=EXCEL REPLACE;
RUN;


DATA WANT (RENAME=(TIME1=TIME) DROP=TIME);
LENGTH DATE $30.;
SET HAVE;
TIME1=PUT(TIME,30.);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 08:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/503998#M899</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-10-13T08:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing an Excel spreadsheet into SAS.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/504307#M948</link>
      <description>Thank you. Your comment about saving the Excel file as a CSV helped me to figure it out. They had saved the Excel file in an odd format. Once I fixed that it imported in fine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-an-Excel-spreadsheet-into-SAS/m-p/504307#M948</guid>
      <dc:creator>hein68</dc:creator>
      <dc:date>2018-10-15T14:01:13Z</dc:date>
    </item>
  </channel>
</rss>

