Sheets Lab

Indian fund and market data in your Google Sheet

Pick what you want to do. You get one script; paste it once into your sheet.

What do you want to do?
  1. Try formulas on live data

    Load an example

    Type = to start. SUM, ROUND, IF and XIRR work too. Scheme codes: fund explorer.

  2. Add your purchases

      Import from CSV or paste from a sheet

      One purchase per line: schemeCode,date,units,amount (amount optional, comma, tab or semicolon). Dates as 2026-04-15 or 15-04-2026. Negative units are a sale.

      Big portfolio? Use My key; the demo is rate limited. Not investment advice.

    • Ask CAMS or KFintech for your statement

      1. Open CAMS (covers both) or KFintech.
      2. Pick Detailed, period from 01-Jan-1990, and your folio email.
      3. Password: (keep it)
      4. Submit. The PDF arrives by email in minutes.
    • Bring it into your sheet

      Easiest

      From your Gmail

      Your sheet finds the CAS in your Gmail and builds the workbook. Can repeat monthly.

      New sheet
      1. Extensions → Apps Script, paste, Save, reload.
      2. EJI API → Set API key.
      3. EJI API → Import my CAS from Gmail, type the PDF password.
      Or

      Upload the PDF here

      Then pick the tabs in the next step.

      Needs your own key (My key above). The PDF is read in memory, not stored. Values, not advice.

    • Add any API data optional

      Pick fields from any answer; get a ready table of formulas.Want more about your funds, such as returns or exit load? Your scheme codes are filled in.Want more about the funds in your statement? Their scheme codes are filled in once it is read.

      API path

    • Copy your script

      One script: every formulayour portfolio, every formula and an EJI API menu.

      Already have a sheet? Copy cells
    • Paste it into your sheet

      Extensions → Apps Script
      Replace the code, Save
      Reload the sheet

      Google then asks you to allow the script. Because it is your own copy, it shows Google hasn’t verified this app: click Advanced → Go to … (unsafe) → Allow. The script reads only this sheet and talks only to ejiapi.com.

    • Set your key, then builduse it

        Then EJI API → Finance → Build my portfolio sheet. Type =EJI_ in any cell and Google lists every formula with its help, or use EJI API → Insert formula… for examples and a field picker.

        Something not working?

        "Google hasn't verified this app": it is your own script. Click Advanced → Go to … (unsafe) → Allow.

        #ERROR! in a cell: hover to read why, then EJI API → Finance → Check setup and Refresh values. Ranges such as =EJI_MF_NAV(A2:A20) and =EJI_… need a script copied on or after 21 Nov 2026.

      One sheet, one script. To change it, paste the new script over the old one.

      All formulas

      Your grid, portfolio and statement stay in this browser; the API only sees codes, symbols and dates.

      Demo mode needs no key, but it is shared and rate limited, so use your own key for real work and in your sheet. Get a key · Pricing · Accounting has its own formulas at acc.ejiapi.com/sheets.