From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering file from Spreadsheet based on parameters listed

Hello Everyone, 

I have this VI that can open a master spreadsheet from a folder which contains CSV data files. The master spreadsheet has the filenames and their parameters listed. After opening the spreadsheet in VI multi column list box, I can double click on the filename and it will plot the data from the files. The problem is I want to filter/sort the files names based on the parameters listed on the multicolumn list box. What I mean by that is listed in this Snapshot. Screen Shot 2017-07-05 at 11.55.25 AM.png

I have attached the VI with directions to operate it. I have attached the test csv file folder. You will be needing it to operate the vi. if somebody can help me to add this feature of sorting the files based on the parameters, then that would be great! thank you. 

Download All
0 Kudos
Message 1 of 8
(3,443 Views)

Hi Huqs,

If you want to see if your filename has a certain string in it, you can use "search/split string".

 

If you want to see if a certain value (like MZI 1 Voltage) falls within a range, or is exactly equal, you can use "In Range and Coerce" or "Equals?". Just parse out the value into an array that corresponds to the filenames.

 

temp.png

Message 2 of 8
(3,405 Views)

Hi gregoryj, 

I really liked your suggestion about search string and In range and coerce. In fact, I was tinkering with it to see how to implement to gain the function that I previously described with the screen shot. However, I am having a hard time implementing it or how to implement. Do you think you can look at my vi block diagram and see how i can implement them to have some sort of file filtration system? Thank you  

0 Kudos
Message 3 of 8
(3,364 Views)

Hi gregoryj, 

Thank you very much for the VI. I was trying to run it but I was sure What I was supposed to do?

0 Kudos
Message 5 of 8
(3,333 Views)

Once it is running you can change the value range to show you a different set of files.

0 Kudos
Message 6 of 8
(3,314 Views)

Oh ok, now I see. Sorry, that was a dumb question. I already was able to implement it in the actual VI.  This is Only for Ring voltage. Let's say I have MZI1, MZI2 and some other variables/columns in the spreadsheet. How can I adjust the number of numeric input (both max and min) based on the number of variables in the spreadsheet? 

0 Kudos
Message 7 of 8
(3,303 Views)

You will have to add the capability to select which column you want to filter by.

0 Kudos
Message 8 of 8
(3,294 Views)