Please help me in import address from Excel one Column or More then one column to tally party ledger master address Line1, Line2, Line3.....
See How it works First Store Address line by line in List Variable RbcLedAddress using a function For example This first function takes data from single field/Excel Column separated by comma and stores address as separated by commas in list variable. Address seprated by commas (complete adderess) is passed to parameter sSource to the following function Code: [Function:RbcGetListByCommaPosition] Variable:sTextToFind:String Parameter:sSource:String Variable:lFound:Logical Variable:nReturnValue:Number Variable:nLenTTF:Number Variable:sTempString:String Variable:vTempAddress:String Variable:vStartPoint: Number Variable:vListIndex:Number Variable:vAddLength: Number 01 : Set:nReturnValue:0 02 : Set:sTextToFind: "," 03 : Log:##sSource 04 : Set : vStartPoint:0 05 : Set : vListIndex :0 06 : List Delete Ex : RbcLedAddress 07 : Set : vAddLength : $$StringLength:##sTextToFind 10 : Set:lFound:(##sSource containing ##sTextToFind) 20 : If : ##lFound 30 : Set:nLenTTF:$$StringLength:##sTextToFind 40 : While:##nReturnValue < $$StringLength:##sSource 50 : Increment:nReturnValue:1 60 : Set:sTempString:$$RbcAddMid:##sSource:##nReturnValue:##nLenTTF 100 : If:$$ExactMatch:($$String:##sTextToFind):($$String:##sTempString) ;105 : Log : $$String:##nReturnValue 110 : Set : vTempAddress: $$StringPart:##sSource:##vStartPoint:(##nReturnValue-##vStartPoint) 115 : Set : vTempAddress: $$TrimNeg:##vTempAddress 120 : Set: vStartPoint : ##nReturnValue 125 : Increment: vListIndex: 1 130 : List Add Ex : RbcLedAddress 135 : Set : RBcLedAddress[##vListIndex].LedAddress:##vTempAddress 150 : End If 160 : End While 170 : Set : vTempAddress: $$StringPart:##sSource:##vStartPoint:(##vAddLength-##vStartPoint) 175 : Set : vTempAddress : $$TrimNeg:##vTempAddress 178 : Increment:vListIndex:1 179 : List Add Ex :RbcLedAddress 180 : Set : RBcLedAddress[##vListIndex].LedAddress:##vTempAddress ; 190 : Log: ##vTempAddress 195 : Else 200 : Increment:vListIndex:1 250 : List Add Ex :RbcLedAddress 300 : Set : RBcLedAddress[##vListIndex].LedAddress:##vTempAddress 350 : END IF 400 : Return [Function:RbcAddMid] Parameter:sSource:String Parameter:nStart:Number Parameter:nBytes:Number Returns:String 10:Return:$$StringPart:##sSource:(##nStart-1):##nBytes Now this code goes through list variable and adds each part of the address in separate line Code: [System : Variables] List Variable : RbcLedAddress [Variable : RbcLedAddress] Variable : LedAddress : String [Function : RBCSetLedgerAddress] Variable : vAddressLines : Number 005 : Object : Ledger : ##vLedgerName ; This line is not required if function is called from ledger master (alter Ledger/Create Ledger) otherwise you must get value for ##ledgername before calling this function 010 : Set: vAddressLines : $$ListCount:RbcLedAddress 050 : IF : ##vAddressLines > 0 100 : FOR RANGE : i : Number : 1 : ##vAddressLines : 1 200 : INSERT COLLECTION OBJECT : Address 300 : SET VALUE : Address :##RBCLedAddress[##i].LedAddress ;350 : Log :##RBCLedAddress[##i].LedAddress 400 : SET TARGET : .. 500 : END FOR 550 : END IF 560 : Save Target ; this line is Not required if function is called from ledger master (alter Ledger/Create Ledger)