<?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 have problems reading in an excel sheet in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279161#M56231</link>
    <description>&lt;P&gt;Dear SAS communities,&lt;/P&gt;
&lt;P&gt;appreciate if anyone can help with my problem below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I&amp;nbsp;import this excel using this code below, a large number of extra variables (ak--fi) with no data were created on the far right of the dataset. &amp;nbsp;How can I import but not have these extra fields because they create conflict when merging this with other datasets.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; Out=work.mrihemo1 DATAFILE= "\\.psf\home\Documents\IronKey\CMRCOOP_merge\1CMR_COOP\Data_excel\1_mri_hemo_responses.xlsx" DBMS=xlsx REPLACE; &amp;nbsp; &amp;nbsp; GETNAMES=YES; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2016 20:58:49 GMT</pubDate>
    <dc:creator>rykwong</dc:creator>
    <dc:date>2016-06-21T20:58:49Z</dc:date>
    <item>
      <title>have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279161#M56231</link>
      <description>&lt;P&gt;Dear SAS communities,&lt;/P&gt;
&lt;P&gt;appreciate if anyone can help with my problem below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I&amp;nbsp;import this excel using this code below, a large number of extra variables (ak--fi) with no data were created on the far right of the dataset. &amp;nbsp;How can I import but not have these extra fields because they create conflict when merging this with other datasets.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; Out=work.mrihemo1 DATAFILE= "\\.psf\home\Documents\IronKey\CMRCOOP_merge\1CMR_COOP\Data_excel\1_mri_hemo_responses.xlsx" DBMS=xlsx REPLACE; &amp;nbsp; &amp;nbsp; GETNAMES=YES; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 20:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279161#M56231</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2016-06-21T20:58:49Z</dc:date>
    </item>
    <item>
      <title>have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279159#M56257</link>
      <description>&lt;P&gt;Dear SAS communities,&lt;/P&gt;
&lt;P&gt;appreciate if anyone can help with my problem below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I&amp;nbsp;import this excel using this code below, a large number of extra variables (ak--fi) with no data were created on the far right of the dataset. &amp;nbsp;How can I import but not have these extra fields because they create conflict when merging this with other datasets.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; Out=work.mrihemo1 DATAFILE= "\\.psf\home\Documents\IronKey\CMRCOOP_merge\1CMR_COOP\Data_excel\1_mri_hemo_responses.xlsx" DBMS=xlsx REPLACE; &amp;nbsp; &amp;nbsp; GETNAMES=YES; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 20:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279159#M56257</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2016-06-21T20:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279175#M56233</link>
      <description>&lt;P&gt;Use RANGE option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IMPORT&lt;/STRONG&gt;&lt;SPAN&gt; Out=work.mrihemo1 DATAFILE= "\\.psf\home\Documents\IronKey\CMRCOOP_merge\1CMR_&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;COOP\Data_excel\1_mri_hemo_responses.xlsx" DBMS=xlsx REPLACE; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GETNAMES=YES; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RANGE='Sheet1$A1:E10000' ;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 01:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279175#M56233</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-22T01:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279235#M56258</link>
      <description>&lt;P&gt;The problem is caused by (and your going to be surprised here) Excel. &amp;nbsp;If those cells outside your working area have any kind of information in them at all - and this includes formatting and styles etc. then Excel as default uses the whole range with any information. &amp;nbsp;When another application tries to read Excel, they pull this maximum range out and use that for import. &amp;nbsp;Fixing the Excel document would be my first goal, if there really is nothing in those additional columns, select them all and delete them, this should remove the problem. &amp;nbsp;Alternatively use a proper data transfer format such as CSV or XML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do note, posting Excel files is not a good idea, I personally would not download such things from the internet.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 08:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/279235#M56258</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-22T08:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/283580#M57754</link>
      <description>&lt;P&gt;many thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can manually clean the excel sheets to remove the columns (on the right of the sheet) that do not contain any data, but I was hoping that there may be a sas code that can auto delete these columns on the right. &amp;nbsp;The reason is each time I received this sheet the empty columns on the right may be under different labels and it is painstaking to manually delete these columns each time. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 18:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/283580#M57754</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2016-07-11T18:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: have problems reading in an excel sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/283581#M57755</link>
      <description>&lt;P&gt;many thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can manually clean the excel sheets to remove the columns (on the right of the sheet) that do not contain any data, but I was hoping that there may be a sas code that can auto delete these columns on the right. &amp;nbsp;The reason is each time I received this sheet(s) the empty columns on the right may be under different labels and it is painstaking to manually delete these columns each time. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 18:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/have-problems-reading-in-an-excel-sheet/m-p/283581#M57755</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2016-07-11T18:49:45Z</dc:date>
    </item>
  </channel>
</rss>

