Import Ledger Masters with Contact Details and Address
Published
This exercise teaches you how to import Ledger masters together with their
contact details and address from Excel into Tally Prime.
The exercise uses the LEDMAILINGDETAILS.LIST tag to fill the mailing details as required
for TallyPrime 3.0 and higher versions.
Step 1 — Prepare the Excel sheet
Create an Excel sheet with one row per ledger. Column A (Sr No) is for reference only. Leave the contact and address cells blank for ledgers that do not need them, such as Cash or an expense ledger.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Srno | Ledger Name | Alias | Under Group | Contact Person | Address Line 1 | Address Line 2 | Address Line 3 | City | Pincode | State | Country | Phone | Mobile | Website | |
| 2 | 1 | Unitech Solutions | UNI001 | Sundry Debtors | Kuldeep Singh | 12 Tech Park | Sector 62 | Noida | 201301 | Uttar Pradesh | India | 0120-4567890 | 9810000001 | [email protected] | www.unitech.in | |
| 3 | 2 | Sharma Traders | SHA001 | Sundry Debtors | Rajesh Sharma | 45 Gandhi Road | iffco | New Delhi | 110005 | Delhi | India | 011-25761234 | 9810000002 | [email protected] | ||
| 4 | 3 | Mehta Enterprises | MEH001 | Sundry Debtors | Amit Mehta | 7 Ring Road | Navrangpura | Ahmedabad | 380009 | Gujarat | India | 079-26301234 | 9825000003 | [email protected] | ||
| 5 | 4 | Patel Retail | PAT001 | Sundry Debtors | Hiren Patel | 22 MG Road | Adajan | Surat | 395009 | Gujarat | India | 0261-2781234 | 9898000004 | [email protected] | ||
| 6 | 5 | Global Supplies Pvt Ltd | GSP001 | Sundry Creditors | Neha Verma | 101 Industrial Area | Phase 2 | Chandigarh | 160002 | Chandigarh | India | 0172-2651234 | 9815000005 | [email protected] | www.globalsupplies.in | |
| 7 | 6 | Kumar Wholesale | KUM001 | Sundry Creditors | Sunil Kumar | 9 Market Yard | Gultekdi | Pune | 411037 | Maharashtra | India | 020-24261234 | 9822000006 | [email protected] | ||
| 8 | 7 | Rao Electronics | RAO001 | Sundry Creditors | Venkat Rao | 5 Brigade Road | Ashok Nagar | Bengaluru | 560025 | Karnataka | India | 080-25591234 | 9845000007 | [email protected] | ||
| 9 | 8 | HDFC Bank - Current A/c | HDFC | Bank Accounts | Branch Manager | Sector 18 Branch | Noida | 201301 | Uttar Pradesh | India | 0120-4001234 | [email protected] | www.hdfcbank.com | |||
| 10 | 9 | Cash | Cash-in-Hand | India | ||||||||||||
| 11 | 10 | Office Rent | RENT | Indirect Expenses | India |
Step 2 — Write the XML tags in a separate file
Open Notepad (or any plain-text editor) and write the following XML tags:
<!--
PURPOSE
Create Ledger Masters with contact details and address
CSV columns (first row is the header, CELLREFERENCE A1):
A = srno (reference only) B = Ledger Name C = Alias
D = Under Group E = Contact Person F = Address Line 1
G = Address Line 2 H = Address Line 3 I = City
J = Pincode K = State L = Country
M = Phone N = Mobile O = Email
P = Website
-->
<XMLTAGS CELLREFERENCE="A1" xmlns:UDF="TallyUDF">
<MASTER TYPE="LEDGER">
<!-- Ledger name (column B) and alias (column C). -->
<NAME.LIST>
<NAME COLUMNREFERENCE="B"/>
<NAME COLUMNREFERENCE="C"/>
</NAME.LIST>
<PARENT COLUMNREFERENCE="D"/>
<!-- REMARK: Bill-by-bill is switched on only for party ledgers. -->
<ISBILLWISEON FORMULA="=If(Or(Trim(D#)="Sundry Debtors",Trim(D#)="Sundry Creditors"),"Yes","No")"/>
<AFFECTSSTOCK>No</AFFECTSSTOCK>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<!-- Contact details; each tag is skipped when its column is blank. -->
<LEDGERCONTACT COLUMNREFERENCE="E"/>
<LEDGERPHONE COLUMNREFERENCE="M"/>
<LEDGERMOBILE COLUMNREFERENCE="N"/>
<EMAIL COLUMNREFERENCE="O"/>
<WEBSITE COLUMNREFERENCE="P"/>
<!-- REMARK: Tally has no separate City field, so City (column I) is kept as the last address line. -->
<ADDRESS.LIST>
<ADDRESS COLUMNREFERENCE="F"/>
<ADDRESS COLUMNREFERENCE="G"/>
<ADDRESS COLUMNREFERENCE="H"/>
<ADDRESS COLUMNREFERENCE="I"/>
</ADDRESS.LIST>
<PINCODE COLUMNREFERENCE="J"/>
<COUNTRYNAME FORMULA="=If(Len(Trim(L#))=0,"India",Trim(L#))"/>
<LEDSTATENAME FORMULA="=Proper(Trim(K#))"/>
<!-- Required for Tally Prime 3.0 and above: mailing details (printed name, address, state, country, pincode) -->
<LEDMAILINGDETAILS.LIST>
<APPLICABLEFROM>20260401</APPLICABLEFROM>
<MAILINGNAME COLUMNREFERENCE="B"/>
<ADDRESS.LIST>
<ADDRESS COLUMNREFERENCE="F"/>
<ADDRESS COLUMNREFERENCE="G"/>
<ADDRESS COLUMNREFERENCE="H"/>
<ADDRESS COLUMNREFERENCE="I"/>
</ADDRESS.LIST>
<PINCODE COLUMNREFERENCE="J"/>
<STATE FORMULA="=Proper(Trim(K#))"/>
<COUNTRY FORMULA="=If(Len(Trim(L#))=0,"India",Trim(L#))"/>
</LEDMAILINGDETAILS.LIST>
</MASTER>
</XMLTAGS>
Step 3 — Save the file
Save it as ledger-master-with-contact-details-and-address-xml-tags.xml. In the
Save as type box, choose All Files — otherwise Notepad appends
.txt and you'll end up with
ledger-master-with-contact-details-and-address-xml-tags.xml.txt instead.
Import into Tally
- Start Tally Prime and open the company you want to import into.
- Minimize Tally (leave it running).
- Start udiMagic and select
Excel to Tally. - Select option
Import data into Tally. - Browse to select both the Excel sheet and the XML tags file — you're prompted for the XML file on the same screen as the Excel sheet.
- Follow the wizard to complete the import.
- Every value is read from the sheet through
COLUMNREFERENCEorFORMULA. Only fixed Tally flags are typed in the XML file. - Bill-by-bill (
ISBILLWISEON) is switched on only when the Under Group (Column D) is Sundry Debtors or Sundry Creditors. - Tally has no separate City field, so City (Column I) is added as the last address line.
- The country (Column L) defaults to India when blank, and
Proper()tidies the State (Column K). LEDMAILINGDETAILS.LISTis a TallyPrime 3.0+ tag. It fills the printed name, address, state, country and pincode shown in Tally.
Ready to import your Excel data into Tally?
Download udiMagic and start a 14-day free trial — no credit card required.
Download udiMagic View Pricing