LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search words in a excel file

Solved!
Go to solution

If the number pages are going to be the same you can use FOR loop.

What you can do is, when you find the word, just stop the for loop (Using conditional terminal), no need to keep searching in other pages, unless you want multiple occurrence of the word.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 21 of 50
(1,671 Views)

but where i must insert the word i want find?

0 Kudos
Message 22 of 50
(1,670 Views)

Create one control to enter search string, data is the 2D array you are getting from excel,

check your string in 2D array, if you want to replace, select the index and insert appropriately.

Aarthi
Message 23 of 50
(1,668 Views)
Solution
Accepted by alan4

Check this one now...

I guess now you should be clear how to search and all.

 

I have not fully tested it, but I guess it is a start point for you

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 24 of 50
(1,666 Views)

Hi Gaurav,

   I just want to know the vi which i posted using Find And Replace VI is correct or not?

 

Aarthi
0 Kudos
Message 25 of 50
(1,662 Views)

thats perfect GAK!!!!!!

 

that is what i need!!!!nut one question my excel file have 7 columns andwith this only i can see the first 3 columns..why?

0 Kudos
Message 26 of 50
(1,660 Views)

Change the range to read from A1:C15 to A1:G15.

This is basically FromCellNo:ToCellNo

A refers to column in excel and 15 is for row.

Now you can read 15 rows only.Change it accordingly

Aarthi
0 Kudos
Message 27 of 50
(1,654 Views)

ok i have isntert it in a while, for read all lines...thats good!!!

 

and now i must save the file after doing the changes!

0 Kudos
Message 28 of 50
(1,648 Views)

Hi Aarthi,

 

The method which you have posted is right if there is only one occurrence of word you are searching.

If you run this code problem which I see is,

say you are searching "Traction" and replace string is "XYZ"

cell A1 contains  abcd_Traction

cell A2 contains Traction

 

Result of your code will be

 

A1= abcd_XYZ

A2= Traction

 

And one more doubt I have (Which I have not checked) is , it will search in only one sheet (Active) and not all. But I am not sure about it. Let me know if you have tried this or if you try.

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 29 of 50
(1,645 Views)

Hi Gaurav,

   I will check that replace string, i am not aware of that. And also for selecting worksheet

we have Get worksheet function in which we can select sheets, this i have not tried for this function,

but i have worked for some other functions. Let me try and let you know.

Aarthi
0 Kudos
Message 30 of 50
(1,636 Views)