Sheets Lab · Accounting

Your Tally books in your Google Sheet

Balances, statements, sales, outstanding bills and stock from TallyPrime, as formulas. Every formula starts with EJI_TALLY_; they read your books as of the last sync, so they work while the Tally PC is off.

  1. Get your key

    Get beta access (join here) and connect a company with the sync agent. Your key starts with acc_; for Sheets, ask for a key limited to one company.

  2. Copy your script

    Using more than one area in the same sheet? Tick it: one script carries every area you tick, with one EJI API menu.

  3. 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.

  4. Set your key, then type =EJI_

      Type =EJI_ in any cell and Google lists every formula with its help. Or use EJI API → Insert formula…: every formula with an example, and Pick fields to build a table from a ledger's details.

      Something not working?
      “Set your key first”
      use EJI API › Accounting › Set API key.
      “The API key was not accepted”
      copy the whole key again; it starts with acc_.
      “This key can read several companies”
      add the company name as the last argument, or set a default company.
      “No ledger named …”
      the name must match Tally exactly (case does not matter). =EJI_TALLY_LEDGERS() lists them.
      Old figures
      check =EJI_TALLY_LAST_SYNC(). If it is old, open Tally on the agent's PC; then use Refresh values.
      Permission errors
      run EJI API › Accounting › Check setup once from the menu so Google can ask for permission.

    One sheet, one script. To change it, paste the new script over the old one. Sheets made with the old names (TALLY_…) keep working.

    How the formulas behave
    AmountsA debit balance is positive, a credit balance negative (Sales shows as -4,82,300). EJI_TALLY_SALES and the outstanding formulas give positive figures. Use EJI_TALLY_BALANCE_TEXT for “12,500.00 Dr”.
    CompanyThe last argument of every formula is an optional company name. Leave it out when your key reads one company, or set a default with EJI Tally › Set default company.
    DatesA date cell, or text like 2026-03-31 or 31-03-2026. Left out, the date is today.
    Whole columns=EJI_TALLY_BALANCE(A2:A300) fetches every balance in one request, much faster than one formula per row.
    FreshnessAnswers are kept for 15 minutes. EJI Tally › Refresh values fetches fresh ones at once. =EJI_TALLY_LAST_SYNC() shows when the books were last uploaded.

    All formulas

    Tally and TallyPrime are trademarks of Tally Solutions Pvt. Ltd. EJI API is an independent product and is not affiliated with or endorsed by Tally Solutions.

    Worked example: Tally outstanding receivables in Google Sheets, with an ageing table.