Back to Blog|Stock Audits

How to Import Zerodha Sales and Trade Statements to Tally Prime

June 25, 20266 min readCA Rakesh Sharma

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 NameUnder GroupPurpose
Zerodha Brokerage A/cSundry Debtors / BankersTo route all deposits and trade settlements
Short Term Capital Gains (STCG)Direct / Indirect IncomesTo record profits from equity held < 12 months
Long Term Capital Gains (LTCG)Direct / Indirect IncomesTo record profits from equity held > 12 months
F&O Trading Profit/LossDirect Incomes / ExpensesF&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:

  1. 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).
  2. 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.
  3. 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.

💡 Compliance Note: Remember that F&O trading is classified as Non-Speculative Business Income. Make sure to claim associated expenses like brokerage, internet charges, and advisory fees to optimize your tax liabilities.
C
CA Rakesh SharmaExpert Reviewer

Chartered Accountant & Accounting Automation Specialist

Last Verified: June 25, 2026
TallyPrime FY 2026-27 (v4.0+)
Ready to save time?

Stop Manual Voucher Entry.

TrulyInvoice automates your complete invoice workflow and syncs directly to Tally Prime.

No credit card · 14-day free trial

01

Upload Invoice

Drag & drop PDFs, scans, or photos.

02

AI Extraction

Line items, tax, and ledgers mapped.

03

1-Click Review

Verify extracted details on dashboard.

04

Direct Sync

Vouchers created instantly in Tally Prime.

Chat with us