LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read .Csv file

Hi

I have a .csv file. i want to read this csv file and want to display only 2 column elements in a for loop and i don't want to display first two element of 2nd column(only from third to last).

Note:no. of row and column may change.

0 Kudos
Message 1 of 5
(2,162 Views)

Hi Risuraj,

 


@Risuraj wrote:

Hi

I have a .csv file. i want to read this csv file and want to display only 2 column elements in a for loop and i don't want to display first two element of 2nd column(only from third to last).

Note:no. of row and column may change.


To read a CSV file you can use ReadDelimitedSpreadsheetFile.

Then use ArraySubset (or IndexArray) to get your 2 columns of interest.

Then use IndexArray to get the "2nd column" and ArraySubset to get all elements "from third to last"…

 

What have you tried so far? Where are you stuck? Do you get any errors?

Best regards,
GerdW


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

Hi,

Can you show us what you tried yet ?

There is a VI called "Read delimited spreadsheet". Try to display all the columns first and then select the data you need with "Array index", "Array subset",...

Yddet

0 Kudos
Message 3 of 5
(2,130 Views)

Hi,

i have done till this point.i want to proceed in this way.

0 Kudos
Message 4 of 5
(2,121 Views)

Give this a try.  I am using Array Subset to remove the first 2 rows.  After that, you can autoindex the array and it will index on your rows.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,117 Views)