<?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 SAS import query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360795#M85015</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't import the below excel file. &amp;nbsp;Please advise. &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%let yyyymm=201604;&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT OUT=car_&lt;STRONG&gt;&amp;amp;YYYYMM&lt;/STRONG&gt;&lt;BR /&gt;DATAFILE="c:\car_&lt;STRONG&gt;&amp;amp;yyyymm.xlsx&lt;/STRONG&gt;"&lt;BR /&gt;DBMS=EXCEL REPLACE;&lt;BR /&gt;getnames=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2017 15:26:44 GMT</pubDate>
    <dc:creator>scb</dc:creator>
    <dc:date>2017-05-23T15:26:44Z</dc:date>
    <item>
      <title>SAS import query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360795#M85015</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't import the below excel file. &amp;nbsp;Please advise. &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%let yyyymm=201604;&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT OUT=car_&lt;STRONG&gt;&amp;amp;YYYYMM&lt;/STRONG&gt;&lt;BR /&gt;DATAFILE="c:\car_&lt;STRONG&gt;&amp;amp;yyyymm.xlsx&lt;/STRONG&gt;"&lt;BR /&gt;DBMS=EXCEL REPLACE;&lt;BR /&gt;getnames=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 15:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360795#M85015</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2017-05-23T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360806#M85017</link>
      <description>&lt;P&gt;You said you can't import the file. A couple of questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does your site license SAS/Access for PC File Formats?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of error message are you getting?&lt;/P&gt;
&lt;P&gt;Have you tried DBMS=XLSX&lt;/P&gt;
&lt;P&gt;Is your workbook actually located in the root of the c: drive?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 15:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360806#M85017</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-23T15:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360819#M85019</link>
      <description>&lt;P&gt;I would advise to post relevant information. &amp;nbsp;What does the log say for instance? &amp;nbsp;Do you have access to that file (i.e. SAS UE runs on its on virtual image so no C:). &amp;nbsp;From what you have posted its versy hard to even tell what you are trying. &amp;nbsp;Check this line in the log:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DATAFILE="c:\car_&lt;/SPAN&gt;&lt;STRONG&gt;&amp;amp;yyyymm.xlsx&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there a space between the macro and the .xlsx for instance, if so then:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DATAFILE="c:\car_%trim(&lt;STRONG&gt;&amp;amp;yyyymm.).xlsx&lt;/STRONG&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Oh, and typing that I have just seen what the problem is. &amp;nbsp;A macro variable needs a dot after it, so this resolves to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;c:\car_201604&lt;STRONG&gt;xlsx&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Which is wrong. &amp;nbsp;You need a dot to end the macro variable and a dot before the extension like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DATAFILE="c:\car_&lt;STRONG&gt;&amp;amp;yyyymm..xlsx&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 16:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-query/m-p/360819#M85019</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-23T16:06:41Z</dc:date>
    </item>
  </channel>
</rss>

