<?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: How to exclude footer/last row while reading excel file in SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204606#M267075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you cannot do this if you use the import wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could connect to the excelsheet via a library and then import the data via a query with a filter to exclude the records you do not want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2015 14:56:18 GMT</pubDate>
    <dc:creator>Keith0001</dc:creator>
    <dc:date>2015-07-16T14:56:18Z</dc:date>
    <item>
      <title>How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204600#M267069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; &lt;/P&gt;&lt;P&gt;I am reading an excel file which has footer note in the last row. Since footer note is different from the data/ columns structure. It is giving error in the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using NOBS option, but it is not working with external file reading (it is working with SAS dataset)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to find out the solution so that SAS will read only to the row before the footer row&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 11:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204600#M267069</guid>
      <dc:creator>nikunjgattani</dc:creator>
      <dc:date>2015-07-16T11:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204601#M267070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Standard answer for anything Excel = don't use Excel in the first place.&amp;nbsp; Can you not remove this row before you try to import it, that would be the easiest way.&amp;nbsp; Recommend however saving the file to CSV (or simliar) then you can process it as a normal text file.&amp;nbsp; Here is an exact post for what you want, but it assumes a CSV file:&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="60374" __jive_macro_name="thread" class="jive_macro jive_macro_thread active_link" href="https://communities.sas.com/" modifiedtitle="true" title="Last row of text file"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 11:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204601#M267070</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-16T11:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204602#M267071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot make any change in file because it present in different server. I have read access only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 12:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204602#M267071</guid>
      <dc:creator>nikunjgattani</dc:creator>
      <dc:date>2015-07-16T12:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204603#M267072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Open file in Excel, Save As to local file on your machine.&amp;nbsp; Then you can edit the file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 12:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204603#M267072</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-16T12:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204604#M267073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming the header and footers are recognizable ? Why not delete them from the table after loading the dataset ?&lt;/P&gt;&lt;P&gt;Also do you use EG or Base ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:14:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204604#M267073</guid>
      <dc:creator>Keith0001</dc:creator>
      <dc:date>2015-07-16T14:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204605#M267074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using SAS EG. I cannot make any changes in file.&lt;/P&gt;&lt;P&gt;I can make changes in program only.&lt;/P&gt;&lt;P&gt;Also, program is still working fine but it is showing error in the log because it reads the data in incorrect format ( because it is footer )&lt;/P&gt;&lt;P&gt;I want to remove error from the log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nikunj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204605#M267074</guid>
      <dc:creator>nikunjgattani</dc:creator>
      <dc:date>2015-07-16T14:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204606#M267075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you cannot do this if you use the import wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could connect to the excelsheet via a library and then import the data via a query with a filter to exclude the records you do not want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204606#M267075</guid>
      <dc:creator>Keith0001</dc:creator>
      <dc:date>2015-07-16T14:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204607#M267076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Keith0001 I am using filename and infile statement to read the file from server. I am not using Import wizard or any utility of SAS EG. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 06:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204607#M267076</guid>
      <dc:creator>nikunjgattani</dc:creator>
      <dc:date>2015-07-17T06:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204608#M267077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;You can't read a real Excel file with an INFILE statement. The INFILE statement is used for reading TEXT files (this statement is not 100% correct; take it as a rule of thumb). I assume what you call Excel is actually a .csv (which is a text file).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;To not read the last line of any text file the following should work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;data want; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;infile .... end=last; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;input ....; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;if last then delete; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;..... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; background-color: #f1f3f5;"&gt;Does this solve your problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 11:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204608#M267077</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-07-17T11:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204609#M267078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If its a CSV file, then why would it have additional non-CSV data attached?&amp;nbsp; If that's correct and it is a CSV, I would be even more tempted to go back to the vendor and ask why they are supplying non-conformant data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 12:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204609#M267078</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-17T12:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude footer/last row while reading excel file in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204610#M267079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="814511" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My reply to the OP was based on the assumption that this is just some footer information to be excluded, eg. a last line with a check-sum, a record count or even something more simple.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 12:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-exclude-footer-last-row-while-reading-excel-file-in-SAS/m-p/204610#M267079</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-07-17T12:27:14Z</dc:date>
    </item>
  </channel>
</rss>

