Excel import

Discussion in 'Tally Developer' started by Lynch, Nov 21, 2018.

    
  1. Lynch

    Lynch Member


    Can somebody teach me how to import vouchers with bill reference. I've learnt the voucher import, but the reference I could not able to set while importing. Not sure, where I'm going wrong,

    the following is the code for importing I'm using.
    Code:
    [Function : ImportSVC]
    Parameter:Fpath:String:0
    Parameter:Fsheet:String:0   
    Variable : Counter : Number
    Variable : ParName1 : String : 0
    Variable : MyGSTIN : String:0
    
    01 : SET : Counter : 0
    02 : START PROGRESS : ($$NumItems:SalesInfo) : "Importing Vouchers" : @@CmpMailName : "Importing Sales Vouchers ..."
    03 : WALK COLLECTION : Sales Info
    39:Set : MyGSTIN : $DSDCGSTIN
    48 : Log:##mygstin
    ;;-------------------------------------------------
    ;;Basic Info
    
    49 : SET : SVViewName : $$SysName:AcctgVchView
    50 : NEW OBJECT : Voucher
    51 : SET VALUE : Date : $$Date:@@EVchDateStrPost
    52 : SET VALUE : VoucherTypeName : "Purchase"
    53 : Set Value :IsInvoice :"YES"
    54 : SET VALUE : Narration : $DSDNarration
    55 : SET VALUE : BasicBuyerName:$DSDCName
    56 : Set Value : BasicBuyersSalesTaxNo : ##MyGSTIN
    57 : SET VALUE : ReferenceDate:$$Date:@@EVchDatePost
    58 : SET VALUE : Reference :$DSDVchNo
    59 : SET VALUE : Reference :$DSDVchNo
    
    
    ;;---------------------------------------------------------
    ;;TO Entry
    
    60 : INSERT COLLECTION OBJECT : LedgerEntries
    61 : SET TARGET : LedgerEntries
    62 : SET VALUE : LedgerName : $DSDCName
    63 : SET VALUE : Amount : $DSDTotal
    64 : SET VALUE : Is Deemed Positive : "No"
    65 : SET TARGET : ..
    
    ;;---------------------------------------------------------
    ;;BY SALES Entry
    
    70 : INSERT COLLECTION OBJECT : LedgerEntries
    71 : SET TARGET : LedgerEntries
    72 : SET VALUE : LedgerName : $DSDSALed
    73 : SET VALUE : BasicUserDescription : $DSDNarration
    74 : SET VALUE : Amount : $DSDSAAmt
    75 : SET VALUE : Is Deemed Positive : "Yes"
    76 : SET TARGET : ..
    
    77 : INSERT COLLECTION OBJECT : LedgerEntries
    78 : SET TARGET : LedgerEntries
    79 : SET VALUE : LedgerName : "IGST"
    80 : SET VALUE : Amount : $DSDIGSTAmt
    81 : SET VALUE : Is Deemed Positive : "Yes"
    82 : SET TARGET : ..
    
    90 : INSERT COLLECTION OBJECT : LedgerEntries
    91 : SET TARGET : LedgerEntries
    92 : SET VALUE : LedgerName : "Equalisation Levy @ 6%"
    93 : SET VALUE : Amount : $DSDTDSAmt
    94 : SET VALUE : Is Deemed Positive : "NO"
    95 : SET TARGET : ..
    
    130 : INSERT COLLECTION OBJECT : Ledger Entries
    131 : SET TARGET : Ledger Entries
    132 : SET VALUE : LedgerName : "ROUND OFF"
    133 : SET VALUE : Amount : $DSDRAAmt
    134 : Set Target : ..
    136 : SET OBJECT      : AllLedgerEntries
    137 : SET TARGET      : AllLedgerEntries
    138 : New OBJECT : Bill Allocations : $DSDVchNo
    139 : SET TARGET : bill Allocations
    140 : SET VALUE : Name : $DSDVchNo
    141 : SET VALUE : BillType : "New Ref";$DSDTotal + $DSDTDSAmt
    142 : Set Value : BillDate : $DSDDate
    143 :  Set Value : Amount : $DSDTotal
    144 : SET TARGET : ..
    ;;---------------------------------------------------------
    158 : CREATE TARGET
    ;;---------------------------------------------------------
    ;600 :         SET VALUE        : Name                : $$TgtObject:$$String:##RBCExlCrntVch
    159 : SET VALUE : PersistedView : ##SVViewname
    160 : INCREMENT : Counter
    161 : Log:##counter
    170 : SHOW PROGRESS : ##Counter
    180 : END WALK
    190 : END PROGRESS
    200 : RETURN
     


  2. sivam

    sivam Active Member



    Make Changes like Below in your To Collection

    60 : INSERT COLLECTION OBJECT : LedgerEntries
    61 : SET TARGET : LedgerEntries
    62 : SET VALUE : LedgerName : $DSDCName
    63 : SET VALUE : Amount : $DSDTotal
    64 : SET VALUE : Is Deemed Positive : "No"
    139 : Insert Collection Object : bill Allocations
    140 : SET VALUE : Name : $DSDVchNo
    141 : SET VALUE : BillType : "New Ref";$DSDTotal + $DSDTDSAmt
    142 : Set Value : BillDate : $DSDDate
    143 : Set Value : Amount : $DSDTotal
    65 : SET TARGET : ....
     


  3. Lynch

    Lynch Member


    Thanks @KNSivam, the doubt is, why it is not working in any other ledger entries collection in a particular procedure loop. Say, for example, I wish to assign Costcentre allocation(CC Alloc) in any of the particular ledger entry collection, it is not working. it accepts any of the sub collection only in the to collection(or may be the primary collection object) (i.e) if I make to collection in the end of the procedure block, the same code will not work . How to override this?


    the thing I understood in this program is, the sub collection should be made before the line"Set Target:.." appears at the first time. once the line appeared, sub collection is not possible(as far as I knew, may be it is not so). In this case is there any way out
     


  4. Lynch

    Lynch Member


    Hurray hurray wah hip hop hurray.... Hurray hurray wah hip hop hurray........

    I've developed a complete code to import all vouchers with bill reference wise (even with TDS allocations)., costcentre wise. its a new milestone in my TDL learning career. Thanks to this forum and its blissful experts., and especially to my fellow learners who asked a various doubts, (that create lot of dynamic ideas to the co learners and the experts as well)... Since I've studied to divide the big problem in to pieces then solve one by one... I've done this excel import case study in 5 different parts. Soon, I'll compile all the five and post here, so that it will be useful to others.

    Meanwhile, I still have to go with one more case study of assigning Cost centers to the existing Voucher entries as well. Nothing is impossible, there will always all ways be there to the solutions. Make hay while the sun shines... yo hooooooooooooooo
     


  5. svn

    svn Member


    congrats ........
    Pleases send demo tcp file with excel sheet also to my email id svninfosolutions@gmail.com
     


  6. swathi

    swathi New Member


    plz any body teach me how to write code odbc file
     


  7. Gehna

    Gehna New Member


    HOW MUCH IS THE COST TO SHARE THAT TDL AND EXCEL FILES??? THOUGH WHICH CAN IMPORT DATA FROM EXCEL TO TALLY????
     


  8. Gehna

    Gehna New Member


    TDL Require For These 2 Excels...
     

    Attached Files:




  9. pl find my xl sheets which are simmiler to ur sheets. even more data i have in excel than you. this tdl is ready rbmithari@gmail.com
     

    Attached Files:




  10. PLEASE DONT DEMAND HERE ANY TDL, THIS IS FREE FORUM FOR LEARNING.
     


  11. Systecg

    Systecg Member


    i want to set bill wise details from excel to tally sales import

    getting this error

    plz help
    thankx

    ;last action code

    Action:R7500 : If :( not $$IsEmpty:##Roundoff)
    Action:R7600 : Insert Collection Object : Ledger Entries
    Action:R7800 : Set Value : LedgerName : "Round Off"
    Action:R8000 : Set Value : IsDeemedPositive : No
    Action:R8200 : Set Value : Amount : if $$IsNegative:##Roundoff then $$AsAmount:mad:AbsRound * -1 else $$AsAmount:mad:AbsRound
    Action:R8201 : SET vALUE : Reference : $Column1

    Action:R8400 : Set Target : ..
    Action:R8500 : End If
    Action:R8600 : Set Value : Narration : $Column38 ;PartyGSTIN

    ;;TP


    Action:5000 : Create Target
    Action:5049 : End Walk

    Action:5050: Insert Collection Object : bill Allocations
    Action:5051: Set Value : NAME : $$Number:$Column1
    Action:5052: Log:$$TgtObject:$AMOUNT
    Action:5053: Set Value : BILLTYPE : "New Ref"
    Action:5054: Log:$$TgtObject:$AMOUNT
    Action:5055: Set Value : AMOUNT : $$AsAmount:$Column33





    ;; new Code for bill ref number set
    Action:5050: Insert Collection Object : bill Allocations
    Action:5051: Set Value : NAME : $$Number:$Column1
    Action:5052: Log:$$TgtObject:$AMOUNT
    Action:5053: Set Value : BILLTYPE : "New Ref"
    Action:5054: Log:$$TgtObject:$AMOUNT
    Action:5055: Set Value : AMOUNT : $$AsAmount:$Column33




    upload_2021-2-19_0-53-37.png
     


  12. Sophia yesu

    Sophia yesu New Member


    Hi, I have done Journal Import but am not able to import multiple cost centers in it. Can anyone help me with it ??
     



  13. 1151 : Insert Collection Object : BILLALLOCATIONS
    1151a: Set Target:BILLALLOCATIONS
    1152 : Set Value: Name : $$FileReadCell:##Counter:4
    1153 : Set Value: Billtype : "New Ref"
    ;1154: Set Value:TDSDEDUCTEEISSPECIALRATE:No
    1154a : Set Value: Amount : $$AsAmount:($$FileReadCell:##Counter:37)
    1160 : SET TARGET : ...


    you are missing set target
     


  14. kosi

    kosi Member


    Mr Lynch
    I really need u badly
    Can we link up.
    This is my email
    Kosikondo321@gmail.com
     


Share This Page