Bank statements

Tally XML for bank vouchers: the format, a working example and the usual errors

Tally XML is the format every version of TallyPrime, and Tally.ERP 9 before it, accepts for importing vouchers. You rarely need to write it by hand, but knowing how it's put together makes import errors quick to fix. Here's the structure, a voucher you can read line by line, and the rule that trips most people up: the sign of the amount.

By FileKey TeamPublished 7 November 20265 min read

<VOUCHER VCHTYPE="Payment" ACTION="Create">
 <DATE>20261002</DATE>
 <NARRATION>Office rent</NARRATION>
 <ALLLEDGERENTRIES.LIST>
  <LEDGERNAME>Office Rent</LEDGERNAME>
  <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
  <AMOUNT>-25000.00</AMOUNT>
 </ALLLEDGERENTRIES.LIST>
 <ALLLEDGERENTRIES.LIST>
  <LEDGERNAME>HDFC Bank - 0423</LEDGERNAME>
  <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
  <AMOUNT>25000.00</AMOUNT>
 </ALLLEDGERENTRIES.LIST>
</VOUCHER>
An envelope with a voucher card sliding out showing a debit of minus 25,000 and a credit of plus 25,000, surrounded by XML tagsVOUCHER · PAYMENTOffice Rent−25,000Bank+25,000= 0total<ENVELOPE><VOUCHER><LEDGERNAME><AMOUNT>debit = minus
Tally XML literally travels in an ENVELOPE: one VOUCHER per bank entry, debits negative, credits positive.

The short answer

  1. A Tally XML import is an ENVELOPE with an Import Data request, and one VOUCHER per bank entry inside TALLYMESSAGE.
  2. Each voucher has a date (YYYYMMDD), a voucher type, a narration and two or more ledger entries.
  3. Debit lines carry a negative amount and ISDEEMEDPOSITIVE Yes; credit lines a positive amount and No. The amounts in a voucher add up to zero.
  4. Every ledger name must already exist in the company, spelled exactly the same, or the voucher is rejected.
On this page
  1. The structure, outside in
  2. Inside a voucher
  3. The sign rule
  4. Errors you'll meet, and the fixes
  5. Good habits with XML imports
  6. Generating the XML from a statement
  7. Frequently asked questions

When you import bank entries into Tally with Alt+O › Transactions (see importing a bank statement into TallyPrime), the file is almost always XML. Converters, Excel add-ins and other software all produce the same basic structure, because it's what Tally reads, in TallyPrime and Tally.ERP 9 alike (see how the two versions differ).

The structure, outside in

TagWhat it does
ENVELOPEWraps the whole request
HEADER › TALLYREQUESTImport Data: tells Tally this is an import
IMPORTDATA › REQUESTDESC › REPORTNAMEVouchers: what is being imported
STATICVARIABLES › SVCURRENTCOMPANYOptional: the company to import into. Leave it out to import into the company that's open
REQUESTDATA › TALLYMESSAGEHolds the vouchers, one VOUCHER element each

Here's a complete file with one Payment voucher, a rent payment from the bank:

<ENVELOPE>
 <HEADER>
  <TALLYREQUEST>Import Data</TALLYREQUEST>
 </HEADER>
 <BODY>
  <IMPORTDATA>
   <REQUESTDESC>
    <REPORTNAME>Vouchers</REPORTNAME>
   </REQUESTDESC>
   <REQUESTDATA>
    <TALLYMESSAGE xmlns:UDF="TallyUDF">
     <VOUCHER VCHTYPE="Payment" ACTION="Create">
      <DATE>20261002</DATE>
      <VOUCHERTYPENAME>Payment</VOUCHERTYPENAME>
      <NARRATION>Office rent for October</NARRATION>
      <ALLLEDGERENTRIES.LIST>
       <LEDGERNAME>Office Rent</LEDGERNAME>
       <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
       <AMOUNT>-25000.00</AMOUNT>
      </ALLLEDGERENTRIES.LIST>
      <ALLLEDGERENTRIES.LIST>
       <LEDGERNAME>HDFC Bank - 0423</LEDGERNAME>
       <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
       <AMOUNT>25000.00</AMOUNT>
      </ALLLEDGERENTRIES.LIST>
     </VOUCHER>
    </TALLYMESSAGE>
   </REQUESTDATA>
  </IMPORTDATA>
 </BODY>
</ENVELOPE>

Inside a voucher

