Import From Excel To Aggregate Field

Discussion in 'Tally Developer' started by Naitesh, Sep 9, 2018.

    
  1. Naitesh

    Naitesh Member


    thank you all of you for your time to reply
    Hello Sir
    I have tried this to understand this function
    but something wrong

    please correction
    thank you sir

    [System: UDF]
    MyUdfStkMasterTBL1 : Aggregate : 20025
    MyUdfStkItemName1 : String : 20026
    MyUdfStkItemCat1 : String : 20027

    [#Menu: Accounts Info.]
    Add: Item :Before :mad:@locQuit:Import Stock From Excel:Call : TestFunction123
    Add: Item :Before :mad:@locQuit:Display Imported Stock :Alter:Stock Detail Master

    [Report:Stock Detail Master]
    Form: STForm
    Title: "Stock Detail Master"
    Object:company

    [Form: STForm]
    Width: 100% Screen
    Height: 100% Screen
    Background: FormClr
    Part:STPart

    [Part:STPart ]
    Line: STLineTitle,STLine
    Repeat:STLine:MyUdfStkMasterTBL1
    Break on : $$IsEmpty:$MyUdfStkItemName1
    Scroll: Vertical

    [Line:STLineTitle]
    Fields : TLSTSrNoFld, TLSTNameFld,TLSTCat
    Local : Field : Default : Delete : Border

    [Line:STLine]
    Fields : Multi SNo, STNameFld,STCatFld
    Local : Field : Default : Delete : Border

    [Field: TLSTSrNoFld]
    Use: Name Field
    Set as: "Sr"
    Width: 4
    Align: Center
    Color: BLUE

    [Field: TLSTNameFld]
    Use: Name Field
    Set as: "Stock Name"
    Width: 30
    Align: Left
    Color: BLUE

    [Field: STNameFld]
    Use : Name Field
    Storage : MyUdfStkItemName1
    Width: 30

    [Field: TLSTCat]
    Use: Name Field
    Set as: "Stock Color"
    Width: 30
    Align: Left
    Color: BLUE

    [Field: STCatFld]
    Use : Name Field
    Storage : MyUdfStkItemCat1
    Width: 30

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

    [Function : TestFunction123]
    10 : WALK COLLECTION : NSCollimport
    30 : INSERT COLLECTION OBJECT : MyUdfStkMasterTBL1
    40 : Set Value : MyUdfStkItemName : $_1
    50 : Set Value : MyUdfStkItemColor : $_2
    60 : Set Object Values
    70 : SET TARGET : ..
    80 : Accept Create
    100 : END Walk
    120: MSGBOX : "Status" : "Stock Item-Type Imported"
     

    Attached Files:



  2. RAJdon

    RAJdon New Member


    [Function : TestFunction123]
    Object : Company : ##SVCurrentCompany

    01 : SET TARGET

    10 : SET TARGET

    10 : WALK COLLECTION : NSCollimport
    30 : INSERT COLLECTION OBJECT : MyUdfStkMasterTBL1
    40 : Set Value : MyUdfStkItemName : $_1
    50 : Set Value : MyUdfStkItemColor : $_2
    60 : Set Object Values
    70 : SET TARGET : ..
    100 : END Walk

    120 : SET TARGET : ..

    130 : ACCEPT ALTER


    120: MSGBOX : "Status" : "Stock Item-Type Imported"



    ;;;; Try This
     


  3. Naitesh

    Naitesh Member


    Sir I Tried but Not Save data
    thank you very much for your time to reply
    please help me to correct function
     


Share This Page