Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I need to read a coloumn of Excel file and create a list of element. I need to check if there is a value in this list and get the index of this list.
For example, I have a For Cycle. In this Cycle is obtain a "Value".
If this "Value" = "OM_L01_Pannello_Lamiera_Template" I want to get "Index"=1.
How can I do it?
If you have different solution this is good.
I try to use :
VPanelTemplate = "OM_L01_Pannello_Lamiera_template"
'create list of element of coloumn A in image
Dim PartList As New List(Of String)
PartList = GoExcel.CellValues(SharedVariable("MapExcelFilePath"), "02_Main Part", "A1", "A10")
For Each element In PartList
If element = VPanelTemplate Then
contatore=PartList.IndexOf(element)
Logger.Info("°°Questo è l'indice corretto= " & contatore & "°°")
End If
Next
It doesn't run correctly.
How can I solve it?
Thanks
Solved! Go to Solution.