To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI will open a file containing Comma Separated Values and read them in a loop.
Description
This example demonstrates how to read a list of comma separated values from a text file into LabVIEW and operate on the data one value at a time.
In this case, the First Row output of the Read from Spreadsheet File VI is wired into a loop such that the values are viewed one at a time; the output is simply a 1D Array. Alternatively, all the rows in the file might be read by chosing the appropriate ouptut terminal.
Furthermore, there is a sample text file attached; in order to read from different files, the delimiter might need to be changed. To do so, simply change the string constant that is connected to the VI. Finally, whether the data is read as a double, integer or string needs to be chosen manually.
Steps to Execute
Requirements
Software
LabVIEW 8.6 or later. Included is a LabVIEW 8.6 VI as well as a 2012 VI.
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.