How to Import Zerodha Sales and Trade Statements to Tally Prime
How to Import Zerodha Sales and Trade Statements to Tally Prime
Save hundreds of hours during tax audit season by automating the formatting and import of Zerodha ledger statements and stock trade records into Tally Prime.
Who is this for: Stock Audits
During the tax audit season in India, Chartered Accountants and tax consultants face a massive logistical bottleneck: importing and auditing retail stock market trade records.
With millions of active retail traders on discount brokerages like Zerodha, audit firms are regularly handed spreadsheets containing thousands of stock purchases, sales, and F&O contract transactions. Manually keying these ledger rows into Tally Prime is practically impossible. This guide shows you how to structure Zerodha sheets and import them smoothly.
Step 1: Download the Correct Reports from Zerodha Console
Before formatting data, you must extract the proper ledger reports from Zerodha's backend:
- Log in to the **Zerodha Console** (console.zerodha.com).
- Go to **Reports** > **Tax P&L**. Select the desired financial year and click "Apply".
- Download the **PDF format** sheet. This sheet contains separate tabs for Equity, Mutual Funds, and F&O.
- Go to **Funds** > **Ledger** to download the actual cash ledger showing fund deposits, withdrawals, and DP charges.
Step 2: Ledger Setup in Tally Prime
To record Zerodha stock trades, you need to create specific ledgers in Tally:
| Ledger Name | Under Group | Purpose |
|---|---|---|
| Zerodha Brokerage A/c | Sundry Debtors / Bankers | To route all deposits and trade settlements |
| Short Term Capital Gains (STCG) | Direct / Indirect Incomes | To record profits from equity held < 12 months |
| Long Term Capital Gains (LTCG) | Direct / Indirect Incomes | To record profits from equity held > 12 months |
| F&O Trading Profit/Loss | Direct Incomes / Expenses | F&O trades are treated as business income |
Step 3: Map and Generate XML for Tally
Tally Prime allows you to import transactions via XML formats. To convert your Zerodha Excel sheet into Tally-compliant XML:
- Clean the Excel sheet: Remove headers, summary rows, and keep only the transactional columns (Trade Date, Symbol, Quantity, Buy Price, Sell Price, Brokerage, Net P&L).
- Write XML mapping rules: Define the XML schema for Tally vouchers, matching the transaction date to
<DATE>, principal to<AMOUNT>, and brokerages to expense tags. - Import in Tally: Go to Gateway of Tally > Import > Transactions. Select your generated XML file and hit Enter.
Automate Bank Bookkeeping with TrulyInvoice
While broker-specific sheets must be formatted manually, you can automate your capital gains bank transactions. TrulyInvoice reads your HDFC, SBI, or ICICI bank statements directly and syncs your deposit/withdrawal entries to Tally Prime in minutes, saving hours of manual data matching.
Chartered Accountant & Accounting Automation Specialist