<?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 Betreff: proc import (problem format) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282922#M57567</link>
    <description>&lt;P&gt;Use XLSX or EXCEL as the libname engine, not Xls.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2016 12:10:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-08T12:10:35Z</dc:date>
    <item>
      <title>proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282881#M57559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;i would import a file excel but i have a problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT= WORK.example   
DATAFILE= "C:\Users\ui43925\Desktop\example.XLSX"
            DBMS=EXCEL REPLACE;
     SHEET="example"; 
     GETNAMES=YES;
     MIXED=YES;
     SCANTEXT=YES;
     USEDATE=YES;
     SCANTIME=YES;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3963i47CFF70F7ABB5469/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="problem.PNG" title="problem.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After import, in the table sas the column "Ora format" and "Hour" isn't format timestamt but in DATE9.,&amp;nbsp;what is my fault ?&lt;/P&gt;
&lt;P&gt;Thanks!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 08:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282881#M57559</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T08:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282885#M57561</link>
      <description>&lt;P&gt;In attachments the file.&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 09:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282885#M57561</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T09:13:38Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282887#M57562</link>
      <description>&lt;P&gt;Have you tried using libname instead of proc import? Have you tried replacing the format after importing?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 09:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282887#M57562</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2016-07-08T09:18:19Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282891#M57564</link>
      <description>&lt;P&gt;with libnam is&amp;nbsp;the same problem:&lt;/P&gt;
&lt;P&gt;libname xls "C:\Users\ui43925\Desktop\example.xlsx";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;convert datatime9. in timestamt isn't possibile (lenght 8):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3964iBBA695AA36B1332F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="errore_2.JPG" title="errore_2.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 09:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282891#M57564</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T09:38:27Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282922#M57567</link>
      <description>&lt;P&gt;Use XLSX or EXCEL as the libname engine, not Xls.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 12:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282922#M57567</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-08T12:10:35Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282927#M57568</link>
      <description>&lt;P&gt;Length eight is max for numeric variables and always sufficient for datetime variables. &lt;/P&gt;
&lt;P&gt;I have no idea why proc impot does not recognize the datetime as datetime - could be a bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Easiest way to solve the problem: don't use excel as data-source &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 12:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282927#M57568</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2016-07-08T12:18:44Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282929#M57570</link>
      <description>&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;the same problem.&lt;BR /&gt;&lt;BR /&gt;libname prova excel "C:\Users\ui43925\Desktop\example.xlsx";</description>
      <pubDate>Fri, 08 Jul 2016 12:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282929#M57570</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T12:20:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282932#M57572</link>
      <description>you're right , but i receive  this file  every day with email attachment, automatically save it with outlook to run query in SAS. I would like to not have manually  activities ...</description>
      <pubDate>Fri, 08 Jul 2016 12:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282932#M57572</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282935#M57574</link>
      <description>&lt;P&gt;If XLSX doesn't work you can look into DBSASTYPE but your options are limited.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll either need to convert to CSV, which can be automared, or accept a date variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 12:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282935#M57574</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-08T12:37:20Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282944#M57577</link>
      <description>Fantastic!!! thanks so much!!!&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT OUT= WORK.example   &lt;BR /&gt;DATAFILE= "C:\Users\ui43925\Desktop\example.XLSX"&lt;BR /&gt;            DBMS=EXCEL REPLACE;&lt;BR /&gt;     SHEET="example"; &lt;BR /&gt;     GETNAMES=YES;&lt;BR /&gt;     MIXED=YES;&lt;BR /&gt;     SCANTEXT=YES;&lt;BR /&gt;     USEDATE=YES;&lt;BR /&gt;     SCANTIME=YES;&lt;BR /&gt;	 DBDSOPTS=" SASDATEFMT=('Hour'='DATETIME27.' 'Ora format'='DATETIME27.') ";&lt;BR /&gt;RUN;</description>
      <pubDate>Fri, 08 Jul 2016 13:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/282944#M57577</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-08T13:00:04Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283086#M57645</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;R seemed to hadle it very naturally. &lt;BR /&gt;&lt;BR /&gt;Note I could easily reformat the datetime display with a format, like SAS.&lt;BR /&gt;I think the defalt format is either POSIX or ISO.&lt;BR /&gt;&lt;BR /&gt;The main issue is creating a SAS dataset and there is work going on to do this.&lt;BR /&gt;R can read SAS datasets.&lt;BR /&gt;&lt;BR /&gt;%utl_submit_r64(
  library(XLConnect);
  wb &amp;lt;- loadWorkbook('d:/xls/example.xlsx');
  data &amp;lt;- readWorksheet(wb, sheet = 'example');
  head(data);
);

/*
           Ora.format                Hour
1 2016-05-29 00:00:00 2016-05-29 00:00:00
2 2016-05-29 00:00:00 2016-05-29 00:00:00
3 2016-05-29 01:00:00 2016-05-29 01:00:00
4 2016-05-29 01:00:00 2016-05-29 01:00:00
5 2016-05-29 02:00:00 2016-05-29 02:00:00
*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2016 23:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283086#M57645</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-07-08T23:06:02Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283087#M57646</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/42345"&gt;@rogerjdeangelis﻿&lt;/a&gt;&amp;nbsp;But this isn't an R forum? &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt; I have nothing against R and even use it for consulting but not sure how answer above is relevant given question. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 23:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283087#M57646</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-08T23:08:29Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283088#M57647</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Here is a solution the OP can use easily, I just don't see the need for IML and R.&lt;BR /&gt;&lt;BR /&gt;proc iml;
  submit / R;
    library(XLConnect)
    wb &amp;lt;- loadWorkbook('d:/xls/example.xlsx')
    data &amp;lt;- readWorksheet(wb, sheet = 'example')
  endsubmit;
  call importdatasetfromr('data','data');
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2016 23:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283088#M57647</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-07-08T23:33:36Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283089#M57648</link>
      <description>&lt;P&gt;A lot of companies won't allow R. The free potentially untested packages are security risks when dealing with confidential information. Also, the one my company sites all the time, if there's no support then it can't be purchased as its a risk.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides the IML license on top of SAS licence and renewal costs are trivial after initial purchase.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 23:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283089#M57648</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-08T23:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283092#M57650</link>
      <description>&lt;P&gt;What version of SAS are you running? I was able to read that file using SAS 9.4 using the XLSX engine without any issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=C:\downloads;
libname x xlsx "&amp;amp;path/example.xlsx";
proc print data=x.example (obs=10); run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3979i595A129266E4B06F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2016 00:44:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283092#M57650</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-07-09T00:44:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: proc import (problem format)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283256#M57724</link>
      <description>&lt;P&gt;Sorry, but i don't use R.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 07:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-problem-format/m-p/283256#M57724</guid>
      <dc:creator>Cello23</dc:creator>
      <dc:date>2016-07-11T07:46:45Z</dc:date>
    </item>
  </channel>
</rss>

