<?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: Extra rows when importing Excel data in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/705575#M19697</link>
    <description>&lt;P&gt;The obs=73 needs to be in the set statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 03:25:10 GMT</pubDate>
    <dc:creator>Krissy217</dc:creator>
    <dc:date>2020-12-14T03:25:10Z</dc:date>
    <item>
      <title>Extra rows when importing Excel data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683662#M19554</link>
      <description>&lt;P&gt;I have a 74 row excel sheet, 1 row variable names, 73 rows of data. When I import, over a million rows are imported - 73 data plus over a million of missing data ('.'). All the variables in these rows have this "missing" data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried options obs = 73 with no change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options obs = 73;&lt;/P&gt;&lt;P&gt;proc import datafile = 'data.xlsx'&lt;BR /&gt;out = data1&lt;BR /&gt;dbms = xlsx&lt;BR /&gt;replace;&lt;BR /&gt;datarow = 2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any recommendations on how to just get the 73 rows of data would be greatly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 14:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683662#M19554</guid>
      <dc:creator>Betsy</dc:creator>
      <dc:date>2020-09-14T14:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extra rows when importing Excel data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683666#M19555</link>
      <description>&lt;P&gt;This happens when somebody did&amp;nbsp;&lt;EM&gt;anything&lt;/EM&gt; in the very last available row in the spreadsheet (e.g. type a blank). Since the maximum number of rows in Excel is 1M, your spreadsheet will then expand down to there, and SAS will import that.&lt;/P&gt;
&lt;P&gt;Fix it in Excel (mark rows 75 to 1M, delete rows), or run a data step after the import with dataset option OBS=73 in the SET statement.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 14:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683666#M19555</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-14T14:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extra rows when importing Excel data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683682#M19556</link>
      <description>&lt;P&gt;The global statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp; OPTIONS OBS=73;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;only applies to sas datasets being read.&amp;nbsp;&amp;nbsp; As you have discovered, it does not control the number of observations that are written to a sas dataset.&amp;nbsp; You can prove this to yourself with the following demo program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options obs=19;
data t;
  set sashelp.class;
  output;
  output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which generates the log notes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.T has 38 observations and 5 variables.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 14:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683682#M19556</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-09-14T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extra rows when importing Excel data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683689#M19557</link>
      <description>&lt;P&gt;Thank you, that worked perfectly. I ended up using VBA in excel to delete the rows since there were so many rows to highlight, and I wasn't able to do a find and delete (other rows had actual missing data marked with '.' as well).&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 15:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/683689#M19557</guid>
      <dc:creator>Betsy</dc:creator>
      <dc:date>2020-09-14T15:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Extra rows when importing Excel data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/705575#M19697</link>
      <description>&lt;P&gt;The obs=73 needs to be in the set statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 03:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extra-rows-when-importing-Excel-data/m-p/705575#M19697</guid>
      <dc:creator>Krissy217</dc:creator>
      <dc:date>2020-12-14T03:25:10Z</dc:date>
    </item>
  </channel>
</rss>

