LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Labview to Send Commands to Excel on Analyzing Data

Solved!
Go to solution

Hello, here is my situation:

 

I have a Labview VI that reads in data from various sensors and uses the Report Generation Toolkit to send all the data values to Excel. Since every run is ~ 8-10 hrs long and there's tons of data, I don't bother to store them all in an array in my VI. 

 

However, within my Excel report I'd like to include a few stats, such as initial, final, max, and min values from all those data points. What kind of command should I send from my VI to get Excel to do this? Or would it be easier to do this within Labview instead?

 

Thanks to anyone who can give some advice!

0 Kudos
Message 1 of 6
(2,585 Views)

It is probably easier to do this in LabVIEW since you will know when you have reached the end of the data acquisition time and do your data summary and write the resuls to Excel.

 

However, Excel can also do the same calculations.

 

 

0 Kudos
Message 2 of 6
(2,583 Views)

Can you be more specific about how to get Excel to do this?

0 Kudos
Message 3 of 6
(2,580 Views)

Google on Excel formulas.

0 Kudos
Message 4 of 6
(2,572 Views)

Another option is to create a VBA function (macro script)  for this and call from LabVIEW.

0 Kudos
Message 5 of 6
(2,560 Views)
Solution
Accepted by Kalyie

Hello, Kalyie!

 

puneet.kapoor is indeed correct, you can create an Excel macro and call it from LabVIEW. An example of this can be found in LabVIEW under Help>>Find Examples. By searching for "Excel," you'll find "Excel Macro Example." This would be more useful for automating your functions, or if you're trying to do more complex operations on your data in Excel (min and max are relativelty simple, though).

 

As also mentioned, it may be easiest to work with your data once it's in excel, using the "=Max( )" and "=Min( )" functions - the choice is yours!

 

Will Hilzinger | Switch Product Support Engineer | National Instruments
0 Kudos
Message 6 of 6
(2,533 Views)