Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
asmenut
399 Views, 2 Replies

populate a parameter

I have a part that I am extracting parameters from an embedded spreadsheet. I am able to extract the multi-value parameters easy enough, but I am having issues trying to extract a single value from the 2nd column of a  2 column range based upon a given parameter value. I have tried using GoExcel.NamedRangeValue and also FindRow and CurrentRowvalue methods, but at best I get an error that it cant find a column name.  Below is the code and I am attaching a copy of the embedded spreadsheet.  Plz help. 

 

GoExcel.Open("3rd Party:Embedding 2", "Sheet1")


MultiValue.List("BSeries") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B4", "")

Series = Parameter("BSeries")

rangeArray = GoExcel.NamedRangeValue("BS_" & BSeries)

Dim oList As ArrayList
oList = New ArrayList

Dim oRows
oRows = rangeArray.GetLength(0)

Dim oRowIndex As Integer

For oRowIndex = 1 To oRows
oList.Add(rangeArray(oRowIndex,1))
Next
MultiValue.List("BStyle")=oList

bn1 = GoExcel.FindRow("3rd Party:Embedding 2", "Sheet1","BELT_STYLE", "=", Parameter("BStyle"))
Parameter("B_Name")= GoExcel.CurrentRowValue("STYLE_NAME")


GoExcel.close

iLogicVb.UpdateWhenDone = True