<?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-without using SQL in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106951#M5629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WOW ARTHUR,&lt;/P&gt;&lt;P&gt;Thanks for your patience and Time. PGstats&amp;nbsp; and you deserve a Lunch. I am going to save this example and explanation for the future so that I will not take your valuable time for the same task again.&lt;/P&gt;&lt;P&gt;QUESTION: I am confused also on to whoi&amp;nbsp; among u both should be given a RIGHT ANSWER!!! There should have been a BOTH OPTION FOR THAT........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WeLL Done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 14:43:33 GMT</pubDate>
    <dc:creator>robertrao</dc:creator>
    <dc:date>2012-08-29T14:43:33Z</dc:date>
    <item>
      <title>Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106942#M5620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PGstats helped me with a solution in Sql. Could anyone help me writing it in Macro or other basic steps??&lt;/P&gt;&lt;P&gt;&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 in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 21:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106942#M5620</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-28T21:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106943#M5621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replicating PG's logic in a datastep:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname XL Excel "MyExcelFile.xlsx";&lt;/P&gt;&lt;P&gt;data want (drop=maxdate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain maxdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set myLib.myDatasetA (in=inA) XL.'A$'n;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if inA then maxdate=max(maxdate,myDate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if myDate gt maxdate;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 21:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106943#M5621</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-28T21:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106944#M5622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice and compact! I think the logic calls for &lt;STRONG&gt;maxdate = max(myDate, maxdate)&lt;/STRONG&gt; instead of &lt;STRONG&gt;maxdate=max(myDate, lag(myDate)) &lt;/STRONG&gt;which would only give you the maximum of the two last dates in the dataset. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 22:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106944#M5622</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-28T22:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106945#M5623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PG: Agreed and modified the code accordingly.&amp;nbsp; It worked on my sample data as it was in date order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 22:28:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106945#M5623</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-28T22:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106946#M5624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;Firstly Thanks for your effort in putting up the code.&lt;/P&gt;&lt;P&gt;Since I am a novice, I have some difficulty understanding the code. Please correct me if i am wrong in understanding it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)we are reading our Excel file with the libname statement.&lt;/P&gt;&lt;P&gt;2)data want (drop=maxdate);&lt;/P&gt;&lt;P&gt;what is data want?why are we dropping maxdate??????and again retaining it????i dont want to create another dataset. just wanted to update&lt;/P&gt;&lt;P&gt;datasetA datasetB and datasetC from EXCEL (excel is updated every quarter)!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)set myLib.myDatasetA (in=inA) XL.'A$'n;&lt;/P&gt;&lt;P&gt;To the DatasetA present in our library we are setting the information present in our Excel Tab1;(n specifies the tab)!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) if inA &lt;STRONG&gt;maxdate = max(myDate, maxdate)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;else if myDate gt maxdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is this final step doing&amp;gt;??????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS A TON&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 13:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106946#M5624</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106947#M5625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PGstats,&lt;/P&gt;&lt;P&gt;Thanks for making corrections to Arthurs code.&lt;/P&gt;&lt;P&gt;Since I am a novice, I have some difficulty understanding the code. Please correct me if i am wrong in understanding it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)we are reading our Excel file with the libname statement.&lt;/P&gt;&lt;P&gt;2)data want (drop=maxdate);&lt;/P&gt;&lt;P&gt;what is data want?why are we dropping maxdate??????and again retaining it????i dont want to create another dataset. just wanted to update&lt;/P&gt;&lt;P&gt;datasetA datasetB and datasetC from EXCEL (excel is updated every quarter)!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)set myLib.myDatasetA (in=inA) XL.'A$'n;&lt;/P&gt;&lt;P&gt;To the DatasetA present in our library we are setting the information present in our Excel Tab1;(n specifies the tab)!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) if inA &lt;STRONG&gt;maxdate = max(myDate, maxdate)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;else if myDate gt maxdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is this final step doing&amp;gt;??????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS A TON&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 13:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106947#M5625</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T13:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106948#M5626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code was intended to mimic what PG's SQL code had done:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Yes, we are reading the Excel file with the libname statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The datastep is creating a file called "want".&amp;nbsp; You can give it whatever name you want.&amp;nbsp; For examples, I usually call the input data 'have' and the output file 'want'.&amp;nbsp; Maxdate was dropped as I didn't think you needed it beyond using it to determine which Excel rows you wanted to add.&amp;nbsp; The code was only written to update one dataset based on a tab within an Excel workbook.&amp;nbsp; Of course, it could easily be expanded to deal with multiple tabs and/or sas dataset updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maxdate is retained so that its value holds, from one record to the next, unless the program changes it.&amp;nbsp; That way, the value continues to be available while you are reading the data from the workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In PG's code he assumed a tab labeled 'A' which, written as a name literal (in his code) was expressed as 'A$'n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. The program is first reading and rewriting all of the records that are in the current sas dataset and, by the time it gets to the last record, having determined what the latest date was that was in the file.&amp;nbsp; Then, when it reads the tab in the workbook, it ONLY selects those rows that have a value for myDate that is more recent than maxdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that answer all of your questions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 13:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106948#M5626</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-29T13:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106949#M5627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Arthur,&lt;/P&gt;&lt;P&gt;Some more questions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Apart from the latest data being updated in myLib.myDatasetA the same data&amp;nbsp; is seen in the WANT dataset we are creating here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)if mydate is the &lt;STRONG&gt;variable&lt;/STRONG&gt; containing the dates&lt;STRONG&gt; in the dataset&lt;/STRONG&gt;? then which part of ouir code is comparing our dates in the dataset with the dates present in Excel????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)if my date is in the format 2011Q3 &lt;STRONG&gt;and so on&lt;/STRONG&gt; this code will still hold good right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)if inA then maxdate=max(maxdate,myDate);&amp;nbsp;&amp;nbsp; /*holding the max date in our dataset*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if myDate gt maxdate;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*what is this step doing? "else if myDate gt maxdate" then what should it do? is there&amp;nbsp; anything missing here*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106949#M5627</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106950#M5628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is probably easiest to answer your questions with an example that only uses sas datasets so that you can see what the data looks like in a data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, here are two datasteps that create files which I think are like the ones you have, other than that the second one is really a tab within an Excel workbook:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data myDatasetA;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat myDate yyq6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format myDate yyq6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input myDate x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;2010Q1 1&lt;/P&gt;&lt;P&gt;2010Q2 1&lt;/P&gt;&lt;P&gt;2010Q3 1&lt;/P&gt;&lt;P&gt;2010Q4 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data XL_A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat myDate yyq6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format myDate yyq6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input myDate x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;2010Q1 2&lt;/P&gt;&lt;P&gt;2010Q3 2&lt;/P&gt;&lt;P&gt;2010Q4 2&lt;/P&gt;&lt;P&gt;2011Q1 2&lt;/P&gt;&lt;P&gt;2011Q2 2&lt;/P&gt;&lt;P&gt;2011Q3 2&lt;/P&gt;&lt;P&gt;2011Q4 2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*next, here is the code, but modified to work with 2 sas datasets, rather than expecting one to be from Excel */&lt;/P&gt;&lt;P&gt;data want (drop=maxdate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain maxdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set myDatasetA (in=inA) XL_A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if inA then maxdate=max(maxdate,myDate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if myDate gt maxdate;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* the resulting file will look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myDate&amp;nbsp;&amp;nbsp;&amp;nbsp; x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2010Q1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2010Q2&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2010Q3&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2010Q4&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2011Q1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2011Q2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2011Q3&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2011Q4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, to answer your questions:&lt;/P&gt;&lt;P&gt;1. The data in myDatasetA doesn't get changed .. only new records are added to it&lt;/P&gt;&lt;P&gt;2. Before file XL_A is even read, maxdate was set to equal the maximum date present in the file myDatasetA.&amp;nbsp; It was retained so that it would be available at that time when the records from XL_A were read&lt;/P&gt;&lt;P&gt;3. The format of myDate shouldn't matter as long as it was input correctly to represent a SAS date&lt;/P&gt;&lt;P&gt;4. Yes, you appear to understand the first part.&amp;nbsp; The second part is a SAS statement that selects records from XL_A if, and only if, their value for myDate is greater than maxdate.&amp;nbsp; An easy way to see that work is with another example.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt; set sashelp.class;&lt;/P&gt;&lt;P&gt; if sex eq "M";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* That code will ONLY select records that have a value of "M" for the variable called sex */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106950#M5628</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-29T14:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106951#M5629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WOW ARTHUR,&lt;/P&gt;&lt;P&gt;Thanks for your patience and Time. PGstats&amp;nbsp; and you deserve a Lunch. I am going to save this example and explanation for the future so that I will not take your valuable time for the same task again.&lt;/P&gt;&lt;P&gt;QUESTION: I am confused also on to whoi&amp;nbsp; among u both should be given a RIGHT ANSWER!!! There should have been a BOTH OPTION FOR THAT........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WeLL Done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106951#M5629</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T14:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106952#M5630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun:&amp;nbsp; Yes, it would be nice to be able to assign multiple correct answers, but it is more important that you assign at least one of them as being correct so that others won't use up their time trying to answer a question they don't think has been answered yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can assign one correct answer and, I think, up to 3 other posts as being helpful.&amp;nbsp; Assigning those credits serves two purposes: (1) it makes it easier for people to find the correct answer when they have a similar question and (2) it is the only reward we users get for helping other users.&amp;nbsp; Not much of an award as it can't be used for anything, but at least it does seem to motivate people to answer posts.&amp;nbsp; FWIW, a correct answer gets 4 points and each helpful answer gets 3 points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106952#M5630</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-29T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106953#M5631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;The code u built keeps updating the values from Excel to our dataset BUT WITH A DIFFERENT NAME(WANT).&lt;/P&gt;&lt;P&gt;WANT has the information now.&lt;/P&gt;&lt;P&gt;Is there a way to do the same process without creating WANT dataset?????????&lt;/P&gt;&lt;P&gt;i want data from Excel to be added to myDatasetA &lt;STRONG&gt;which is already present in a particular library&lt;/STRONG&gt;?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106953#M5631</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T18:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106954#M5632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*WILL THIS WORK?&lt;/P&gt;&lt;P&gt;changed want to data myLib.myDatasetA??????????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname XL Excel "MyExcelFile.xlsx";&lt;/P&gt;&lt;P&gt;data myLib.myDatasetA (drop=maxdate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain maxdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set myLib.myDatasetA (in=inA) XL.'A$'n;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if inA then maxdate=max(maxdate,myDate);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if myDate gt maxdate;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106954#M5632</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T18:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106955#M5633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun,&amp;nbsp; Yes!&amp;nbsp; As far as I can tell, that is precisely how it should look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, just to play it safe, you may want to make a copy of mylib.myDatasetA, before running the code.&amp;nbsp; The code will physically modify mylib.myDatasetA and, if it isn't exactly how you want it, without having a backup copy you will be totally out of luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have I ever mentioned the importance of maintaining backup copies of one's datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106955#M5633</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-29T19:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106956#M5634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I recently joined this community. I dint have a chance to hear about the backup maintainance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106956#M5634</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-29T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106957#M5635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I don't think I've ever mentioned it here but, with computers, it can be a life saver and SHOULD be mentioned from time to time by someone!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106957#M5635</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-29T19:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106958#M5636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;i have my date in the name Quarter and values like 2010Q1 2010Q4 2012Q1 etc in Excel.(when i converted to dataset i am getting it as charecter and when i run the below code I am getting an error.&lt;/P&gt;&lt;P&gt;Could you please help????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; libname XL Excel &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 10pt;"&gt;"C:\Users\dump\Desktop\Bodeee.xlsx"&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;data sasuser.Length (drop=maxdate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;retain maxdate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;set sasuser.Length (in=inA) XL.'Los$'n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;if inA &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; maxdate=max(maxdate,QUARTER);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;else &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; QUARTER gt maxdate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;*ERROR;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; Character values have been converted to numeric values at the places given by:&lt;/P&gt;&lt;P&gt; (Line):(Column).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;15:33&amp;nbsp;&amp;nbsp; 16:9&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;NOTE: Invalid numeric data, QUARTER='2010 Q4' , at line 15 column 33.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 15:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106958#M5636</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-30T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106959#M5637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;Yesterday we discussed some example with the date in yyq6 format.&lt;/P&gt;&lt;P&gt;here in my case i enter the date as 2010q1 and so on and so when i convert to a dataset its stil a charecter(with no formats attached to it);&lt;/P&gt;&lt;P&gt;So i beleive i am getting that error.&lt;/P&gt;&lt;P&gt;could you provide me with a n alternative solution to this problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 15:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106959#M5637</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-08-30T15:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106960#M5638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We (the Forum) would have to know how that field is represented both in your Excel workbook and in your SAS dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example you showed looks like text and includes a space between year and quarter.&amp;nbsp; Is that the way it appears in both files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 15:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106960#M5638</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-30T15:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Excel to SAS-without using SQL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106961#M5639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please try replacing&amp;nbsp; "QUARTER" with&amp;nbsp; "input(QUARTER,yyq9.)" in your sas code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 15:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Excel-to-SAS-without-using-SQL/m-p/106961#M5639</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-08-30T15:46:15Z</dc:date>
    </item>
  </channel>
</rss>

