Example Code

Using a Spreadsheet Parameter File to Set Properties in 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 shows how to load a spreadsheet file, search for a specific set of data from that file, and set various properties in LabVIEW with that data.


Description: This example shows how to load a spreadsheet file, search for a specific set of data from that file, and set various properties in LabVIEW with that data.


Requirements: LabVIEW 2012 (or compatible). Hardware: none.


Steps to Implement or Execute Code:

1. Open Parameters.txt and notice how there is garbage data as well as useful data. You can generate a parameter file in any spreadsheet program (such as Microsoft Excel) by saving the spreadsheet as a text file (.txt).
2. Run the VI, and point it to Parameters.txt.
3. Notice how only useful data from the parameter file is taken and used to set various properties in LabVIEW.


Additional Information or References:

 

Using a Spreadsheet Parameter File to Set Properties in LabVIEW FP.png

 

Using a Spreadsheet Parameter File to Set Properties in LabVIEW BD.png


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

Justin E
National Instruments R&D

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

Comments
Todd S.
NI Employee (retired)
on

Great stuff, thanks for posting!

Todd S.
LabVIEW Community Manager
National Instruments