08-19-2014 09:09 AM
I have a VI which is using activex to read from a spreadsheet. I have am reading a 1 column by 13 row array from the spreadsheet, the data of which is either TRUE or FALSE for any of the elements.
I then want to compare each of the elements to see if they are = to a constant of TRUE to set 1 or more of 13 boolean indicators on my front panel
Can this be done and if so how?
Thanks in advance
08-19-2014 09:11 AM
@n_wint wrote:
I have a VI which is using activex to read from a spreadsheet. I have am reading a 1 column by 13 row array from the spreadsheet, the data of which is either TRUE or FALSE for any of the elements.
I then want to compare each of the elements to see if they are = to a constant of TRUE to set 1 or more of 13 boolean indicators on my front panel
Can this be done and if so how?
Thanks in advance
Definitely.
You need a 1D boolean array.
Please post a VI of your attempt.
08-19-2014 09:21 AM - edited 08-19-2014 09:24 AM
Here is a hint... Assuming you are storing the spreadsheet you read in a string array
08-19-2014 11:58 AM
Oh by the way, 1x13 is a 1d array.
08-19-2014 12:04 PM
@RTSLVU wrote:
Oh by the way, 1x13 is a 1d array.
Not really, since we have two dimensions (1 & 13). In order to make the first column of a 2D array a 1D array, we need to use index array with a zero wired to the lower index.
08-19-2014 12:08 PM
@altenbach wrote:
@RTSLVU wrote:
Oh by the way, 1x13 is a 1d array.
Not really, since we have two dimensions (1 & 13). In order to make the first column of a 2D array a 1D array, we need to use index array with a zero wired to the lower index.
Oh, yeah I guess you are right. If the OP is using "Read From Spreadsheet File" vi then it does output a 2d array except for the "first row" output.
08-19-2014 12:10 PM
Yes, he could set "transpose?" to TRUE and use the first row output, which would give te first column instead. 😉