Excel Import Prime

Discussion in 'Tally Developer' started by Partha Mondal, May 8, 2021.

    
  1. Partha Mondal

    Partha Mondal Member


    Dear Admin,

    I have created a TDL for Ledger Master import from Excel. This file working fine in TALLY ERP.9 but when this same file run in Tally Prime then getting a error and failed.

    showing error Function : 'Func_ImportLedgerMaster' LABEL:03:Invalid number of steps

    my code is given below :

    ;;; Shri Ganesh

    [#Menu : GateWay of Tally]

    Key Item : Ledger (Master) Import : K : Execute : Rpt_Ledgermaster_Import

    [Report : Rpt_Ledgermaster_Import] ;; Auto Report

    Form : Frm_Ledgermaster_Import
    Title : $$LocaleString:"Ledger Master Import"
    Auto : Yes

    [Form: Frm_Ledgermaster_Import]

    No Confirm : Yes
    Space Top : 1
    Space Left : 1
    Space Right : 1
    Space Bottom : 1
    Option : Small Size Form
    Full Width : No
    Full Height : No
    Vertical Align : Centre
    Parts : Part_Ledgermaster_Import_Title, Part_Ledgermaster_Import_Details
    On : Form Accept : Yes : CALL : Func_ImportLedgerMaster


    Local : Field : Fld_Import_FileName : Modifies : Var_SVExcelPath : Yes
    Local : Field : Fld_Import_FileName : Variable : Var_SVExcelPath

    [Part: Part_Ledgermaster_Import_Title]

    Lines : Line_Ledgermaster_Imports, Line_Ledgermaster_Imports_Info

    [Line: Line_Ledgermaster_Imports]

    Fields : Form Sub Title
    Space Bottom : 0.25
    Local : Field : Form Sub Title : Info : $$LocaleString:"Ledger Master Import"

    [Line: Line_Ledgermaster_Imports_Info]

    Field : Simple Field
    Space Bottom : 0.75
    Local : Field : Simple Field : Info : $$LocaleString:"(Only Tally (XLS) Format is Supported)"
    Local : Field : Simple Field : Full Width : Yes
    Local : Field : Simple Field : Align : Centre

    [Part: Part_Ledgermaster_Import_Details]

    Lines : Line_Import_FileName

    [Line: Line_Import_FileName]

    Field : Medium Prompt, Fld_Import_FileName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Import File Name (XLS / XLSX) :"

    [Field: Fld_Import_FileName]

    Use : Name Field
    Width : @@NarrWidth
    Set as : "F:\Salesdemo.xlsx"
    Full Width : Yes


    [Variable: Var_SVExcelPath]

    Type : String
    Default : ""
    Persist : Yes

    [System: Variable]

    Var_SVExcelPath : ""

    [System: Formula]

    ExcelFilePath : ##Var_SVExcelPath



    [Collection : Coll_Ledgermaster_Excel]
    ODBC : "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ= " + @@ExcelFilePath
    SQL : "Select * from [Sheet1$]"
    Client Only : Yes

    [Collection : Coll_Ledgermaster_Source]
    Source Collection : Coll_Ledgermaster_Excel
    Fetch : *.*

    Compute : PMLedName : $_6
    Compute : PMLedAdd1 : $_8
    Compute : PMLedPincode : $$number:$_9
    Compute : PMLedPh : $_12
    Compute : PMLedParent : $_15
    Compute : PMLedState : $_16
    Compute : PMLedOpBal : $_30

    Format : $PMLedName
    Format : $PMLedPh

    [Function: Func_ImportLedgerMaster]
    ;; Procedural Block
    Variable : Counter : Number


    ;; Definition Block
    01 : SET FILE LOG ON
    02 : SET : Counter : 0
    03 : START PROGRESS : ($$NumItems:Coll_Ledgermaster_Source) : "Ledger Import" : @@CmpMailName : "Importing Ledgers..."

    04 : WALK COLLECTION : Coll_Ledgermaster_Source

    04A : If : NOT $$IsEmpty:$PMLedName

    05 : NEW OBJECT : Ledger
    06 : SET VALUE : Name : $PMLedName
    07 : SET VALUE : Parent : $PMLedParent
    08 : SET VALUE : OpeningBalance : $PMLedOpBal

    09 : SET VALUE : Led state name : $PMLedState
    10 : SET VALUE : Pincode : $PMLedPincode
    11 : SET VALUE : LedgerPhone : $PMLedPh

    12 : Insert Collection Object : Address
    13 : If:NOT $$isempty:$PMLedAdd1
    14 : SET VALUE : Address : $PMLedAdd1
    15 : END IF

    16 : Set Target:..

    17 : Create Target
    17A : End If
    18 : SHOW PROGRESS : ##Counter
    19 : INCREMENT : Counter
    20 : END WALK
    21 : END PROGRESS
    22 : MSGBOX: "Status" :"Ledger Master Imported \n successfully!!! "
    23 : SET FILE LOG OFF
    24 : RETURN
     


  2. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Tally.PRIME -s 64 bit, chk MS Office is also 64 bit
     


  3. Partha Mondal

    Partha Mondal Member


    OK SIR
     


  4. Partha Mondal

    Partha Mondal Member


    Sir,
    I update my MsOffice from 32 Bit to 64 Bit version. But still getting same error.
    Func_ImportLedgerMaster' LABEL:03:Invalid number of steps
     


  5. Partha Mondal

    Partha Mondal Member



    Admin Sir,
    I update my MsOffice from 32 Bit to 64 Bit version. But still getting same error.

    Func_ImportLedgerMaster' LABEL:03:Invalid number of steps

     


Share This Page