Connect a Google spreadsheet to an Epicollect5 public project
Using the Epicollect5 API, it is possible to export entries in
Google Sheets features the
=IMPORTDATA()function to import data at a given url in .csv (comma-separated value)
Create a new sheet and click on the first cell. Paste the following in:
After the entries are loaded, it will look like below.
Entries loaded in Google Sheets
The URL passed in the
IMPORTDATA()function will load the latest 1000 entries as we passed the parameter
To get more entries (if any) we need to add more
IMPORTDATA() calls and tweak the URL to get a different page ie. 2, 3, 4 and so on.
One way to do that would be to create another sheet on the same file and repeat the procedure above, this time using a parameter
page=2in the URL.
Loading entries in separate sheets
Another option is to load the first 1000 entries and the headers on the first cell, then on row 1002 load the next 1000 entries omitting the headers in the request by passing the parameter
headers=false.This way 2000 entries will be loaded on the same sheet.
Loading entries in the same sheet