Google Sheets
Your datasets in Google Sheets
Four formulas read your own datasets with your my_ key. The script runs in your sheet only and keeps the key in the script's properties, never in a cell.
Set it up once
- In your sheet: Extensions > Apps Script. Paste the script (below) over what is there, and save.
- Reload the sheet. A menu EJI API appears. Choose My Data > Set API key and paste a key from your data page.
- Try
=EJI_MY_DATASETS()in any cell.
Open the script (My Data only)
Already use EJI API formulas for funds, Tally or medicines? Open the Sheets Lab of that family (Finance, Accounting, Medical), tick My Data under "Areas in this sheet", and copy the one script that has both. A sheet needs only one EJI script.
Formulas
| Formula | What it gives |
|---|---|
=EJI_MY_DATA("clients", "city=Jaipur") | The header and the matching rows, filling the cells below and to the right. Optional third and fourth arguments: the columns ("client_name,city") and how many rows (up to 1,000; 500 if left out). |
=EJI_MY_VALUE("clients", A2, "city") | One value from the row whose key column equals A2. Give a range (A2:A50) for a column of answers. Set the key column on the dataset's Settings tab. |
=EJI_MY_COUNT("clients", "amount__gte=10000") | How many rows match. |
=EJI_MY_DATASETS() | The datasets your key can read: name, title, rows, updated. |
Filters
Written like the API: column=value, and several joined with &. Use the API names shown on the dataset's Columns tab.
city=Jaipurequal (text ignores capitals)amount__gte=1000,__lte,__gt,__lt,__nename__contains=sharma,__startswithcity__in=Jaipur,Ajmerany ofq=sharma jaipursearch every text column
Answers are kept for 10 minutes, so a sheet does not use your calls on every recalculation. EJI API > Refresh values fetches fresh rows. Masked columns come back masked.