[#Menu : GateWay of Tally] Item : Accounts Vocuhers Import : Call : RDAcctVoucherSumm [collection : RdAcctVchDataExcelColl] ODBC : "Driver= {Microsoft Excel Driver (*.xls)} ;Dbq=" + "D:\Support\June12\tallynsr@yahoo.com\File.xls" SQL : "select * From [Sheet1$]" SQLObject : RdAcctVchImport Client Only : Yes [Object : RdAcctVchImport] RdVchType : $_1 ;;RdVchDate :$VchDay+"/"+$VchMch+"/"+$vchYear RdVchDate :$vchYear+""+$VchMch+""+$VchDay RdLedgerDr : $_3 RdBillno : $_4 RdNarrationDr : $_5 RdLedgerCr : $_6 RdNarrationCr : $_7 RdVchAmount :$_8 RdNarrationCom : $_9 RdCCentre : $_10 RdVchYear : $$StringPart:$_2:0:4 RdVchMonth : $$StringPart:$_2:5:2 RdVchDay : $$StringPart:$_2:8:2 [Collection : RdColAcctVoucherSumm] Source Collection:RdAcctVchDataExcelColl Compute : RdNewVchDate : $RdVchDate Compute : RdNewVchtype : $RdVchType Compute : RdNewLedgerDr : $RdLedgerDr Compute : RdNewBillNo : $RdBillNo Compute : RdNewNarrationDr : $RdNarrationDr Compute : RdNewLedgerCr : $RdLedgerCr Compute : RdNewNarrationCr : $RdNarrationCr Compute : RdNewNarrationcom : $RdNarrationCom Compute : RdNewVchAmount : $RdVchAmount Compute : RdNewCCentre : $RdCCentre [Function:RdAcctVoucherSumm] Variable : RdNewVoucherDate : Date 00 : Set : RdNewVoucherDate : $$Date:$RdNewVchDate 10 : SET FILE LOG ON 20 : WALK COLLECTION : RdColAcctVoucherSumm 30 : SET : SVViewName : $$SysName:AcctgVchView 40 : NEW OBJECT : Voucher 60 : SET VALUE : VoucherTypeName : $RdNewVchType 70 : SET VALUE : Date : ##RdNewVoucherDate 80 : SET VALUE : Narration : $RdNewNarrationCom 100 :INSERT COLLECTION OBJECT : ALLLedger Entries 110 : SET VALUE : LEDGERNAME: $RdNewLedgerDr 120 : SET VALUE : IsDeemedPositive : Yes 130 : SET VALUE : Amount: $$AsAmount:$RdNewVchAmount * -1 140 : Set Value : Narration : RdNewnarrationDr ;150 : INSERT COLLECTION OBJECT : COSTCENTREALLOCATIONS ;160 : SET VALUE : NAME : $RdNewCCentre ;170 : SET VALUE : Amount: -$$AsAmount:$RdNewVchAmount ; ;;;180 :WALK COLLECTION: BILLALLOCATIONS ;190 : INSERT COLLECTION OBJECT : BILLALLOCATIONS ;200 : SET VALUE : Name : $RdNewBillNo ;210 : SET VALUE : BILLTYPE : If not $$IsEmpty:$RdNewBillNo then "Agst Ref" else $$LocaleString:"On Account" ;220 : SET VALUE : Amount : $$AsAmount:$RdNewVchAmount * -1 ;;;230 :END WALK 240 :SET TARGET: .. ;250 : INSERT COLLECTION OBJECT : BANKALLOCATIONS ;260 : SET VALUE : INSTRUMENTDATE : $$DATE:##RdNewVoucherDate ;270 : SET VALUE : DATE : $$DATE:##RdNewVoucherDate ;280 : SET TARGET : .. 290 : INSERT COLLECTION OBJECT : ALLLedger Entries 300 : SET VALUE : LedgerName : $RdNewLedgerCr 310 : SET VALUE : IsDeemedPositive : No 320 : SET VALUE : Amount: $$AsAmount:$RdNewVchAmount 330 : SET VALUE : NARRATION : $RdNewNarrationCr ;340 : INSERT COLLECTION OBJECT : BANKALLOCATIONS ;350 : SET VALUE : INSTRUMENTDATE : $$DATE:##RdNewvoucherDate ;360 : SET VALUE : DATE: $$DATE:##RdNewVoucherDate 370 : SET TARGET : .. 380 : SAVE TARGET ;;380 : CREATE TARGET 390 : END WALK 400 : MSGBOX : " Message Box " : "Successful created All the Payment Voucher" 410 : Exec Command : Tgtobj.txt 420 : SET FILE LOG OFF 430 : RETURN Please do the needful things. Thank u
Dear Sir, The code is execution but no voucher are importing. Is there any error in the save target. With Regards
Dear Admin i am also having same problem in costcentre and bill allocation please help me out if you give solveness i am very gratefull regards mano
Hi pls go to the link - I had given a sample of working code of mine, which imports Sales vch from Excel to tally http://tdlexperts.com/index.php?threads/import-sales-voucher-tdl-error.2343/#post-4105