<?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: Extract &amp;amp; Append Excel files from Network Drive into EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404649#M25992</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll start a new post for this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stay tuned.&amp;nbsp; :&amp;nbsp; )&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 01:19:40 GMT</pubDate>
    <dc:creator>OscarBoots1</dc:creator>
    <dc:date>2017-10-17T01:19:40Z</dc:date>
    <item>
      <title>Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404621#M25984</link>
      <description>&lt;P&gt;Hi Forum, I was wondering if anyone has dine this with EG &amp;amp; how so?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting Excel files dropped Daily into a Network Drive folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They have a date stamp but the first 10 or so characters are the same each time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a process that checks the folder &amp;amp; brings a Range of cells from a spreadsheet &amp;amp; Appends to a table each day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that's a lot to do but maybe someone has done something similar before?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 22:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404621#M25984</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-10-16T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404638#M25987</link>
      <description>&lt;P&gt;1. List of files from the folder - see Macro Appendix for an example&lt;/P&gt;
&lt;P&gt;2. Process the list and find the latest data you need to import&lt;/P&gt;
&lt;P&gt;3. Import the data - this should be straightforward&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a fairly common task and you should find a lot of examples online.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 23:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404638#M25987</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-16T23:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404643#M25988</link>
      <description>&lt;P&gt;Thanks Reeza.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where do I find the macro Appendix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 00:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404643#M25988</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-10-17T00:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404644#M25989</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of the full code for Excel files. But a warning, you'll run into issues. Excel files have no define structure so when SAS reads it, it guesses at types. This means some files will be processed with a variable as character and others as numeric. You'll need to add a step to ensure that your variables are in the type/format that you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 00:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404644#M25989</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-17T00:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404646#M25990</link>
      <description>&lt;P&gt;Thanks Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Useful stuff for other projects as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 00:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404646#M25990</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-10-17T00:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404648#M25991</link>
      <description>&lt;P&gt;Hi Again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below is the first part of the code &amp;amp; I'm trying to work out where I give the Directory path &amp;amp; Server etc?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't done a&amp;nbsp; lot of work with EG Macros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Program Description&lt;/P&gt;&lt;DIV class="xis-topicContent"&gt;&lt;DIV class="xis-paragraph"&gt;Begin the macro definition with two parameters.&lt;/DIV&gt;&lt;DIV class="xis-codeBlock"&gt;&lt;PRE class="xis-code"&gt;%macro drive(dir,ext); 
   %local cnt filrf rc did memcnt name; 
   %let cnt=0;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="xis-paragraph"&gt;Create two macro variables:&lt;DIV class="xis-listUnordered"&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;amp;FILRF will contain the fileref (Mydir) to be used within the FILENAME function.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;amp;RC will contain the results from the FILENAME function. The returned value is a &lt;CODE class="xis-systemSuppliedValue"&gt;0&lt;/CODE&gt; if it is successful.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;The FILENAME function assigns the fileref (Mydir) to the directory passed to the macro (&amp;amp;DIR).&lt;/DIV&gt;&lt;DIV class="xis-codeBlock"&gt;&lt;PRE class="xis-code"&gt;%let filrf=mydir;
   %let rc=%sysfunc(filename(filrf,&amp;amp;dir));
  &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2017 01:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404648#M25991</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-10-17T01:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract &amp; Append Excel files from Network Drive into EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404649#M25992</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll start a new post for this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stay tuned.&amp;nbsp; :&amp;nbsp; )&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 01:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Extract-amp-Append-Excel-files-from-Network-Drive-into-EG/m-p/404649#M25992</guid>
      <dc:creator>OscarBoots1</dc:creator>
      <dc:date>2017-10-17T01:19:40Z</dc:date>
    </item>
  </channel>
</rss>

