LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display Excel data on waveform chart

Solved!
Go to solution

@billko:

 

My understanding is that CSV files contain only numerical data, separated by commas, while an Excel file can have words, pictures, graphs etc....

 

If my file has a mixture of integers and decimals only, would a CSV file be okay to use?

 

Thanks!

0 Kudos
Message 11 of 41
(1,342 Views)

@Munna, the actual file that I'll be working with has close to 300 columns out of which I need to choose about 8.  The file that I attached with my post was just dummy data - the real data is confidential which is why I can't post it.  Do you have any other ideas?

 

Thanks.

0 Kudos
Message 12 of 41
(1,340 Views)

Hi rhupd,

 

CSV files can contain anything of integer, floats, strings - even mixed wildly.

Main point is: they use a certain delimiter between "cells" (most often tabs or comma, but not limited to those two) and LF/CR denotes a new row of data…

 

To limit memory consumption when loading your 300+ columns CSV file you could also work with chunks of your data: read in a limited number of lines and convert them using SpreadsheetStringToArray.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 41
(1,336 Views)

@GerdW: That's a good suggestion. I think I do that....read the files in chunks but how would I specificy which columns to display? Could I use Munna's suggestion about choosing which column to show?  I could read the file in chunks of 10 columns and then decide which ones I want to show.  That seems kind of clunky though for a big file.  What do you think?

0 Kudos
Message 14 of 41
(1,328 Views)
You simply can't read x number of columns. You can read in x number of LINES as Gerd said.
0 Kudos
Message 15 of 41
(1,322 Views)

Sorry, I read that too quickly.  So if read an x number of lines, it still leaves me with the same problem of trying to specify which columns to use out of 300+.

0 Kudos
Message 16 of 41
(1,318 Views)
You've been told how to use the visible property or the array subset. What exactly have you tried so far? What determines whether a column should be used or not? Does it vary by file?
0 Kudos
Message 17 of 41
(1,316 Views)

As others told,

If you have problem with Data size to display all data at once then Read chunks and Build your array.

Check this snippet,

Here, I’m reading every 1000 lines from file and picking selected index (column) & Building the array.

 

 

Read Data.png

Munna
0 Kudos
Message 18 of 41
(1,295 Views)

@Dennis: I was working on Munna's previous suggestion before I saw his updated suggestion.  I'm trying to understand how the blue array works.  I can't figure out what the 0 on the left represents and why there are 4 elements but there's a number 2 in the second box.  Are we choosing the second column?  If so, why put the number 2 in the second box?  Why not put it in the first or third or fourth?  In the index array, where's the row index and the column index?  I looked at help and it said to specify the row and colum index but I can't even figure out where they are.  I'm getting extremely frustrated!!  

There's nothing particular about choosing which column will be used; it depends on the engineers and what they want to see.

Download All
0 Kudos
Message 19 of 41
(1,248 Views)

Hello,

 

If you’re getting frustrated then who will do you task?

 

Index array will works based on your input array. If your giving 1D type array then you can select only Row index. If it is 2D then you can select row or column or both (depends on your requirement).

 

Check this attached VI. I made 2 approaches. one is to read all data at once and other one is to read by chunks.

Based on your Data size, use which one you wants.

At first it will display all your signal list, from that you need to select signals to display.

Munna
0 Kudos
Message 20 of 41
(1,222 Views)