<?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: How to import only some columns from a XLSX file into SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247968#M46531</link>
    <description>&lt;P&gt;You can't selectively import data, but you can choose to not keep the variables or drop them in a further step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Feb 2016 13:42:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-02-04T13:42:27Z</dc:date>
    <item>
      <title>How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247931#M46522</link>
      <description>&lt;P&gt;Hi, I'd like to import some columns from .XLSX file into SAS. I've tried some code posted in the communities but doesn't work! Any&amp;nbsp;idea?&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247931#M46522</guid>
      <dc:creator>mgrd</dc:creator>
      <dc:date>2016-02-04T09:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247933#M46524</link>
      <description>&lt;P&gt;Just do a simple import, and then use a &lt;FONT face="courier new,courier"&gt;keep&lt;/FONT&gt; statement to keep only the columns you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And give some information about what "doesn't work".&lt;/P&gt;
&lt;P&gt;Post the code and log containing error messages, structure of dataset as was expected and as came out eventually.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247933#M46524</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-04T09:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247936#M46525</link>
      <description>&lt;P&gt;As an alternative to proc import:&lt;/P&gt;
&lt;P&gt;libname myxlsx xlsx "c:\anxlsxfile.xlsx";&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set myxlsx.sheet1 (keep=var1 var2...);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;libname myxlsx clear;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 10:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247936#M46525</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-04T10:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247940#M46527</link>
      <description>&lt;P&gt;Dear RW9, I've tried your solution but doesn't work, with the error below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GOPTIONS ACCESSIBLE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname &lt;SPAN&gt;myxlsx&lt;/SPAN&gt;&amp;nbsp;xlsx "C:\Desktop\Imparidade\Test_Excel.xlsx";&lt;BR /&gt;ERROR: The EXCEL engine cannot be found.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 10:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247940#M46527</guid>
      <dc:creator>mgrd</dc:creator>
      <dc:date>2016-02-04T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247941#M46528</link>
      <description>&lt;P&gt;Are you using SAS 9.2? &amp;nbsp;If so you can't use libname xlsx on that version;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/49/468.html" target="_blank"&gt;http://support.sas.com/kb/49/468.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to go with the proc import as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;kindly provided, or alternatively, save as CSV and write a datastep import - which to my mind would be a far more robust method.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 10:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247941#M46528</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-04T10:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247968#M46531</link>
      <description>&lt;P&gt;You can't selectively import data, but you can choose to not keep the variables or drop them in a further step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 13:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/247968#M46531</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-04T13:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/248140#M46584</link>
      <description>&lt;P&gt;Use RANGE= option .&lt;/P&gt;
&lt;P&gt;Also you could try other dbms:&lt;/P&gt;
&lt;P&gt;dbms=excel&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dbms=xlsx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='/folders/myfolders/edu.xls' out=have dbms=xls replace;
range='Sheet1$:A1:F10';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Feb 2016 02:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/248140#M46584</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-05T02:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250575#M47249</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ve used the codes below to import xlsx files, but the code gives error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; datafile='Z:\Programs\file.xlsx'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT=test DBMS=excel replace;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sheet='dw_names;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Error: ERROR: DBMS type EXCEL not valid for import.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; datafile='Z:\Programs\file.xlsx'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT=test DBMS=xlsx replace;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sheet='dw_names;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Error: ERROR: DBMS type EXCEL not valid for import.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have some idea to solve this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250575#M47249</guid>
      <dc:creator>mgrd</dc:creator>
      <dc:date>2016-02-17T11:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250578#M47250</link>
      <description>&lt;P&gt;Which SAS version are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: irrelevant.&lt;/P&gt;
&lt;P&gt;You don't have SAS/ACCESS to PC Files licensed.&lt;/P&gt;
&lt;P&gt;Or it is not installed although licensed.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250578#M47250</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-17T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250579#M47251</link>
      <description>&lt;P&gt;Hi RW9,&lt;/P&gt;&lt;P&gt;I've test your suggestion but without success. Could you please have a look to error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;libname myxlsx&amp;nbsp; “Z:\Programs\file.xlsx”;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set myxlsx.auto_dw_reportdetalhado (keep=CFK WF);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;libname myxlsx clear;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;ERROR: The EXCEL engine cannot be found.&lt;/P&gt;&lt;P&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data want;&lt;/P&gt;&lt;P&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set myxlsx.auto_dw_reportdetalhado (keep=CFK WF);&lt;/P&gt;&lt;P&gt;ERROR: Libname MYXLSX is not assigned.&lt;/P&gt;&lt;P&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;MD&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250579#M47251</guid>
      <dc:creator>mgrd</dc:creator>
      <dc:date>2016-02-17T11:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250584#M47253</link>
      <description>&lt;P&gt;Version 5.1 (32-bit)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Operating System: &amp;nbsp; WX64_WKS.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 12:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250584#M47253</guid>
      <dc:creator>mgrd</dc:creator>
      <dc:date>2016-02-17T12:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to import only some columns from a XLSX file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250588#M47255</link>
      <description>&lt;P&gt;SAS version 5.1 (if there ever was one in production) would be over 30 years old and never work on any Windows. You probably mistook the Enterprise Guide version for this.&lt;/P&gt;
&lt;P&gt;If your EG is 5.1, then you have at least SAS 9.2 as the workspace server. This still means that you have a problem with SAS/ACCESS to PC Files.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 12:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-only-some-columns-from-a-XLSX-file-into-SAS/m-p/250588#M47255</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-17T12:11:54Z</dc:date>
    </item>
  </channel>
</rss>

