cost centre import excel to tally .....free code

Discussion in 'Tally Developer' started by rajendra mithari, Aug 12, 2015.

    

  1. Dear all,
    i am in learning stage, so i used default code by sample tdls for ledger import and just change for cost centre importing. working perfect.
    While i try, i found common error always that start process label no XYZ is invalid etc....
    just for refreshing purpose i type odbc : SQL :.... two three times and also shut tally etc,
    and found that no query in tdl code. !!!!
    it means when we got these type of problem and we confident about our code, then there may be refreshing problem.

    Thanks
    Mithari

    following is code......

    [Collection: ExcelLedgersCollection]
    ODBC : "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=F:\1.xls"
    SQL : "Select * from [routs$]"


    [Function: ImportFromExcel]
    Variable : TotalEntries : Number
    Variable : Count : Number
    00 : Set : TotalEntries : $$NumItems:ExcelLedgersCollection
    01 : Start Progress: ##TotalEntries : "cost center Creation" : "Importing Ledgers in" : ##SVCurrentCompany
    20 : Walk Collection: ExcelLedgersCollection
    30 : New Object : CostCentre
    40 : Set Value : Category : $_2
    50 : Set Value : Name : $_1
    ;60 : Set Value : Mailing Name : $_1
    ;70 : Set Value : State Name : $_6
    ;80 : Set Value : Ledger Phone : $_7
    ;90 : Set Value : Ledger Fax : $_8
    ;100 : Set Value : Email : $_9
    ;110 : Insert Collection Object : Address
    ;120 : Set Value : Address : $_3 + ", " + $_4
    ;130 : Set Target : ..
    ;140 : Insert Collection Object : Address
    ;150 : Set Value : Address : $_5
    160 : Set Target : ..
    170 : Create Target
    180 : Show Progress : ##Count
    190 : Increment : Count
    200 : End Walk
    210 : End Progress
    220 : Msg Box : "Status" : "Ledgers from Excel Imported Successfully"

    [#Menu: Gateway of Tally]
    Add : Item : Before : @@locQuit : "Import From Excel" : Call : ImportFromExcel
     


  2. abhishekagarwal8628

    abhishekagarwal8628 New Member


    excel format?????????
     


Share This Page