Downloading an Excel file from a website

Hi everyone,
I have difficulties in using the download. file to download an Excel file (xls) from a website. I could not find the excel link of the file when I tried to inspect the web elements. Is there any possible way to download an Excel file without going to the website? I am sharing the URL link of the web site.

https://data.tuik.gov.tr/Bulten/Index?p=Consumer-Price-Index-November-2021-37389

In this page, I want to download the file, which is marked by the yellow circuit (first image). When I inspect the web elements I also found a link associated with this file (second image) . However, I could not find a way to download this file to my desktop using R. I tried the following code:

download.file("https://data.tuik.gov.tr/Bulten/Index?p=Consumer-Price-Index-November-2021-37389/Bulten/DownloadIstatistikselTablo?p=nQEN9hENWV5klqX5vMFS5gy2YzL8rdd7j9uZCeBo5Ifamx/iLAftzndHMSpgJ4Ke.xls", destfile="file.xls")!

Should you help me, I would really appreciate it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.