<?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: proc import excel sheet in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390184#M93568</link>
    <description>&lt;P&gt;I have another problem with this solution...&lt;/P&gt;&lt;P&gt;The columns names are extracted from the first row and I don't want.&lt;/P&gt;&lt;P&gt;I want something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;getnames = no&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Aug 2017 11:35:39 GMT</pubDate>
    <dc:creator>FP12</dc:creator>
    <dc:date>2017-08-23T11:35:39Z</dc:date>
    <item>
      <title>proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389943#M93500</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Excel file with several sheet.&lt;/P&gt;&lt;P&gt;I need to import to a table the sheet BKH..."&lt;/P&gt;&lt;P&gt;Sometimes the sheet can be named "BKH_0210", sometimes "BKH546", or whatever else beginning by "BKH", I am sure it's the only sheet name containing and beginning by BKH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried:&lt;/P&gt;&lt;PRE&gt;proc import datafile = "&amp;amp;inputdir./&amp;amp;input_file."
DBMS = xlsx OUT = &amp;amp;output_table.;
getnames=no;
sheet LIKE "BKH%";
run;&lt;/PRE&gt;&lt;P&gt;But it's not working...I just tried but I already had&amp;nbsp;the feeling it wouldn't work.&lt;/P&gt;&lt;P&gt;Do you have an idea on how I can do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 17:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389943#M93500</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2017-08-22T17:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389946#M93502</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/153928"&gt;@FP12&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an Excel file with several sheet.&lt;/P&gt;
&lt;P&gt;I need to import to a table the sheet BKH..."&lt;/P&gt;
&lt;P&gt;Sometimes the sheet can be named "BKH_0210", sometimes "BKH546", or whatever else beginning by "BKH", I am sure it's the only sheet name containing and beginning by BKH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I tried:&lt;/P&gt;
&lt;PRE&gt;proc import datafile = "&amp;amp;inputdir./&amp;amp;input_file."
DBMS = xlsx OUT = &amp;amp;output_table.;
getnames=no;
sheet LIKE "BKH%";
run;&lt;/PRE&gt;
&lt;P&gt;But it's not working...I just tried but I already had&amp;nbsp;the feeling it wouldn't work.&lt;/P&gt;
&lt;P&gt;Do you have an idea on how I can do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The LIKE syntax will not work in PROC IMPORT. It only works in PROC SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the EXCEL engine in a Libname statement to determine the names of all the sheets in your Excel file. Then you can find the one that begins with BKH, and then use that name found in your PROC IMPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/acpcref/63181/HTML/default/viewer.htm#n1wvmggexroxgyn17rp61jml3cvn.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acpcref/63181/HTML/default/viewer.htm#n1wvmggexroxgyn17rp61jml3cvn.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 17:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389946#M93502</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-08-22T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389965#M93506</link>
      <description>&lt;P&gt;That could look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myFile XLSX 'path to my excel file.xlsx';

data want;
set myFile.BKH: ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 18:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/389965#M93506</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-22T18:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390170#M93564</link>
      <description>&lt;P&gt;Thanks Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works perfectly... when there are not spaces character.&lt;/P&gt;&lt;P&gt;What if it's "BK H" instead of "BKH"? I tried and it is not working. Do you know a solution for this?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 10:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390170#M93564</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2017-08-23T10:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390184#M93568</link>
      <description>&lt;P&gt;I have another problem with this solution...&lt;/P&gt;&lt;P&gt;The columns names are extracted from the first row and I don't want.&lt;/P&gt;&lt;P&gt;I want something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;getnames = no&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Aug 2017 11:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390184#M93568</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2017-08-23T11:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc import excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390276#M93589</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/153928"&gt;@FP12&lt;/a&gt;&amp;nbsp;unfortunately I don't think that's possible using the libname method.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 14:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-excel-sheet/m-p/390276#M93589</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-23T14:46:29Z</dc:date>
    </item>
  </channel>
</rss>

