LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching from excel file

Solved!
Go to solution

Hi Sam,

 

still filtering your 2D array of strings?

 

Your VI works as described by Christian - when I replace your ReadSpreadsheetFile function by an array constant with some default data, similar to what can be seen in Christians image.

So the question is:

- Can you supply some typical data?

- Can you tell us the criteria to filter that data?

- Can you show us the expected output for the data and the criteria?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 31 of 96
(1,142 Views)

@GerdW wrote:

Hi Sam,

 

still filtering your 2D array of strings?

 

Your VI works as described by Christian - when I replace your ReadSpreadsheetFile function by an array constant with some default data, similar to what can be seen in Christians image.

So the question is:

- Can you supply some typical data?

- Can you tell us the criteria to filter that data?

- Can you show us the expected output for the data and the criteria?


I already uploaded my VI file,

I just try to get a two selected column from the .xls file and then from these two column i try to get some selected rows. for example 

if (selected column found in xls ) then

     store into array 

     if (values found in these selected column rows) then

           store these rows into array

end

 

A    B    C    D    E

1    2     3    4     4

6    4     7    2     9

2    4     6    3     9

2    5    7    8     9

......

...

...

...

...

first let suppose A and D column selected then these two column store in array and then search 9 number in these two column if 9 number is present in both column then those rows store in new array. 

 

0 Kudos
Message 32 of 96
(1,139 Views)

Hi sam,

 

then why don't you use Christians solution to your problem?

check.png

Do you even try to learn from all our suggestions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 33 of 96
(1,131 Views)


Hi @GerdW thanks man

 

 

0 Kudos
Message 34 of 96
(1,120 Views)

hello everyone, i need little bit more help, this is my current code in which i get xls data into array and search selective columns but now i want to search from some exact data like data between 15 to 18 numbers of selective columns.

For example,

A B C D are xls file columns and in which i select B and D column, now i want to search data from these columns where value is between 15 to 18. Here is my current working code, it run but didn't give me exact results. Please find an attachment and give me some suggestions. Thanks

Download All
0 Kudos
Message 35 of 96
(1,112 Views)

Hi sam,

 

there is an "In range and coerce" function to test for ranges…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 36 of 96
(1,107 Views)

Hi sam,

 

A B C D are xls file columns and in which i select B and D column, now i want to search data from these columns where value is between 15 to 18. Here is my current working code, it run but didn't give me exact results.

Now you should have learned how to filter your arrays.

But you still aren't able to reproduce the very same algorithm to filter your arrays again? All that has changed is the filter condition!

Instead of "keep data IF element == 'A'" you have to implement "keep data IF element is in range"…

 

Just to give an idea:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 37 of 96
(1,103 Views)

@GerdW  작성:

Hi sam,

 

A B C D are xls file columns and in which i select B and D column, now i want to search data from these columns where value is between 15 to 18. Here is my current working code, it run but didn't give me exact results.

Now you should have learned how to filter your arrays.

But you still aren't able to reproduce the very same algorithm to filter your arrays again? All that has changed is the filter condition!

Instead of "keep data IF element == 'A'" you have to implement "keep data IF element is in range"…

 

Just to give an idea:

check.png


Hi, Thanks GerdW.

I need one more suggestion in one problem,

for example, there is a file in which there are some data (data in integer), so i need to find the data which is continuously higher (like 14 15 16 17 15 43 5 76 5) (Not like this 14 11 4 2 4 1 6 6 8 9 65 34 12 67 4 6). And it is not liner searching because liner searching is slow in speed.   

0 Kudos
Message 38 of 96
(1,093 Views)

Hi sam,

 

i need to find the data which is continuously higher (like 14 15 16 17 15 43 5 76 5) (Not like this 14 11 4 2 4 1 6 6 8 9 65 34 12 67 4 6).

Please define "continuously higher"! Are you talking about monotonously rising numbers?

Your example of "14 15 16 17 15 43 5 76 5" doesn't fit into this requirement, so please be more specific and accurate!

 

And it is not liner searching because liner searching is slow in speed.

What is "liner search"? Are you talking about linear search?

And why do you think it is slow (for your task)? And why do you think you need it at all to fulfill your request?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 39 of 96
(1,083 Views)

@GerdW wrote:

Hi sam,

 

i need to find the data which is continuously higher (like 14 15 16 17 15 43 5 76 5) (Not like this 14 11 4 2 4 1 6 6 8 9 65 34 12 67 4 6).

Please define "continuously higher"! Are you talking about monotonously rising numbers?

Your example of "14 15 16 17 15 43 5 76 5" doesn't fit into this requirement, so please be more specific and accurate!

 

And it is not liner searching because liner searching is slow in speed.

What is "liner search"? Are you talking about linear search?

And why do you think it is slow (for your task)? And why do you think you need it at all to fulfill your request?


Hi GerdW, yes monotonously rising number like (15 16 17 23 24 26 26 27),

And 2nd yes Linear searching, actually if thousands of rows find then one by one search take time. I need to search data from file for verification. 

 

0 Kudos
Message 40 of 96
(1,076 Views)