Exercise 2
Import Data into Multiple Companies
Published
udiMagic can import the same Excel sheet into more than one Tally Prime
company at the same time. This exercise imports Stock Group and Stock
Item masters into two companies — "Company A" and "Company B" — from a
single Excel sheet, using the COMPANYNAME attribute.
Steps to import
- Create a company named Company A in Tally Prime.
- Create a second company named Company B in Tally Prime.
- Make sure both companies are open in Tally, then minimize it.
- Start udiMagic and select
Excel to Tally. - Select option
Masters. - Select the Excel sheet and its 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 into both companies.
Understanding the XML tags
These build on the same Stock Group / Stock Item master tags used
elsewhere in the XML Exercises series
— the only addition here is the COMPANYNAME attribute.
Step 1 — Create STOCKGROUP masters in both companies
<!-- Create the Stock Group in Company A -->
<MASTER TYPE="STOCKGROUP" COMPANYNAME="Company A">
<NAME.LIST>
<!-- Fetch the Stock Group name from Column B -->
<NAME COLUMNREFERENCE="B"/>
</NAME.LIST>
</MASTER>
<!-- Create the same Stock Group in Company B -->
<MASTER TYPE="STOCKGROUP" COMPANYNAME="Company B">
<NAME.LIST>
<NAME COLUMNREFERENCE="B"/>
</NAME.LIST>
</MASTER>
Step 2 — Create STOCKITEM masters in both companies
<!-- Create the Stock Item in Company A -->
<MASTER TYPE="STOCKITEM" COMPANYNAME="Company A">
<NAME.LIST>
<!-- Fetch the Stock Item name from Column A -->
<NAME COLUMNREFERENCE="A"/>
</NAME.LIST>
<!-- The Stock Group (Parent) name comes from Column B -->
<PARENT COLUMNREFERENCE="B"/>
</MASTER>
<!-- Create the same Stock Item in Company B -->
<MASTER TYPE="STOCKITEM" COMPANYNAME="Company B">
<NAME.LIST>
<NAME COLUMNREFERENCE="A"/>
</NAME.LIST>
<PARENT COLUMNREFERENCE="B"/>
</MASTER>
Remarks:
- The
COMPANYNAMEattribute tells udiMagic which open Tally company the tag's data should go into. - The two blocks above use identical tags — only
COMPANYNAMEchanges.
Important: Multi-company import requires all target companies to be
open in Tally Prime before you start the udiMagic import — and a udiMagic
license/edition that supports multi-company imports. Contact
udiMagic support if you're unsure whether your edition includes this.
Sample files:
The sample Excel sheet and matching XML tags file for this
exercise will be linked here shortly.
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