NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Kalyie
Posts: 9
0 Kudos
Accepted Solution

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

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!

Active Participant nyc
Active Participant
Posts: 1,568
0 Kudos

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

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.

 

 

Member
Kalyie
Posts: 9
0 Kudos

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

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

Active Participant nyc
Active Participant
Posts: 1,568
0 Kudos

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

Google on Excel formulas.

Active Participant
Puneet_K
Posts: 224
0 Kudos

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

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

------------------------------------------
CLD 2012
Member
WillPwr
Posts: 127
0 Kudos

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

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 H | Applications Engineering | CLAD | National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page