Hello,
I have a process where I have to find certain value from Excel sheet´s column, select the cell and write data to that row. Worksheets are very large (tens of thousands rows) and it would be too slow to achieve this with BluePrism´s standard Excel VBO actions so I have created a new action for search.
This works well except this returns also partial matches. Eg. If I search 12345, this considers 1234567 as a match which is wrong.
Here is the code [inputs CTS = column to search (number), FIND = value that is searched (text)]:
--------------------------------
Dim worksheet As Object
Try
worksheet = GetWorkbook(handle,Nothing).ActiveSheet
worksheet.Columns(CTS).Find(FIND).Select
Success = True
Catch e As Exception
Success = False
End Try
----------------------------------
I tried to alter code to return exact matches only but this didn´t work. This doesn´t find anything.
Dim Excel As Object
Dim worksheet As Object
Dim wb As Object
Try
wb = GetWorkbook(handle, nothing)
worksheet = GetWorkbook(handle, nothing).ActiveSheet
Excel = wb.Application
worksheet.Columns(CTS).Find(what:=FIND, LookAt:=Excel.xlWhole).Select
Success = True
Catch e as Exception
Success = False
End Try
-------------------------------------
Would here be a vb.net wizard who could see what is wrong in the code and help how to get this working correctly?
Br,
Jari