10-05-2014 04:51 PM - edited 10-05-2014 04:52 PM
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.
Solved! Go to Solution.
10-05-2014 05:18 PM
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
10-05-2014 05:19 PM
10-06-2014 02:14 PM
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?
10-06-2014 02:21 PM
@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
no need for anything fancy
10-06-2014 02:37 PM
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?
10-06-2014 02:45 PM
10-06-2014 02:45 PM
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
10-06-2014 11:51 PM - edited 10-06-2014 11:53 PM
@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". 😉
10-07-2014 01:05 AM
Check this Snippet,