I have been uploading xml to Tally.ERP 9 via Excel VBA. I want to know if it's possible to upload xml to multiple tally companies at once or Not?
Here is the post method I am using for single company
xmlhttp.Open "post", "http://localhost:9000", False
xmlhttp.setRequestHeader "Content-Type", "application/xml"
xmlhttp.setRequestHeader "Content-Length", "356"
xmlhttp.setRequestHeader "Accept", "text/xml"
xmlhttp.setRequestHeader "Host", "localhost:" & UserForm1.txtPort & """"
xmlhttp.setRequestHeader "Cache-Control", "no-cache"
xmlhttp.send myXMLstr
MsgBox xmlhttp.responseText
Any idea on how to do this will be appreciated.
Thank you.
You need iterate through companies list in VBA and send same xml by changing SVCURRENTCOMPANY tag to Company name from companies list
Dim CompNames
CompNames = Array("Comp1","Comp2")
For Each Company in CompNames
'......your code
'Set SVCURRENTCOMPANY to Company in myXMLstr
xmlhttp.send myXMLstr
Next Company
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.