Pages

Friday, April 4, 2008

Fetch/Export data from Ledger Master

FAQs: Tally to Excel

"I am using UDI-Magic 'Tally to Excel' option to retrieve Ledger Master data from Tally 9 into Excel. This generates an XML parse error. The SELECT-statement and error message are given below".

SELECT statement
SELECT $Name, $Parent FROM Ledger

Error Message
XML parse Error (Invalid unicode character)

Problem cause and Solution
Though the SELECT-statement show above is correct, still udi-Magic generates error message. This is because the data that is returned by Tally contains some Invalid Unicode characters (as the said error message suggests)

On further analysis, we found that Tally has a Ledger named "Profit & Loss a/c" which falls under Group "# Primary". The Group name contains an invalid unicode character as the first character (although we have show # hash). On further analysis we found that the Group Name returned by Tally was " Primary".

Solution
As the cause of this problem is invalid unicode character which relates to Ledgers created under the Group "Primary", we filtered out the list using WHERE clause.

Here is the new SELECT-SQL that works fine:-

SELECT $Name, $Parent FROM Ledger WHERE not $Name="Profit & Loss a/c"



No comments: