<?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: Import Excel with Differnt Ranges and Give the first obs as Datset Names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116511#M24041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2012 07:32:09 GMT</pubDate>
    <dc:creator>sas_Forum</dc:creator>
    <dc:date>2012-05-16T07:32:09Z</dc:date>
    <item>
      <title>Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116509#M24039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having excel file i wnat to Read it a split and create new datasets when ever i reach all the columns are balnk&lt;/P&gt;&lt;P&gt;In this should create 5 datasets like ease,west,north,south,all zones and it should go to new dataaset&lt;BR /&gt;if it get all thecolumns as blank.All zones should have onely 1 Row it shd not read the data&lt;BR /&gt;after balnk as it shd not read Notes:&lt;/P&gt;&lt;P&gt;I am having differnt excel sheets with differnet zone names they are not fixed and range is also not fixed&amp;nbsp; and in some sheets i may have 8 zones and in some i will have 2 zones&lt;BR /&gt;and i shld give the zones as dataset names&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the Excel file with Data, and Text file for your Ref&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output &lt;/P&gt;&lt;P&gt;1.Datset East&lt;BR /&gt;zone city no &lt;BR /&gt;east&amp;nbsp; &lt;BR /&gt;mum anderi 123&lt;BR /&gt;zeharbad navi 345&lt;BR /&gt;kalyan new 456&lt;/P&gt;&lt;P&gt;2.Datset west&lt;BR /&gt;zone city no&lt;BR /&gt;west&amp;nbsp; &lt;BR /&gt;hyd nlg 456&lt;BR /&gt;secbad sec 1256&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3.Datset North&lt;BR /&gt;zone city no&lt;BR /&gt;North&amp;nbsp; &lt;BR /&gt;ahmedabad ahm 23&lt;BR /&gt;nagur nng 456&lt;/P&gt;&lt;P&gt;4.Datset South&lt;BR /&gt;zone city no&lt;BR /&gt;south&amp;nbsp; &lt;BR /&gt;sahanari snr 345&lt;BR /&gt;gur gjk 256&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;5.Datset all_zones&lt;BR /&gt;zone city no&amp;nbsp; &lt;BR /&gt;All zones all 23569&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 06:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116509#M24039</guid>
      <dc:creator>sas_Forum</dc:creator>
      <dc:date>2012-05-16T06:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116510#M24040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't open your XLS file , It is corrupted .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 07:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116510#M24040</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-16T07:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116511#M24041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 07:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116511#M24041</guid>
      <dc:creator>sas_Forum</dc:creator>
      <dc:date>2012-05-16T07:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116512#M24042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still can't open .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 07:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116512#M24042</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-16T07:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116513#M24043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have added the print screen and data in Data.txt please refer it .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 08:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116513#M24043</guid>
      <dc:creator>sas_Forum</dc:creator>
      <dc:date>2012-05-16T08:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Import Excel with Differnt Ranges and Give the first obs as Datset Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116514#M24044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;libname x excel 'c:\data.xls' getnames=no mixed=yes;


proc sql noprint;
select quote(strip(name)),name
 into : name separated by ',', : name1 separated by ','
 from dictionary.columns 
&amp;nbsp; where libname='X' AND MEMNAME='Sheet1$';
quit;

data _null_;
if 0 then set x.'Sheet1$'n ;
dcl hash h(multidata:'y');
h.definekey(&amp;amp;name);
h.definedata(&amp;amp;name);
h.definedone();
do until (missing(cats(&amp;amp;name1)) or last);
 set x.'Sheet1$'n end=last;
 if not missing(cats(&amp;amp;name1)) then do;found=1; h.add();end;
end;
if found then do;n+1;h.output(dataset:cats('test',n)); end;
run;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 02:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-Excel-with-Differnt-Ranges-and-Give-the-first-obs-as/m-p/116514#M24044</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-18T02:34:02Z</dc:date>
    </item>
  </channel>
</rss>

