LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I search for a value in an Excel sheet using ActixeX

I am already accessing my excel sheets however I need to be able to search the sheet for a certain value and return the row/cell location. Is there an activeX control that can do this?
0 Kudos
Message 1 of 5
(3,145 Views)
You will need a reference to the range to search. This can be the entire sheet if you wish. Just wire that to the method node Find. Here you can specify all of the typical search options. Wire your string or number into the What input. For the what to LOOKAT value, use -4163 for Value and -4123 for formulas.

The reference returned is the range of the found value. You can wire it into the property node Row and Column to get the location.

Michael Munroe
www.abcdef.biz
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 2 of 5
(3,145 Views)
Thanks for your help, I found the right node but still cannot get that node to work. Ill attach the code I have and perhaps you can comment on it. I get error -2147352565 at the find value node.
Thanks for all your help.
-Dave
0 Kudos
Message 3 of 5
(3,145 Views)
Oops. My error. Your code was perfect. The options that I provided are for the LOOKIN parameter, not the LookAt parameter. Make that one change and you are good to go.

Michael
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 4 of 5
(3,145 Views)
Great, it works perfectly!
Thanks again Michael.
0 Kudos
Message 5 of 5
(3,145 Views)