<?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: Excel to SAS-updations each quarter!! in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106071#M5575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean in a Macro or other SAS9.2 Procedures&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2012 15:41:11 GMT</pubDate>
    <dc:creator>robertrao</dc:creator>
    <dc:date>2012-08-28T15:41:11Z</dc:date>
    <item>
      <title>Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106068#M5572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;I have an Excel spread sheet(X) and has 3 tabs in it(A B C) which are to be imported into 3 datasets in SAS.&lt;/P&gt;&lt;P&gt;The 3 datasets created will be our master datasets. &lt;/P&gt;&lt;P&gt;We need to update latest information from Excel to our master datasets&lt;/P&gt;&lt;P&gt;Our Excel sheet will have previous information too, BUT ONLY THE CURRENT QUARTER INFORMATION NEEDS TO BE APPENDED TO OUR MASTER DATASETS..&lt;/P&gt;&lt;P&gt;Could someone help me build the code in Sas 9.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 14:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106068#M5572</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-28T14:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106069#M5573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would try something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;libname XL Excel "MyExcelFile.xlsx";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select max(myDate) into :myDateMax from myLib.myDatasetA;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;insert into myLib.MyDatasetA (myDate, myDataX, myDataY)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select myDate, myDataX, myDataY&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from XL.'A$'n&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;where myDate &amp;gt; &amp;amp;myDateMax;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/*... same for myDatasetB and myDatasetC */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;libname XL clear;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 15:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106069#M5573</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-28T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106070#M5574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PGstats,&lt;/P&gt;&lt;P&gt;thank you so very much for the quick response. It is always a joy to get replies. This website is great.&lt;/P&gt;&lt;P&gt;Is there also a way to do it&lt;STRONG&gt; without using Proc Sql? Could you also navigate me through?????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 15:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106070#M5574</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-28T15:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106071#M5575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean in a Macro or other SAS9.2 Procedures&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 15:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106071#M5575</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-28T15:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106072#M5576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you see every day on this forum, there are always many ways to get results with SAS. I will let others suggest alternatives to SQL. Here is a commented version of my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Replace the names starting with "my" with your own names */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Associate the name XL with your Excel file. Include the full path &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;within quotes */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;libname XL Excel "MyExcelFile.xlsx";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Store the last date already in your dataset myLib.myDatasetA &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;into macro variable DateMax */ &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select max(myDate) into :DateMax from myLib.myDatasetA;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Import the lines from tab A in your Excel file having a date &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;greater than DateMax and insert them in dataset &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;myLib.myDatasetA */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;insert into myLib.MyDatasetA (myDate, myVarX, myVarY)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select myDate, myVarX, myVarY&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from XL.'A$'n&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;where myDate &amp;gt; &amp;amp;DateMax;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 16:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106072#M5576</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-28T16:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-updations each quarter!!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106073#M5577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 16:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-updations-each-quarter/m-p/106073#M5577</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-28T16:49:01Z</dc:date>
    </item>
  </channel>
</rss>

