<?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 Proc SQL pass-through with Excel file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105673#M21996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access an Excel workbook called report.xlsb using Proc SQL pass-through.&lt;BR /&gt;How do I reference a sheet in the workbook called I&amp;amp;I?&lt;BR /&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql dquote=ansi;&lt;BR /&gt;connect to excel (path="C:\Users\report.xlsb");&lt;BR /&gt;create table work.capii as&lt;BR /&gt;select * from connection to excel&lt;BR /&gt; (select * from I&amp;amp;I);&lt;BR /&gt;disconnect from excel;&lt;BR /&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2013 20:12:46 GMT</pubDate>
    <dc:creator>gzr2mz39</dc:creator>
    <dc:date>2013-02-11T20:12:46Z</dc:date>
    <item>
      <title>Proc SQL pass-through with Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105673#M21996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access an Excel workbook called report.xlsb using Proc SQL pass-through.&lt;BR /&gt;How do I reference a sheet in the workbook called I&amp;amp;I?&lt;BR /&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql dquote=ansi;&lt;BR /&gt;connect to excel (path="C:\Users\report.xlsb");&lt;BR /&gt;create table work.capii as&lt;BR /&gt;select * from connection to excel&lt;BR /&gt; (select * from I&amp;amp;I);&lt;BR /&gt;disconnect from excel;&lt;BR /&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 20:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105673#M21996</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2013-02-11T20:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL pass-through with Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105674#M21997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have to use pass-through? I couldn't get it to work either, and it doesn't look like you received any responses. But if you can use libname access rather than pass-thru, the below code works (9.3 on Win 7 32-bit):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname myxl Excel "C:\Users\report.xlsb";&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; create table work.capii as&lt;/P&gt;&lt;P&gt; select * from myxl.'I&amp;amp;I$'n;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;libname myxl clear;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 20:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105674#M21997</guid>
      <dc:creator>KarlK</dc:creator>
      <dc:date>2013-02-13T20:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL pass-through with Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105675#M21998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I remembered as soon as I hit "reply". There's a special character ($) in Excel worksheet names. In SAS, you deal with that using a name literal, as my previous reply indicates. But that doesn't work in SQL. Rather, you quote table names with square brackets. Your original post works for me if I change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;amp;I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[I&amp;amp;I$]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try that and let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 20:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105675#M21998</guid>
      <dc:creator>KarlK</dc:creator>
      <dc:date>2013-02-13T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL pass-through with Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105676#M21999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, [I&amp;amp;I$] is correct.&lt;/P&gt;&lt;P&gt;I want to tag your answer as correct, but I can't find that option for some reason.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 22:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-pass-through-with-Excel-file/m-p/105676#M21999</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2013-02-13T22:17:54Z</dc:date>
    </item>
  </channel>
</rss>

