I have a site which allows authenticated users (read: in-house users) to download certain data from the site in CSV format, e.g. http://example.com/activities.csv . Can I create a Google Spreadsheet which pulls its data directly from that URL?

(The idea is that I could then share that spreadsheet with them - we're on the same Apps domain - and skip the step of downloading and importing a CSV file every time we want to update the spreadsheet.)

I've looked through Spreadsheet's menus and help and haven't found a toehold on this; I'm wondering if it's not possible or if I'm just searching the wrong things.

  • Why can't you just house this data in a Google Spreadsheet and then share the sheet with them, skipping the CSV altogether? I guess my question is why not use the Google sheet to pull the data instead of it dumping into a CSV. – OnenOnlyWalter Feb 19 '13 at 21:07
  • The data in question is inventory questions about use of the website, e.g. a list of user-created objects on the site for administrators, a sort of activity report on the site itself. If there's a way to pull this data directly into a Google spreadsheet without it being in CSV, I'd love to hear about it. – pjmorse Feb 19 '13 at 21:11
  • Are you suggesting using something like github.com/tricycle/gdata_spreadsheet to push the data directly to the spreadsheet? – pjmorse Feb 19 '13 at 21:25
  • Exactly, using the gdata library, you can import data and write directly to a Spreadsheet, I'm not an expert in that area however, but thought I'd ask if there was some reason you're avoiding the gdata info. – OnenOnlyWalter Feb 19 '13 at 21:57
  • I'm not avoiding it, I just found it easier (so far) to export CSV because I'm not familiar with the gdata libraries (yet). (Don't get me started on the CSV library I ended up with...) I'll look into the gdata plugin and see where that lands me. – pjmorse Feb 20 '13 at 0:33

Drop this formula in the first cell of your google spreadsheet:


And it will automatically fill out the rest of the current spreadsheet with as many columns and rows as it needs until all the data from the original source csv is displayed.

There are many other powerful ways to feed Google Spreadsheets from all kinds of external sources. Check out this article for some demonstrations.

  • but the file is printing some wierdo data, how to avoid that? – atjoshi Nov 17 '14 at 8:48
  • @atjoshi: the cells with the imported data are still the function result. editting could lead to removal of the whole data. Better to copy and paste values only after the load, if you need to edit/print the data. – Mindwin Apr 8 '17 at 10:43
  • @atjoshi "How to avoid printing weirdo data" is a new and different question, but probably one worth asking. – Amanda Oct 25 '18 at 17:36
  • Great, but the trouble is it doesn't auto-update. importData also doesn't allow you to reference NOW() function - which I tried to put to the GET parameter to always have a fresh url – Fanky Sep 10 at 10:46

May be you can use a simple app script which can convert CSV's online into Google Spreadsheets? Here is a post that I wrote sometime back.

  • OP wants to create Google spreadsheet not to convert CSV online into Google spreadsheet. – serenesat Aug 14 '15 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.