LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

select a column from xls and txt file. HELP Project deadline coming soon

Hi all,

 

I have been trying to select the data from a column in an excel and txt file. for example select the column Current and Resistor

 

Time                 Voltage                    Current                     Resistor                      Power

123                   234                           232                           232                             232

3232                 232                            323                          3232                           323

 

using the read spreadsheet file i am able to write the whole file but that not what I need.

I am wondering if excel allow SQL select statement?

 

any help on how i could to do will be very grateful.

 

Law

0 Kudos
Message 1 of 5
(4,213 Views)
Yes, you can use a database select with an Excel file but using the Read From Spreadsheet function, you just have to use the Index Array function to select a specific column. You will get a 2D array out of the Read From Spreadsheet and this will be wired to the Index Array. Wire a constant to the column input of the Index Array. In your example, a 2 constant will get the entire Current column.
0 Kudos
Message 2 of 5
(4,207 Views)

Hi Lawn,

 

"read spreadsheet file" should give you a 2d array. Use "index array" the select the 3rd and 4th column...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(4,204 Views)

hey thanks,

 

I am able to select the column I want, but how can i add a constant value to every row return and display? I have 12000 row of record and it a task to do it in excel.

 

What method should i use in-order to made the process faster.

 

Thank again

0 Kudos
Message 4 of 5
(4,181 Views)

You can add a scalar constant to an array.  It will add the constant to every value in the array.

Try it.

Message Edited by Ravens Fan on 03-03-2009 11:19 PM
0 Kudos
Message 5 of 5
(4,178 Views)