LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Excel Active X to Find a String within a column

I am trying to use ActiveX functions to search for a string within a specific column in excel. And return the row index of that string if a match occurs. Any help on that will be appreciated. I used Read then Compare for each cell in that column, but it is too slow. Maybe a search will be faster.
0 Kudos
Message 1 of 11
(9,912 Views)
Here are some Vi's that will allow you to do a "find" just like doing the edit find function in excel. There is also a vi in there to do a search and replace.



Joe.
"NOTHING IS EVER EASY"
Message 2 of 11
(9,888 Views)
Hello,

If I were doing the application, I would read all the data into LabVIEW then perform my search there.  This avoids the work and overhead of going through ActiveX. 

There also may be a better function in the Excel programming interface, located here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landoffice03_v...

Hope this helps!
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 3 of 11
(9,886 Views)

Thanks for the examples, however I have version 7.1 and the example you sent me was 8.0 . Do you have it in 7.1 ?

 

Regards,

Ayman

0 Kudos
Message 4 of 11
(9,879 Views)
I will convert them to 7.1 for you later today, when I have more time.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 11
(9,877 Views)

Dear Jhoskins,

Did you get the chance to convert the VIs yet ?

Thanks

CAN Programmer

0 Kudos
Message 6 of 11
(9,857 Views)

Sorry I forgot all about it,

Here you go 




Joe.
"NOTHING IS EVER EASY"
Message 7 of 11
(9,850 Views)

Thanks for the examples, it was a great help. However, there is one small problem. The find property does not give an option to Match Entire Cell contents similar to the tool used in excel. Do you know if it is possible to do that in Active X ?

Thanks,

SAM

0 Kudos
Message 8 of 11
(9,842 Views)

Wire a true constant to "look at" in the find property. Wiring a true to this property tells it to match entire cell or xlWhole and wiring a false tells it to match part or xlPart.

One quick way to find this out is record a macro in excel then edit the macro so that you can see what is going on and try to duplicate it in LV. there is all kinds of hints and tricks in a discussion in the breakpoint about excel.




Joe.
"NOTHING IS EVER EASY"
Message 9 of 11
(9,826 Views)

Thanks, that went well

Sam

0 Kudos
Message 10 of 11
(9,816 Views)