<?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 PROC IMPORT to get a specific range in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301534#M60615</link>
    <description>&lt;P&gt;Here's my step:&lt;/P&gt;
&lt;P&gt;proc import datafile="G:\Departments\Research\test scores\SCREADY\&amp;amp;prevyr.-&amp;amp;yr.\&amp;amp;yr.SCREADY.xlsx" out=state dbms=xlsx replace;&lt;BR /&gt;sheet="&amp;amp;yr SC READY STATE";&lt;BR /&gt;range="A1:BS97";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I'm also getting columns BT through DL, which I don't want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2016 14:36:45 GMT</pubDate>
    <dc:creator>GreggB</dc:creator>
    <dc:date>2016-09-29T14:36:45Z</dc:date>
    <item>
      <title>PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301534#M60615</link>
      <description>&lt;P&gt;Here's my step:&lt;/P&gt;
&lt;P&gt;proc import datafile="G:\Departments\Research\test scores\SCREADY\&amp;amp;prevyr.-&amp;amp;yr.\&amp;amp;yr.SCREADY.xlsx" out=state dbms=xlsx replace;&lt;BR /&gt;sheet="&amp;amp;yr SC READY STATE";&lt;BR /&gt;range="A1:BS97";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I'm also getting columns BT through DL, which I don't want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 14:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301534#M60615</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2016-09-29T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301556#M60622</link>
      <description>&lt;P&gt;I'm not sure but you may try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname mydata xlsx&amp;nbsp;&lt;SPAN&gt;"G:\Departments\Research\test scores\SCREADY\&amp;amp;prevyr.-&amp;amp;yr.\&amp;amp;yr.SCREADY.xlsx";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile=mydata;&lt;BR /&gt;sheet="&amp;amp;yr SC READY STATE";&lt;BR /&gt;range="A1:BS97";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 17:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301556#M60622</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-09-29T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301599#M60631</link>
      <description>&lt;P&gt;Try this -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datafile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"C:\TESTFILE.xlsx"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=testme &lt;/FONT&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;STRONG&gt;&lt;U&gt;=excel&lt;/U&gt; &lt;/STRONG&gt;replace;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;getnames&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=yes;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;range&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'A1:BS27'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&amp;nbsp;/*I set to 27, as I just had to make a sample sheet to test what's not working for you*/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 18:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/301599#M60631</guid>
      <dc:creator>Arpit_Agarwal</dc:creator>
      <dc:date>2016-09-29T18:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/535902#M73940</link>
      <description>This is a very old thread.. But I wish to answer it incase anyone comes here looking for the answer:&lt;BR /&gt;&lt;BR /&gt;the coding will be&lt;BR /&gt;&lt;BR /&gt;proc import datafile = 'the path of the file'&lt;BR /&gt;out = name of the dataset you wish to have&lt;BR /&gt;dbms = xls or xlsx depending on the file extension&lt;BR /&gt;range = 'sheet name $ and the range';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;As per your data and file path the coding will be:&lt;BR /&gt;&lt;BR /&gt;proc import datafile="G:\Departments\Research\test scores\SCREADY\&amp;amp;prevyr.-&amp;amp;yr.\&amp;amp;yr.SCREADY.xlsx"&lt;BR /&gt;out=state&lt;BR /&gt;dbms=xlsx replace;&lt;BR /&gt;range="&amp;amp;yr SC READY STATE$ A1:BS97";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Hope this helps</description>
      <pubDate>Fri, 15 Feb 2019 16:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/535902#M73940</guid>
      <dc:creator>ShajiVijayan</dc:creator>
      <dc:date>2019-02-15T16:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/738477#M80487</link>
      <description>&lt;P&gt;Hi, what if we have different no of data on monthly basis? Is there any other ways to not hard coded the range while working with the same file but having different no of data?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 03:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/738477#M80487</guid>
      <dc:creator>deedee07</dc:creator>
      <dc:date>2021-05-03T03:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT to get a specific range</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/758447#M80847</link>
      <description>&lt;P&gt;Yes, you can set the range to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;range="A3:0";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if you want to start reading in data from the third row and capture all rows and columns with data regardless of how many there are.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 17:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-to-get-a-specific-range/m-p/758447#M80847</guid>
      <dc:creator>kpberger</dc:creator>
      <dc:date>2021-07-30T17:44:22Z</dc:date>
    </item>
  </channel>
</rss>

