<?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: scraping multiple excel files from a website in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823785#M325321</link>
    <description>Based on the search link (first link in the post) you send it seems to me there are only 12 files to download. The time it will take to create the code and test will surely be a lot more then just clicking 12 times to download the files.&lt;BR /&gt;The coding challenge is interesting and solving it will be rewarding. But taking into account the effort I suggest you just click the 12 links, unless you need similar code for similar tasks in the future.&lt;BR /&gt;&lt;BR /&gt;Best regards, Jos</description>
    <pubDate>Mon, 18 Jul 2022 09:32:42 GMT</pubDate>
    <dc:creator>JosvanderVelden</dc:creator>
    <dc:date>2022-07-18T09:32:42Z</dc:date>
    <item>
      <title>scraping multiple excel files from a website</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823781#M325319</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need some help, I wish to extract some excel files from this website:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.destatis.de/SiteGlobals/Forms/Suche/Expertensuche_Formular.html?resourceId=2402&amp;amp;input_=2408&amp;amp;pageLocale=de&amp;amp;templateQueryString=Alle+politisch+selbst%C3%A4ndigen+Gemeinden+mit+ausgew%C3%A4hlten+Merkmalen+&amp;amp;submit.x=0&amp;amp;submit.y=0" target="_blank"&gt;https://www.destatis.de/SiteGlobals/Forms/Suche/Expertensuche_Formular.html?resourceId=2402&amp;amp;input_=2408&amp;amp;pageLocale=de&amp;amp;templateQueryString=Alle+politisch+selbst%C3%A4ndigen+Gemeinden+mit+ausgew%C3%A4hlten+Merkmalen+&amp;amp;submit.x=0&amp;amp;submit.y=0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; helped me some time ago with this solution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ht temp;

proc http
  url="https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/Archiv/GVAuszugJ/31122020_Auszug_GV.xlsx;jsessionid=B4477D957BFAB0E007E62A86373ED7F9.live711?__blob=publicationFile"
  out=ht
;
run;

proc import
  datafile=ht
  out=test
  dbms=xlsx
  replace
;
sheet="Onlineprodukt_Gemeinden";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem I have now is I wish to extract all excel files which has a date 31.12.1999, 31.12.2000, 31.12.2001 ....... and so on till 31.12.2021&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can I add to the above code to accomplish this task?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please note:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;What I realised in the url is that the name of the excel sheet also contains the date (see below in link,&amp;nbsp;I have highlighted this in red)&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;"&lt;A href="https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/Archiv/GVAuszugJ/" target="_blank"&gt;https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/Archiv/GVAuszugJ/&lt;/A&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;31122020_Auszug_GV.xlsx&lt;/STRONG&gt;&lt;/FONT&gt;;jsessionid=B4477D957BFAB0E007E62A86373ED7F9.live711?__blob=publicationFile"&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also note that the excel files might be found on different pages&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 08:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823781#M325319</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2022-07-18T08:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: scraping multiple excel files from a website</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823785#M325321</link>
      <description>Based on the search link (first link in the post) you send it seems to me there are only 12 files to download. The time it will take to create the code and test will surely be a lot more then just clicking 12 times to download the files.&lt;BR /&gt;The coding challenge is interesting and solving it will be rewarding. But taking into account the effort I suggest you just click the 12 links, unless you need similar code for similar tasks in the future.&lt;BR /&gt;&lt;BR /&gt;Best regards, Jos</description>
      <pubDate>Mon, 18 Jul 2022 09:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823785#M325321</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2022-07-18T09:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: scraping multiple excel files from a website</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823792#M325325</link>
      <description>&lt;P&gt;It is not only about 12 files but about several from 1999 to 2021 and further years. I will still appreciate any help&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 10:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823792#M325325</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2022-07-18T10:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: scraping multiple excel files from a website</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823899#M325354</link>
      <description>&lt;P&gt;It's doable but not as simple as your original question by any fashion. Scraping is a bit of guess and test and digging into the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/823899#M325354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-18T17:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: scraping multiple excel files from a website</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/824026#M325402</link>
      <description>&lt;P&gt;Yes, you are right, I believe it's not so easy, but maybe someone can help anyway&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 05:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scraping-multiple-excel-files-from-a-website/m-p/824026#M325402</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2022-07-19T05:44:04Z</dc:date>
    </item>
  </channel>
</rss>

