Tally XML Export Request Generator
Tally Prime can answer XML requests on a local HTTP port, which is how most Tally-to-Excel, Tally-to-CRM and dashboard connectors work. This generator builds a valid export envelope so you do not have to write the XML from memory.
Fill in
Request body (POST to http://localhost:9000)
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>List of Accounts</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Sharma Engineering Works</SVCURRENTCOMPANY>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<ACCOUNTTYPE>Ledgers</ACCOUNTTYPE>
<SVFROMDATE>20250401</SVFROMDATE>
<SVTODATE>20260331</SVTODATE>
</STATICVARIABLES>
</DESC>
</BODY>
</ENVELOPE>Example call from PowerShell
$xml = Get-Content .\request.xml -Raw Invoke-RestMethod -Uri "http://localhost:9000" -Method Post -Body $xml -ContentType "text/xml"
Enable the ODBC/HTTP server in Tally (F1 Help > Settings > Connectivity, or the Client/Server configuration) and keep the company open. Report ids and variables vary by Tally release, so test on a copy of the data first.
Tally data into a dashboard
Optional expert review on pulling Tally data into a read-only reporting layer.
Optional. The tool and every export work without this. No spam.
How to use it
Pick the report, type the company name exactly as it appears in Tally, and set the date range. Copy the XML into a file, then POST it to the Tally server address, usually localhost on port 9000. The reply is XML that you can parse with Python, Power Query or any integration platform. Keep the company open in Tally while the call runs.
What the envelope means
The HEADER tells Tally you want to Export Data and names the report in ID. STATICVARIABLES set the current company, the output format and filters such as the period. The ACCOUNTTYPE variable is used with List of Accounts to choose between ledgers, groups, stock items and godowns. More complex outputs use a custom TDL report or collection instead of a built-in report id.
- Use dates as YYYYMMDD in static variables.
- Company name must match exactly, including spaces.
- Larger exports are easier by month than by full year.
Security and limits
The Tally HTTP server has no authentication of its own. Bind it to localhost or a protected network, and never expose port 9000 to the internet. For read-only analytics, extract data on a schedule into a separate database and query that instead of hitting Tally during working hours.
Common mistakes
Typical failures are a wrong company name, a closed company, special characters in names that break XML, and requests so broad that Tally freezes. Escape ampersands as & in any value you insert.
Frequently Asked Questions
Which port does Tally use for XML?
The default HTTP port is 9000, and it can be changed in the Tally connectivity settings. If another program uses 9000 you will need to pick a different port in both Tally and your caller.
Does this work with Tally ERP 9 as well?
The XML request format is largely the same for Tally ERP 9 and Tally Prime, but report ids and variables can differ between releases. Test with a copy of your data.
Can I write data back to Tally with this?
Export requests only read data. Importing uses a separate Import Data request, and any write should be tested on a copy and reviewed by an accountant first.
Why does Tally return an empty reply?
Usually the company is not loaded, the name does not match, or the date range holds no data. Check the Tally window for error text and re-run the request with a short date range.
If you want natural language questions answered from Tally and other ERP data, with read-only access and an on-prem option, Netray can scope that with you.
Related Tools
Tally XML Ledger Import Generator
Build the Import Data XML that creates a customer or supplier ledger in Tally Prime with GST details.
Developer ToolsGSTIN Validator Code Generator
Get a Python function that checks GSTIN structure, state code and the mod 36 checksum character before you save a party.
Country & TaxIndia GST State Codes Reference
Two-digit GST state codes for every state and union territory, to check GSTINs and set place of supply in your ERP.
More Developer Tools tools
See all- Tally TDL Report Template Generator
- SAP Sales Order ABAP SELECT Generator (VBAK, VBAP, VBFA)
- SAP Sales Order Create BAPI ABAP Generator (BAPI_SALESORDER_CREATEFROMDAT2)
- SAP ABAP Open Items SELECT Generator
- SAP ACDOCA SQL Query Generator
- SAP QM Inspection Lot ABAP SELECT Generator
- SAP Quality Notification Pareto SQL Query Generator
- SAP QM Usage Decision BAPI Skeleton
- ABAP Custom Exception Class Generator