Google Sheets question: How can I import the contents of a CSV file on the web directly into a sheet? Specifically, I'm trying to import some of the graph data (available as a CSV download) directly from https://www.inspq.qc.ca/covid-19/donnees into a Google Sheet.
Under Section 4.1 for example, if you click on the 3 dots to the right of the graph, you can "Save as CSV". The URL I get for this is:
blob:https://www.inspq.qc.ca/92b0e052-7112-427e-b574-0cb246c0a82b
I should also point out I don't really know what a "blob" file is.
In Google Sheets, I tried doing:
=IMPORTDATA("blob:https://www.inspq.qc.ca/92b0e052-7112-427e-b574-0cb246c0a82b")
which gave me the error:
Could not fetch URL:
blob:https://www.inspq.qc.ca/92b0e052-7112-427e-b574-0cb246c0a82b
If I remove the "blob:" prefix, I get this error:
Resource at URL not found.
If possible I'd like to avoid scripting as everything I know about (and do with) Google Sheets is based on cell formulas. But of course if the only way is to involve scripting, I'd be willing to look into that.
EDIT: So it turns out the real problem is the generation of the blob... I got the URL of the blob by:
- Going to http://inspq.qc.ca/covid-19/donnees
- Scrolling down to "4.1 - Évolution des nombres [...]"
- Clicking on the 3 dots on the right and choosing "Télécharger les données en format CSV".
- This calls a javascript function that generates the blob download.
The URL appears to change every day. Is there a way to extract it somehow or programmatically simulate the browser clicks to get the URL?