Hi Experts, I'd like some help with importing my excel file via odbc tdl to tally. This was based on the post : http://tdlexperts.com/index.php?threads/import-payment_vch-excel-to-tally.251/#post-564 however i cant seem to get it to work. The start progress just starts and dissappears, when I check on the ledger vouchers, the entries aren't there. Code: [#Menu : Gateway of Tally] Item : Import : CALL : Import payment [Function : Import payment] 001 : Call : Import Of Payment Voucher [Function : Import Of Payment Voucher] Variable : Counter : Number 00 : SET : Counter : 0 01 : START PROGRESS : ($$NumItems:PaymentInfo) : "Vouchers Importing " : @@CmpMailName : "Payment Vouchers Importing ..." 02 : WALK COLLECTION : Payment Info 03 : SET : SVViewName : $$SysName:AcctgVchView 04 : NEW OBJECT : Voucher 05 : SET VALUE : Date : $$Date:@@EVchDatePost 06 : SET VALUE : VoucherTypeName : $$VchTypePayment 07 : INSERTCOLLECTION OBJECT : AllLedgerEntries 08 : SET TARGET : LedgerEntries 09 : SET VALUE : LedgerName : $DSDLedgerNameDr 10 : SET VALUE : Amount : $DSDAmountdr 20 : SET VALUE : Is Deemed Positive: "Yes" 30 : SET TARGET : .. 40 : INSERTCOLLECTION OBJECT : ALlLedgerEntries 50 : SET TARGET : LedgerEntries 60 : SET VALUE : LedgerName : $DSDLedgerNameCr 70 : SET VALUE : Amount : $DSDAmountcr 80 : SET VALUE : Is Deemed Positive: "No" 90 : SET TARGET : .. 100 : SET VALUE : PersistedView : ##SVViewName 110 : SET VALUE : NARRATION :$DSDNarration 120 : CALL : Save Target Payment 130 : INCREMENT : Counter 140 : SHOW PROGRESS : ##Counter 150 : END WALK 160 : END PROGRESS 170 : RETURN [Function: Save Target Payment] 04 : Save Target [Collection: Payment Info] ODBC : "Driver={Microsoft Excel Driver (*.xls)};Dbq=" + @@MaterODBCExcelPath+"" SQL : "Select * from ["+@@MaterODBCExcelSheet+"$]" SQLObject : Payment Info Obj [Object : Payment Info Obj] DSDDATE: $_1 DSDLedgerNameDr : $_2 DSDLedgerNameCr : $_3 DSDAmountdr : $_4 DSDAmountcr : $_5 DSDNarration :$_6 [System : Formula] EVchNoPost : $_1 EVchDatePost : $$Date:@@EVchDateStrPost EVchDateStrPost : ($$StringPart:$_1:8:2) + "-" + + ($$StringPart:$_1:5:2) + "-" + + ($$StringPart:$_1:0:4) [System : Formula] Mater ODBC Excel Path : "C:\Program Files\Tally.ERP9\ImportVouchers.xls" ;; The Excel Sheet Path Mater ODBC Excel Sheet : "PaymentVCH" ;; Sheet name in That Excel File ;;End-of-File
/* Import Payment Voucher from Excel to Tally via ODBC but it is not taking the multiple bill allocations, Please Help me and also correct the code also. It is taking the 1st batch allocation but the send one is not showing. And also the type is showing 'New ref' but it should be show 'Agst Ref.' Because i am declaring in this code is 'Agst Ref.' */ [#Menu : Gateway Of Tally] Add : Key Item : At End : Excel To Tally : E : CALL : Test [Function : Test] 0001 : Call : Test1 [Function : Test1] ;Variable : Counter : Number 001 : Walk Collection : VouOdbcColl 002 : If : $VchType = "Payment" 003 : New Object : Voucher 004 : Set Value : Date : $$Date($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date 005 : Set Value : VoucherNumber : $VchNum 006 : Set Value : VoucherTypeName : $VchType 007 : Set Value : Effectivedate : $$Date($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date 007A : Set value : Narration : $VchNarr 008 : Walk Collection : DrLedColl 009 : Insert Collection Object : Ledger Entries 010 : Set Value : LedgerName : $TSLedger ;;010A: MSG BOX : "DR LED" : $TSLedger 011 : Set Value : IsDeemedPositive : Yes ;;011A: MSG BOX: "DR AMOUNT" : $TSDebitAmt 012 : Set Value : Amount : -1 * $$AsAmount:$TSDebitAmt ;0188 : Walk Collection : DrbillallColl ;004549 : Accept Object : Ledger Entries 178 : Insert Collection Object : BillAllocations ;00 : SET : Counter : 0 177 : Set Value : BILLTYPE : "Agst Ref" 176 : Set Value : Name : $TSAgstNo 179 : Set Value : AMOUNT : -1 * $$AsAmount:$TSAgstAmt ;01 : INCREMENT : Counter ;02 : Return 0181 : Set Target : .. 01856561 : Set Target : .. 0189 : End Walk 015 : Walk Collection : CrLedColl 016 : Insert Collection Object : Ledger Entries 017 : Set value : LedgerName : $TSLedger 018 : Set value : IsDeemedPositive : No 019 : Set Value : Amount : $$AsAmount:$TSCreditAmt 020 : Set Target : .. 021 : End Walk 022 : Create Target 023 : MSG Box : "Led" : "Payment Voucher is Created" 024 : End If 102 : If : $VchType = "Receipt" 103 : New Object : Voucher 104 : Set Value : Date : $$Date($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date 105 : Set Value : VoucherNumber : $VchNum 106 : Set Value : VoucherTypeName : $VchType 107 : Set Value : Effectivedate : $$Date($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date 107A : Set value : Narration : $VchNarr 108 : Walk Collection : CrLedColl 109 : Insert Collection Object : Ledger Entries 110 : Set Value : LedgerName : $TSLedger ;;010A: MSG BOX : "DR LED" : $TSLedger 111 : Set Value : IsDeemedPositive : No ;;011A: MSG BOX: "DR AMOUNT" : $TSDebitAmt 112 : Set Value : Amount : $$AsAmount:$TSCreditAmt ;113 : Set Target : .. ;114 : End Walk ;004 : Walk Collection : BillColl 180 : Set Target : .. 158 : End Walk 115 : Walk Collection : DrLedColl 116 : Insert Collection Object : Ledger Entries 117 : Set value : LedgerName : $TSLedger 118 : Set value : IsDeemedPositive : Yes 119 : Set Value : Amount : -1 * $$AsAmount:$TSDebitAmt 120 : Set Target : .. 121 : End Walk 122 : Create Target 123 : MSG Box : "Led" : "Receipt Voucher is Created" 124 : End If 125 : End Walk [Collection: BillAllocations] Type : Voucher Fetch : *, BillAllocations.* [Collection: VouOdbcColl] ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls" SQL : "Select * From [Sheet2$]" Sql Object : StkItemOdbcObj ;Filter : UnFilter [Collection: DrLedColl] ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls" SQL : "Select * From [Sheet2$]" Sql Object : StkItemOdbcObj Filter : DrLedFilter ;Filter : BillAlcFilter [Collection: CrLedColl] ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls" SQL : "Select * From [Sheet2$]" Sql Object : StkItemOdbcObj Filter : CrLedFilter [Collection: DrbillallColl] ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls" SQL : "Select * From [Sheet2$]" Sql Object : StkItemOdbcObj Filter : BillAlcFilter [Object : StkItemOdbcObj] TSDate : $_1 VchNum : $_2 VchType: $_3 TSLedger : $_4 TSAgstNo: $_5 TSAgstAmt: $_6 TSDebitAmt : $_7 TSCreditAmt : $_8 VchNarr : $_9 VchNum1: $_10 [System: Formula] DrLedFilter :$VchNum = $$ReqObject:$VchNum And Not $$IsEmpty:$TSDebitAmt CrLedFilter :$VchNum = $$ReqObject:$VchNum And Not $$IsEmpty:$TSCreditAmt BillAlcFilter : Not $$IsEmpty:$TSAgstAmt ANd $VchNum = $$ReqObject:$VchNum