LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a spreadsheet into an array and subsequently displaying a graph

Hi,

 

I am new to Labview and to this forum. I am using Labview 8.5. I want to read excel spreadsheets into arrays in Labview and then display the arrays as a graph on the xy graph. So far I have managed to get the xy graph to display a graph but only by manually inputting values into my arrays. However, I need the arrays to be able to automatically read in large external excel spreadsheets. I was hoping someone could explain to me a simple way of doing this.

 

Also in regards to the arrays I have found that they only either have an input (indicator) or an output (control). Is it not possible to have an array which possesses both an input and an output? As I would find this useful what I am working on now as well as future work.

 

Your help is very much appreciated. Thank You.

 

Dibz 

0 Kudos
Message 1 of 8
(4,475 Views)

Since you have an Excel file, you need to search the forums for examples on how to read Excel files.  Also look through this link to find links to good Excel threads.

 

I don't understand what you are asking for "have an array which possesses both and input and an output".  Perhaps you want to use a local variable so that you can read from an indicator or write to a control?

0 Kudos
Message 2 of 8
(4,464 Views)

Yes I want to write to a control.

 

Also, I have since found a way of reading my excel spreadsheet into labview but cannot display a graph in my express xy graph. The express xy graph plots only one point.

0 Kudos
Message 3 of 8
(4,421 Views)
Did you wire a false constant to the Reset input or right click, select properties, and uncheck 'Clear data on each call'?
0 Kudos
Message 4 of 8
(4,418 Views)

Do you have Report generation toolkit for MS office ? IF yes you can try all this,

 

Open the Excel file using New Report, goto the proper sheet in the excel file and then the proper column,

 

extract the column data using GET DATA vi, GET DATA VI is polymorphic so select the proper data type,

 

use the extracted data to plot the graph.

 

0 Kudos
Message 5 of 8
(4,401 Views)

To Dennis Knutson: At the moment nothing is wired to the reset input. Also, the 'clear data on each call' has not been unchecked.

 

To cancanopen: I have not heard of this report generation toolkit. How do I find out if I have it? Where do I get it from if I do not have it?

0 Kudos
Message 6 of 8
(4,343 Views)
Well, if you did not wire anything or set the property, then it will reset with each iteration and only display one point. Isn't that pretty obvious?
0 Kudos
Message 7 of 8
(4,341 Views)

As I said earleir I am new to Labview. I tried to find a suitable explanation for the function of the reset input but I could not find one. Therefore I made an assumption on what I thought it's purpose was, which is obviously not correct. It says by default it is set to false but I was not sure what this meant. How would I use the reset input to get the express xy graph to work appropriately? Is it the false setting which is causing the problem? 

0 Kudos
Message 8 of 8
(4,327 Views)