LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot a graph from a text file into Excel?

I want to plot a graph of (B-C) against A, where B and C are in separate text files. A is in both files and is the same. I need to repeat this many times and be able to choose which files to plot. I need to plot this in Excel.
0 Kudos
Message 1 of 6
(6,397 Views)
There are VIs that ship with LV that let you read text files to input arrays of numbers. Once they are in LV you can do whatever you like in terms of formatting, saving and displaying the data. Is there a reason why you are doing the plotting in Excel rather than LV?

Also, if you aren't clear how to get started, post a couple of your data files and I'll show you what I am talking about.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(6,397 Views)
OK, thanks, I'm not sure about the LV. Excel is needed to distribute the finished plots. Please find attached data files. These text files are for just one channel, I need to plot channel 1 & 2 on same plot.
Download All
0 Kudos
Message 3 of 6
(6,397 Views)
So, where does LabVIEW fit into this? I suppose it's possible to create the Excel Plots via ActiveX commands, but my guess is that it's more complicated than you might need. You could do all this in Excel. Why not write an Excel macro?

On the other hand, within LabVIEW you can print the graph or save it to a file (jpeg, bmp, etc) for distribution purposes.

Tim
0 Kudos
Message 4 of 6
(6,397 Views)
The text files are being created by LabVIEW in the first place. Ideally, I want Labview to directly plot the graph into Excel. I've tried writing a macro, but I don't know how to change the files the macro plots. There are lots of text files.
The Excel file shows my finished plot, made up of 4 text files from labview.
0 Kudos
Message 5 of 6
(6,397 Views)
Here try this. It combines the files' contents and saves it to a new file. In terms of the plotting, you will still have to do that manually in Excel, write a macro, or do the plotting and printing from within LV.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(6,397 Views)