LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display Excel data on waveform chart

Solved!
Go to solution

I have a .csv file with 4 column of data.  I found something from another thread which allows me to display data from an Excel file in an array.  I'm having trouble with the following items:

 

1) I need to show 4 column of data but I can't seem to find a way to add more elements to the Invoke node so I'm stuck with being able to display only 2 columns of data.

2) Why can't I take my output and put it in an array and then display it on a waveform chart?  

 

Please take a look at the attached VI.  I made notes in the block diagram.  When I try to attach the Excel data to a chart, it says that the type of the source is a string while the type of the sink is double.  How can that be when the Excel file only has integers?!

 

Please help.

 

Thank you.

 

Download All
0 Kudos
Message 1 of 41
(7,185 Views)

I do not have Excel so I do not know why that will not work as you want.

 

However, a .csv file is not an Excel file and you do not need all those invoke nodes. Read From Spreadsheet File.vi with Integer data type selected works. The format string input is shown but is not required.

 

Lynn

 

Read csv.png

Message 2 of 41
(7,165 Views)
A csv file is imported with the Read From Spreadsheet File. No invoke nodes. You can also select the data type - int, dbl, string. You should have your Context Help window open to get details inn the function.
0 Kudos
Message 3 of 41
(7,164 Views)

Thank you johnsold!  I didn't realize it was this easy.  Can I specify which columns I want to display?  I did some googling and it seems like i need to use the report generation toolkit, is that right?

0 Kudos
Message 4 of 41
(7,104 Views)

@rhupd wrote:

Thank you johnsold!  I didn't realize it was this easy.  Can I specify which columns I want to display?  I did some googling and it seems like i need to use the report generation toolkit, is that right?


Nothing simpler!  Just make the plot visibility check-box visable

Capture.PNG

no need for anything fancy


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 41
(7,098 Views)

Thanks Jeff for that simple solution but the Excel file I'm going to use has about 50 columns and I want to display only a few e.g. the 3rd, 7th and 15th column.  Would you method still be the best way to go?

0 Kudos
Message 6 of 41
(7,095 Views)
You can use the Index Array function to select how many or how few columns from the text file that you want.
0 Kudos
Message 7 of 41
(7,089 Views)

Index Array will select a single column from the 2D array. The user could create an array of the column numbers to be displayed. Then put Index Array inside a for loop autoindexing on the display number array but not on the 2D array of data.

 

Lynn

0 Kudos
Message 8 of 41
(7,087 Views)

@rhupd wrote:

Thanks Jeff for that simple solution but the Excel file I'm going to use has about 50 columns and I want to display only a few e.g. the 3rd, 7th and 15th column.  Would you method still be the best way to go?


Even though we do know that you are actually referring to a CSV file, you should learn to differentiate between Excel and CSV files.  As you have already seen, they are handled quite differently, and posting might not have even been necessary.

 

Of course, you could have avoided posting if you did a forum search on "CSV", instead of "Excel".  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 41
(7,050 Views)

Check this Snippet,

 

Excel Data.png

Munna
0 Kudos
Message 10 of 41
(7,030 Views)