FieldMeaningWatch out for
VCHTYPE and VOUCHERTYPENAMEPayment, Receipt, Contra or Journal (or a custom voucher type you created)Must match a voucher type in the company
ACTION="Create"Create a new voucherImporting the same file again creates duplicates
DATEVoucher date as YYYYMMDDMust fall inside the company's books period
NARRATIONFree text, usually the bank narrationEscape &, < and >
ALLLEDGERENTRIES.LISTOne block per ledger lineAt least two per voucher
LEDGERNAMELedger to post toExact spelling, existing ledger
ISDEEMEDPOSITIVE and AMOUNTDebit or credit, and how muchSee the sign rule below

The sign rule

Tally stores debits as negative amounts. In each ledger line, a debit has a negative AMOUNT with ISDEEMEDPOSITIVE set to Yes, and a credit has a positive amount with No. All the amounts in one voucher add up to zero.

VoucherDebit line (negative, Yes)Credit line (positive, No)
Payment: rent paidOffice Rent −25,000Bank +25,000
Receipt: customer paidBank −62,300Customer +62,300
Contra: cash withdrawnCash −10,000Bank +10,000
Payment: EMILoan −18,200 and Interest on Loan −6,800Bank +25,000

The same rule applied to a customer receipt:

<VOUCHER VCHTYPE="Receipt" ACTION="Create">
 <DATE>20261004</DATE>
 <VOUCHERTYPENAME>Receipt</VOUCHERTYPENAME>
 <NARRATION>Payment against invoice 118</NARRATION>
 <ALLLEDGERENTRIES.LIST>
  <LEDGERNAME>HDFC Bank - 0423</LEDGERNAME>
  <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
  <AMOUNT>-62300.00</AMOUNT>
 </ALLLEDGERENTRIES.LIST>
 <ALLLEDGERENTRIES.LIST>
  <LEDGERNAME>Sharma Traders</LEDGERNAME>
  <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
  <AMOUNT>62300.00</AMOUNT>
 </ALLLEDGERENTRIES.LIST>
</VOUCHER>

Errors you'll meet, and the fixes

SymptomCauseFix
Ledger does not existA LEDGERNAME isn't in the company, or is spelled differentlyCreate the ledger or correct the name; import masters first if you have many
Voucher type does not existVOUCHERTYPENAME doesn't match the companyUse the exact voucher type name
Nothing importedDates outside the books period, or the wrong company openOpen the right company; check the financial year
Import stops at a characterAn unescaped & in a narration or ledger nameWrite &amp; for &
Debits and credits reversedSign or ISDEEMEDPOSITIVE flippedFix the sign rule in the file
Everything doubledThe same file imported twiceRestore the backup taken before the second import

Tally lists failed vouchers in its import summary and writes details to its import log, Tally.imp in the Tally folder. Read it before re-importing. Tally's own pages on importing vouchers and XML integration go further.

Good habits with XML imports

  1. Back up the company before every import.
  2. Import into a test company first when the generator, the client or the Tally version is new.
  3. One file per client per period, named so you can tell which periods are done.
  4. Check the bank ledger's closing balance against the statement straight after import, then reconcile.

Generating the XML from a statement

Writing XML by hand only makes sense for a handful of entries. FileKey builds it from the statement PDF: every row is checked against the running balance, carries the ledger and voucher type you set (Payment & Receipt, or Contra), and uses your bank ledger name. The company name is only added if you choose one, so by default the file imports into whichever company is open. See the bank statement to Tally converter and how to map transactions to ledgers.

Frequently asked questions

What format does Tally use to import bank vouchers?

XML: an ENVELOPE with an Import Data request, and one VOUCHER per entry inside TALLYMESSAGE. Newer TallyPrime releases also import from Excel and JSON, but XML works in every version.

Why is the amount negative in Tally XML?

Tally stores debits as negative amounts. A debit line has a negative AMOUNT with ISDEEMEDPOSITIVE Yes; a credit line has a positive AMOUNT with No.

Do I need SVCURRENTCOMPANY in the XML?

Only to force the import into a named company. Without it, the vouchers go into the company that's open, which is usually what you want.

How do I import the XML file into TallyPrime?

Open the company, press Alt+O (Import), choose Transactions and select the file. Back up first, and import each file only once.

Sources and further reading

Rules change by notification and advisory. Check the GST portal before you file.

Written by the FileKey Team

FileKey builds the tools CA firms use for e-commerce GSTR-1 and bank statement conversion. We write these guides from the questions accountants and sellers ask us every filing month. Spotted something out of date? Write to [email protected] and we will fix it. More about FileKey.

Skip writing XML

Upload the statement PDF and download Tally XML with checked rows, your ledgers and the right signs.

Generate Tally XML free