Example Code

U16 Array and Write to Spreadsheet 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

This example demonstrates how to initialize an array, iterate through individual array indexes, and write to spreadsheet file.

 

Description

This program creates an array of U16 integer values (1-256), writes the array to spreadsheet file, then overwrites the array with new values (next 256 values -- 257-512), writes to spreadsheet file again, then overwrites the array with next 256 values (513-768).  Process writes 5 arrays to spreadsheet (.dat) in this manner.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Specify filename and filepath to save .dat or .txt file.
  2. Click 'Run' arrow.

 

Additional Information or References

VI Snippet of Block Diagram

sni.png

 

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

 

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments

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