title: Scraping data in Excel format from URL into R
body: <p>I am trying to download data from url
  <a href="https://migration.iom.int/datasets/europe-%E2%80%94-mixed-migration-flows-europe-quarterly-overview-april-june-2021" rel="nofollow noreferrer">https://migration.iom.int/datasets/europe-%E2%80%94-mixed-migration-flows-europe-quarterly-overview-april-june-2021</a></p>
  <p>On this page is available dataset with file into Excel and link for downloading data is <a href="https://migration.iom.int/system/tdf/datasets/Q2%202021%20Mixed%20Migration%20Flows%20to%20Europe%20%28April%20-%20June%202021%29.xlsx?file=1&amp;type=node&amp;id=12261" rel="nofollow noreferrer">https://migration.iom.int/system/tdf/datasets/Q2%202021%20Mixed%20Migration%20Flows%20to%20Europe%20%28April%20-%20June%202021%29.xlsx?file=1&amp;type=node&amp;id=12261</a></p>
  <p><a href="https://i.stack.imgur.com/9yfsp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9yfsp.png" alt="enter image description here" /></a></p>
  <p>So I want to download all this data in Excel format directly into R.</p>
  <pre><code>library(rvest)
  
  URL &lt;- &quot;https://migration.iom.int/system/tdf/datasets/Q2%202021%20Mixed%20Migration%20Flows%20to%20Europe%20%28April%20-%20June%202021%29.xlsx?file=1&amp;type=node&amp;id=12261&quot;
  pg &lt;- read_html(URL)
  
  html_attr(html_nodes(pg, &quot;download&quot;), &quot;href&quot;)
  </code></pre>
  <p>But I made some mistake and I don't make download. So can anybody help me how to download this data into R .</p>