Example Code

Build Array in Excel Using MathScript Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Here is some example code that allows you to build and array and append it to an Excel file.


Description
This VI will generate an array of 10 random numbers and append it to a file in excel every second. After you stop the VI, open the Excel file named 'append' and you will be able to see your data. Excel cannot be open when this VI is running, otherwise you will get an error. Also, if you don't change the filename, the data is not cleared and will be overwritten.


Requirements

  • LabVIEW 2012 (or compatible)
  • MathScriptRT Module 12.0 (or compatible)


Steps to Implement or Execute Code

  • Run the program

 

Additional Information or References
VI Snippet

2-275.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Stephanie A.
Americas Marketing Manager
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.