0

So I'm starting to really get into utilizing Google Drive to streamline my many personal projects. One of the things I'd love to do is figure out how to download CSV files onto my Google Drive, and have Google Sheets automatically do an =IMPORTDATA on any new .csv files in a specific directory.

I've come across a number of problems trying to figure this out, but the biggest issue is that putting any kind of file on the Google Drive doesn't give you a link to the file itself, but rather something like such:

https://drive.google.com/a/xxxx/file/x/xxxxxxxxxxxxxxxx/view?usp=sharing

=IMPORTDATA doesn't recognize this as a .csv file. How can I go about doing this?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Jonathan Doe
  • 43
  • 1
  • 3
  • I'm trying to important the latest csv over time into a specific sheet, so that whoever is previewing the sheet, will also have the most up-to-date csv data. Also for formatting purposes, so that it makes more sense to other viewers. – Jonathan Doe Sep 17 '15 at 14:53

1 Answers1

2

I found the answer from another forum:

Generating a direct download link, as described in this article seems to work fine with the =IMPORTDATA function.

To summarize, you take the SITE_ID string from the sharing link you have:

https://drive.google.com/file/d/FILE_ID/edit?usp=sharing

Using this, you can generate the direct download link for use with the =IMPORTDATA function:

https://drive.google.com/uc?export=download&id=FILE_ID

Rubén
  • 34,714
  • 9
  • 70
  • 166
Jonathan Doe
  • 43
  • 1
  • 3