Issue with Import Masters from Excel.

Discussion in 'Tally.ERP 9' started by Vinit Desai, Jun 28, 2016.

    
  1. Vinit Desai

    Vinit Desai New Member


    Hi Friends,

    I am newbie here! Kindly help me with the following error:

    1> Error: FUNCTION: 'ImportFromExcel' LABEL: 10 : Invalid number of steps
    2> Error: FUNCTION: 'ImportFromExcel' LABEL: 10 : Action execution failed!

    Please File the code here:

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

    [Function: ImportFromExcel]
    Variable : TotalEntries : Number
    Variable : Count : Number
    00 : Set : TotalEntries : $$NumItems:ExcelLedgersCollection
    10 : Start Progress: ##TotalEntries : "Ledgers Creation" : "Importing Ledgers in" : ##SVCurrentCompany
    20 : Walk Collection : ExcelLedgersCollection
    30 : New Object : Ledger
    40 : Set Value : Name : $_1
    50 : Set Value : Parent : $_2
    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

    ;; End-of-File
     


  2. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Invalid number of steps Means

    Unable to Create Collection from Excel

    Check Filename, Path

    Sheetname

    Check whether any special characters in Title like "" " & Etc

    Check Bitness

    32 Bit Means use

    Tally , Windows, Msoffice all should 32 bit version

    64 Bit Means use

    Tally , Windows, MS Office should 64 bit version
     
    zakirhossain_diu likes this.


  3. gangstar

    gangstar Member


    Tally 6.3 Version State is not importing Sir
     


  4. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    what you given, share tried code
     


  5. gangstar

    gangstar Member


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

    [Function: ImportFromExcel]
    Variable : TotalEntries : Number
    Variable : Count : Number
    00 : Set : TotalEntries : $$NumItems:ExcelLedgersCollection
    10 : Start Progress: ##TotalEntries : "Ledgers Creation" : "Importing Ledgers in" : ##SVCurrentCompany
    20 : Walk Collection : ExcelLedgersCollection
    30 : New Object : Ledger
    40 : Set Value : Name : $_1
    50 : Set Value : Parent : $_2
    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

    ;; End-of-File

    This code only Sir
     


  6. malamsingh

    malamsingh New Member


    [Collection:ExcelLedgerscollection]
    ODBC : "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=D:\MyLedger.xlsx"
    SQL : "Select * from [Ledgers$]"
    [Function: ImportFromExcel]
    Variable :TotalEntries :Number
    Variable : Count :Number
    00: Set :TotalEntries :$$NumItems:ExcelLedgerscollection
    01: Start Progress: ##TotalEntries :"Ledger Creation":"Importing Ledgers in": ##SVCurrentCompany
    02: Walk Collection:ExcelLedgerscollection
    03: New Object :ledger
    04: Set Value :Name :$_1
    05: Set Value :parent :$_2
    06: Set Value :Mailing Name :$_1
    07: Set Value :State Name: :$_6
    08: Set Value :Ledger Phone :$_7
    09: Set Value :Ledger Fax :$_8
    10: Set Value :Email :$_9
    11: Insert Collection Object :Address
    12: set Value : Address :$_3+","+$_4
    13: Set Target:..
    14: Insert Collection Object :Address
    15: set Value : Address :$_5
    16: Set Target:..
    17: Create Target
    18: Show Progress:##Count
    19: Increment:Count
    20: End Walk
    21: End Progress
    22: Msg Box:"status":"Ledgers From Excel Imported Successfully"
    [#Menu: Gateway of Tally]
    Add:Item :Before :mad:@LocQuit :"Import From Excel" :Call :ImportFromExcel


    My widow7 64 bit and Ms Office 64 bit
    but my code is not working tally prime
    My excel file :MyLedger.xlsx
    and sheet name Ledgers
     


  7. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Share Excel File
     


  8. malamsingh

    malamsingh New Member


    This is My Excel File
     

    Attached Files:



Share This Page