LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to scan an Excel Page/sheet for specific value in cells?

Hi,

I want to be able to scan an excel sheet for a specific value and return it.

My goal is to be able to scan the excel file which it compares to another value:

I.E : reads item 1 which gives it a value of A it will then search for this A at location X it will then return a value that matchs it or return a pop up message saying no such item exists in area excel page G.


Message Edited by MrSafe on 07-23-2008 04:48 PM
0 Kudos
Message 1 of 4
(4,036 Views)
I did not understand your explanation since I don't know what "item 1" is supposed to be to read. Skipping that, the easiest way to do this is to do the searching in LabVIEW. Simply read the Excel sheet into an array and search the array in LabVIEW. You can try to use ActiveX to execute the "Find" method, but that's up to you. You can research MSDN on how to call the "Find" method. The attached example is one that I created a while ago as an example to read an Excel range into an array. It's in 8.0.
0 Kudos
Message 2 of 4
(4,030 Views)
I will try to rephrase:

Labview will take a value from an  cell in an excel worksheet  which will be a combination of letters and numbers ( I will call this "excel file A") it will then take these values and look in a predetermined file also an excel worksheet ( I will call this "excel file B") except it will have multiple sheets in it. What I would like is to be able to scan the file for a specific value and return the value and the location i.e A1 Sheet 1 (excel) It will then compare this value which is from "excel file B" and compare it to the value from "excel file A"
0 Kudos
Message 3 of 4
(4,020 Views)
For more information and some sample VI's and tool kits, you can go to the excel board



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 4
(4,017 Views)