<?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: select columns by skiping certain column in proc import in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570245#M160783</link>
    <description>&lt;P&gt;I have not tested it, but I assume if the (keep= a b d..) option is available then you could also do (drop = c))&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2019 14:01:25 GMT</pubDate>
    <dc:creator>Tommy1</dc:creator>
    <dc:date>2019-07-01T14:01:25Z</dc:date>
    <item>
      <title>select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570239#M160782</link>
      <description>&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;Hi SAS fellows,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;Say I have an excel with data in cell A1 to Z100.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;If I want to import only column A-B, and D-Z&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;How can I skip column C?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;would anyone know some code like this will work?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datafile&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;econ_locat.&amp;amp;file."&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=econfile &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=xlsx &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;replace&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&lt;FONT face="Courier New" size="3"&gt;range&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;"Sheet1$A1:B100 and Sheet1$D1:Z100"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me to edit the code "&lt;FONT color="#800080"&gt;&lt;FONT face="Courier New" size="3"&gt;range&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;"Sheet1$A1:B100 and Sheet1$D1:Z100&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;" &lt;FONT color="#000000"&gt;to make it work?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Courier New" size="3"&gt;Or other code that would work except that &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;&lt;FONT face="Courier New" size="3"&gt;I don't want to use the "Keep = A B D E F &lt;/FONT&gt;&lt;/EM&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#000000"&gt;G.... Z" option or "drop = C" option&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; because&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#000000"&gt;the column&amp;nbsp;name of C has spaces (it's "Real GDP"&amp;nbsp;so I want to avoid using keep= and drop = options.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#000000"&gt;&lt;BR /&gt;(because in excel the variable name has spaces, which brings another problem to solve)&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;(I don't want to change it manually in excel either, because there are actually hundreds of variables like this have spaces)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT face="Courier New" size="3"&gt;Thanks!!!! &lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570239#M160782</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-07-01T15:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570245#M160783</link>
      <description>&lt;P&gt;I have not tested it, but I assume if the (keep= a b d..) option is available then you could also do (drop = c))&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 14:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570245#M160783</guid>
      <dc:creator>Tommy1</dc:creator>
      <dc:date>2019-07-01T14:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570287#M160789</link>
      <description>thanks!!!</description>
      <pubDate>Mon, 01 Jul 2019 15:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570287#M160789</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-07-01T15:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570296#M160793</link>
      <description>the problem is that my name has spaces so I want to avoid using keep= and drop = options.&lt;BR /&gt;(because in excel the variable name has spaces, which brings another problem to solve)</description>
      <pubDate>Mon, 01 Jul 2019 15:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570296#M160793</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-07-01T15:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570297#M160794</link>
      <description>&lt;P&gt;Does PROC IMPORT allow you to specify a compound range in the RANGE option?&amp;nbsp; Try using the syntax that works in Excel.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;range="Sheet1$A1:B100,Sheet1$D1:Z100";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But why not just drop it from the SAS dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know the name of the variable that is in the column you don't want?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;out=econfile(drop=C)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570297#M160794</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-01T15:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570298#M160795</link>
      <description>thanks!!! I just tried range="Sheet1$A1:B100,Sheet1$D1:Z100"; no luck : (</description>
      <pubDate>Mon, 01 Jul 2019 15:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570298#M160795</guid>
      <dc:creator>changxuosu</dc:creator>
      <dc:date>2019-07-01T15:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: select columns by skiping certain column in proc import</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570299#M160796</link>
      <description>&lt;P&gt;Yea I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;, why not just bring everything in and then you can always write a quick data step and drop the variable. It not like there is a lot of data here that we need to worry about bringing too much in.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-columns-by-skiping-certain-column-in-proc-import/m-p/570299#M160796</guid>
      <dc:creator>Tommy1</dc:creator>
      <dc:date>2019-07-01T15:29:38Z</dc:date>
    </item>
  </channel>
</rss>

