<?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: Problems importing .xls: excelcs does not work with range=&amp;quot;A3:0&amp;quot;, dbms=xls imports 1st in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485666#M71881</link>
    <description>&lt;P&gt;Thank you for your honest opinion!&amp;nbsp;I am no fan of .xls format either and I am quite surprised myself why this format is&amp;nbsp;still enjoying such a wide use almost 12 years after a better replacement has been released. The&amp;nbsp;reason why I was trying to get .xls imported directly was that I was trying to load the data in as few steps and using as few pieces of software as possible.&lt;/P&gt;&lt;P&gt;Thank you for the tip with supplying a large range! It turns that at least with the offending file dropping of the empty rows is not even required, no empty observations are being read.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2018 06:23:52 GMT</pubDate>
    <dc:creator>js5</dc:creator>
    <dc:date>2018-08-10T06:23:52Z</dc:date>
    <item>
      <title>Problems importing .xls: excelcs does not work with range="A3:0", dbms=xls imports 1st column only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485474#M71868</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having problems importing an .xls file. I am using 64-bit SAS&amp;nbsp;and 32-bit MS Office which means that I only have two DBMS choices: xls and excelcs. Unfortunately, neither of them does exactly what is required.&lt;/P&gt;&lt;P&gt;The excel file has data starting in cell A3 and up to column AJ, number of rows changing from import to import. With excelcs, I cannot get the following to work:&lt;/P&gt;&lt;PRE&gt;proc import datafile="foo.xls"
out=excel_test
dbms=excelcs
replace;
range="A3:0";&lt;/PRE&gt;&lt;P&gt;This throws an error message saying&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;File _IMEX_.'A3:0'n.DATA does not exist&lt;/EM&gt;. Replacing A3:0 with A3:AJ146 does get the file to import, but as the length of the file is variable, this would mean the code needs to be adapted every time the length changes. According to the documentation [1], RANGE option with 0 for last input row autodetection is supposed to work with EXCELCS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Unfortunately, switching to xls engine is of no help. The following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;proc import datafile="foo.xls"
	out=excel_test
	dbms=xls
	replace;
	startrow=4;
	namerow=3;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;does produce a dataset with the right number of variables and observations, but except for the first column nothing is actually imported - all the remaining columns are full of missing values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there anything else I could try in order to&amp;nbsp;get a procedure which imports all values and takes care of detecting how many rows are in the input file? Thank you for suggestions in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Julian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[1] &lt;A href="http://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=n0msy4hy1so0ren1acm90iijxn8j.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0bh60l5spojxzn11t7vvq0d55ka" target="_blank"&gt;http://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=n0msy4hy1so0ren1acm90iijxn8j.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0bh60l5spojxzn11t7vvq0d55ka&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 13:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485474#M71868</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2018-08-09T13:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems importing .xls: excelcs does not work with range="A3:0", dbms=xls imports 1st</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485480#M71869</link>
      <description>&lt;P&gt;Sorry, this is going to sound very tired to a new poster, but:&lt;BR /&gt;Why are you using XLS file format which has been decommissioned well over 10 years now.&lt;/P&gt;
&lt;P&gt;Why are you using proc import which is at best a guessing procedure to import data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't get the data in a decent format, i.e. something open and portable like csv, then do it yourself with save as from Excel.&amp;nbsp; All Excel data types are both proprietary, non-portable, and pretty bad for any type of data transfer.&lt;/P&gt;
&lt;P&gt;Once you have a decent datatype, then write a datastep to import the data according to your data import agreement which will define the data structure.&lt;/P&gt;
&lt;P&gt;To note, you are having to use the pcfiles engine and excelcs/xls due to using old file formats, switching to modern open file formats will make your life so much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To answer the range part, you need to supply a range, don't believe you can use &amp;amp;xlend, or if that version of excel even supports it.&amp;nbsp; &amp;nbsp;You could just specify :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;A3:AJ3000&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And then drop rows where col1 is missing.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 14:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485480#M71869</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-09T14:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problems importing .xls: excelcs does not work with range="A3:0", dbms=xls imports 1st</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485666#M71881</link>
      <description>&lt;P&gt;Thank you for your honest opinion!&amp;nbsp;I am no fan of .xls format either and I am quite surprised myself why this format is&amp;nbsp;still enjoying such a wide use almost 12 years after a better replacement has been released. The&amp;nbsp;reason why I was trying to get .xls imported directly was that I was trying to load the data in as few steps and using as few pieces of software as possible.&lt;/P&gt;&lt;P&gt;Thank you for the tip with supplying a large range! It turns that at least with the offending file dropping of the empty rows is not even required, no empty observations are being read.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 06:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problems-importing-xls-excelcs-does-not-work-with-range-quot-A3/m-p/485666#M71881</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2018-08-10T06:23:52Z</dc:date>
    </item>
  </channel>
</rss>

