<?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 Graceful ways to handle missing data from a Proc Import of .xls files in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178179#M45514</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;&lt;/P&gt;&lt;P&gt;I'm looking for ideas on how to handle error conditions from a missing or renamed tab when using Proc Import in a batch mode.&amp;nbsp; I've been asked to read in a lot of older excel files, each of which has multiple tabs.&amp;nbsp; I can easily detect if the file itself is present with the fileexist() function.&amp;nbsp; Not so much with a missing or mis-named tab within the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each proc import is followed by a data step to transform it, then a proc append.&amp;nbsp; If proc import doesn't find the tab, it won't create the output file as it doesn't know what to put in it.&amp;nbsp; The data step then chokes on a missing input dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Nov 2014 20:49:18 GMT</pubDate>
    <dc:creator>BenConner</dc:creator>
    <dc:date>2014-11-19T20:49:18Z</dc:date>
    <item>
      <title>Graceful ways to handle missing data from a Proc Import of .xls files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178179#M45514</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;&lt;/P&gt;&lt;P&gt;I'm looking for ideas on how to handle error conditions from a missing or renamed tab when using Proc Import in a batch mode.&amp;nbsp; I've been asked to read in a lot of older excel files, each of which has multiple tabs.&amp;nbsp; I can easily detect if the file itself is present with the fileexist() function.&amp;nbsp; Not so much with a missing or mis-named tab within the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each proc import is followed by a data step to transform it, then a proc append.&amp;nbsp; If proc import doesn't find the tab, it won't create the output file as it doesn't know what to put in it.&amp;nbsp; The data step then chokes on a missing input dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 20:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178179#M45514</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2014-11-19T20:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Graceful ways to handle missing data from a Proc Import of .xls files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178180#M45515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try a LIBNAME statement with the EXCEL option. When you assign your LIBNAME to a workbook, all of the tabs will be listed in a PROC CONTENTS of the library. You could also use the EXIST function to test if a tab is present or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 21:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178180#M45515</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-11-19T21:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Graceful ways to handle missing data from a Proc Import of .xls files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178181#M45516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course.&amp;nbsp; Then I can get direct access to what they -really- used for tab names and conditionally execute the transform/append steps.&amp;nbsp; And no nastygrams in the log files! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 21:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178181#M45516</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2014-11-19T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Graceful ways to handle missing data from a Proc Import of .xls files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178182#M45517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a followup, is there a way to disable SAS looking for field names on the first line of the spreadsheet in the "Libname Excel ..." approach?&amp;nbsp; It picked up a title and none of the columns have reasonable data for fieldnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 15:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Graceful-ways-to-handle-missing-data-from-a-Proc-Import-of-xls/m-p/178182#M45517</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2014-11-20T15:19:31Z</dc:date>
    </item>
  </channel>
</rss>

