<?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: File crawling in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772163#M245156</link>
    <description>Thank you for helpful suggestions! A simple solution will do for now :).</description>
    <pubDate>Tue, 05 Oct 2021 13:52:17 GMT</pubDate>
    <dc:creator>pink_poodle</dc:creator>
    <dc:date>2021-10-05T13:52:17Z</dc:date>
    <item>
      <title>File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/771991#M245056</link>
      <description>&lt;P&gt;Hi fellow SAS users and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110701"&gt;@kevin12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am on a task that is similar to web crawling (&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Webcrawling-website-for-certain-webpage-that-has-the-word-I-am/m-p/412094#M100767" target="_blank"&gt;Webcrawling website for certain webpage that has t... - SAS Support Communities).&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I want to search a bunch of Xcel files for a word and return file (ideally file and folder) names that contain it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions are welcome.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 18:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/771991#M245056</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2021-10-04T18:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/771999#M245060</link>
      <description>&lt;P&gt;Before you automate a process you should start with a single file.&amp;nbsp;&lt;BR /&gt;Do you know how to do this for a single file?&lt;/P&gt;
&lt;P&gt;Is using OS commands an option or do you need SAS entirely?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AFAIK you would likely have to import each Excel file, that could then have multiple sheets with the possibility some of the data may not be visible to SAS - ie anything in a text box. No idea if that's actually an issue in your situation but something to think about :).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/235176"&gt;@pink_poodle&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi fellow SAS users and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110701"&gt;@kevin12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am on a task that is similar to web crawling (&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Webcrawling-website-for-certain-webpage-that-has-the-word-I-am/m-p/412094#M100767" target="_blank" rel="noopener"&gt;Webcrawling website for certain webpage that has t... - SAS Support Communities).&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I want to search a bunch of Xcel files for a word and return file (ideally file and folder) names that contain it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions are welcome.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 19:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/771999#M245060</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-04T19:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772009#M245068</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;! I also found a publication that is in the right direction (please see attached). The paper contains a macro that searches text files in folders for a word and returns their names if the word is there. I could save the xcel files in .csv format that is similar to text and see what the&lt;EM&gt;&amp;nbsp;%strsrch&lt;/EM&gt; macro does. I would rather automate file coversion as well. I would really want to know if this macro was already made into a SAS procedure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 20:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772009#M245068</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2021-10-04T20:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772011#M245070</link>
      <description>&lt;P&gt;While SAS could do it, to me it doesn't feel like a SAS task.&amp;nbsp; If you're on Windwos, I would try Windows file search first.&amp;nbsp; From a quick google, looks like it can handle it, if you set the appropriate options.&amp;nbsp; Or since you mention dumping the data to CSV, if you did that most text editors (Notepad++, Ultraedit) could do the search.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 20:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772011#M245070</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-10-04T20:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772032#M245081</link>
      <description>SAS VBS macro to convert XML to XLSX, you can modify this to work the opposite direction to convert XLSX to CSV. Not sure how it works if you have multiple sheets.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://gist.github.com/statgeek/c51f58a009f8d315a200f34912e494b1" target="_blank"&gt;https://gist.github.com/statgeek/c51f58a009f8d315a200f34912e494b1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Search a bunch of files for words:&lt;BR /&gt;&lt;A href="https://gist.github.com/statgeek/2f733d27820f43fa37d6ba92c30f22cf" target="_blank"&gt;https://gist.github.com/statgeek/2f733d27820f43fa37d6ba92c30f22cf&lt;/A&gt;</description>
      <pubDate>Mon, 04 Oct 2021 22:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772032#M245081</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-04T22:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772083#M245114</link>
      <description>&lt;P&gt;Web crawling is quite easy, as HTML is simple text. Similarly, text files are very easy to search and locate.&lt;/P&gt;
&lt;P&gt;But since Excel files (xlsx) are zip-compressed archives of XML files, each file needs to be uncompressed and decoded (the correct XML files need to be searched for data, as some of them only contain metadata) first before you can search.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case of text files, &lt;FONT face="courier new,courier"&gt;grep&lt;/FONT&gt; on a UNIX can search all files in a directory tree in one call.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 07:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772083#M245114</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-05T07:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772101#M245121</link>
      <description>&lt;P&gt;This macro does all you asked and more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 09:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772101#M245121</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-05T09:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772134#M245141</link>
      <description>&lt;P&gt;In SAS it's a one liner...&lt;/P&gt;
&lt;P&gt;if you write an appropriate powershell script that returns the results to SAS&amp;nbsp;formated as table&lt;/P&gt;
&lt;P&gt;First step is to get your powerShell script to run.&lt;/P&gt;
&lt;P&gt;Start &lt;A href="https://stackoverflow.com/questions/45762890/how-to-search-an-entire-excel-workbook-for-a-particular-string-using-powershell" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 11:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772134#M245141</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-10-05T11:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772163#M245156</link>
      <description>Thank you for helpful suggestions! A simple solution will do for now :).</description>
      <pubDate>Tue, 05 Oct 2021 13:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772163#M245156</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2021-10-05T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: File crawling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772283#M245206</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; you write an appropriate powershell script that returns the results to SAS&amp;nbsp;formated as table&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Including reading compressed (zip, xlsx, egp, rcv etc) files and subfolders?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 20:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-crawling/m-p/772283#M245206</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-05T20:38:02Z</dc:date>
    </item>
  </channel>
</rss>

