Tally in Google Sheets
22 formulas that read your TallyPrime books into any Google Sheet. They read the copy synced by the agent, so they work from any device and while the Tally PC is switched off.
Five-minute setup
- Get your beta access (join here) and connect a company with the sync agent. For Sheets, ask for a key limited to one company.
- Open the script: acc.ejiapi.com/tally/eji-tally.gs. Select all (Ctrl+A) and copy.
- In your Google Sheet: Extensions › Apps Script. Delete what is there, paste, and press Save.
- Reload the sheet. A menu EJI Tally appears. Choose Set API key and paste your
acc_ key. Google asks once for permission to reach the internet; allow it.
- Type
=TALLY_BALANCE("Cash") in any cell.
Your key is stored in the script's properties, never in a cell. Anyone who can edit the sheet can still open the script and read it, so share the sheet only with people who may see these books, and use a key limited to one company.
How the formulas behave
- Amounts: a debit balance is positive, a credit balance negative (Sales shows as
-4,82,300). TALLY_SALES and the outstanding formulas give positive figures. Use TALLY_BALANCE_TEXT for “12,500.00 Dr”.
- Company: the 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.
- Dates: a date cell, or text like
2026-03-31 or 31-03-2026. Left out, the date is today.
- Whole columns:
=TALLY_BALANCE(A2:A300) fetches every balance in one request, much faster than one formula per row.
- Freshness: answers are kept for 15 minutes. EJI Tally › Refresh values fetches fresh ones at once.
=TALLY_LAST_SYNC() shows when the books were last uploaded.
- Tables (statement, trial balance, day book, bills) spill down and right from the formula's cell, so leave room below it.
Ledgers and balances
| Formula | Gives |
=TALLY_BALANCE(ledger, [date]) | Balance on a date. ledger can be a range: one request for the whole column. |
=TALLY_BALANCE_TEXT(ledger, [date]) | The same as text: 12,500.00 Dr. |
=TALLY_OPENING(ledger) | Opening balance as entered in Tally. |
=TALLY_LEDGER_INFO(ledger, field) | One detail: "gstin", "group", "primaryGroup", "state", "pan", "creditDays", "mailingName", "nature". |
=TALLY_LEDGERS([group], [date]) | Table: ledger, group, balance, Dr/Cr, GSTIN, state. =TALLY_LEDGERS("Sundry Debtors") lists every debtor. |
=TALLY_STATEMENT(ledger, from, to) | Table: every entry with type, number, other side, narration, debit, credit and running balance, between an opening and a closing line. |
Reports
| Formula | Gives |
=TALLY_TRIAL_BALANCE([date], [level]) | Table: particulars, group, debit, credit and a total line. level "group" for primary groups only. |
=TALLY_SALES(from, to) | Sales of the period (Sales Accounts), as a positive number. |
=TALLY_PURCHASES(from, to) | Purchases of the period (Purchase Accounts). |
=TALLY_GROUP_TOTAL(group, from, to) | Net movement of every ledger under a group in the period, for example "Indirect Expenses". |
=TALLY_GROUP_BALANCE(group, [date]) | Balance of a whole group on a date, for example "Bank Accounts". |
=TALLY_DAYBOOK(from, to, [type]) | Table: date, type, number, party, amount, narration. type such as "Sales" or "Receipt". Up to 5,000 vouchers. |
Receivables and payables
| Formula | Gives |
=TALLY_OUTSTANDING(party, [date]) | What a debtor owes you, or what you owe a creditor, from open bills. A range of up to 50 parties works too. |
=TALLY_RECEIVABLES([date]) | Total receivable from Sundry Debtors. |
=TALLY_PAYABLES([date]) | Total payable to Sundry Creditors. |
=TALLY_RECEIVABLES_BY_PARTY([date]) | Table: every party and what it owes, largest first. |
=TALLY_BILLS([side], [party], [date]) | Table: party, bill, bill date, due date, days overdue, amount. side "receivable" (default) or "payable". |
Stock
| Formula | Gives |
=TALLY_STOCK(item) | Closing quantity at the last sync. A range of items works. |
=TALLY_STOCK_ITEMS() | Table: item, group, unit, closing quantity, HSN. |
=TALLY_STOCK_MOVEMENT(item, what, from, to) | Quantity in or out ("in", "out") or its value ("in value", "out value") in the period. |
Companies and sync
| Formula | Gives |
=TALLY_COMPANIES() | Table: id, company, last sync. |
=TALLY_LAST_SYNC() | When this company's books were last uploaded from the Tally PC. |
When something is wrong
- “Set your key first”: use EJI Tally › 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).
=TALLY_LEDGERS() lists them.
- Old figures: check
=TALLY_LAST_SYNC(). If it is old, open Tally on the agent's PC; then use Refresh values.
- Permission errors: run EJI Tally › Check setup once from the menu so Google can ask for permission.
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.