Example Code

Consolidate Columns From Multiple Files Into One File 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

1. Overview:
This VI takes several files and a list of selected columns and outputs a single 2D array with all the selected columns from each file.

 
2. Description:
The idea of this example is to show how to retrieve columns of data that are stored in different CSV files and consolidate them in one single 2D Array in LabVIEW. To accomplish this, customer selects the columns to be retrieved from all the files and runs the example. The columns selected will be the same for all the files. 


3. Requirements

  • LabVIEW 2012 (or compatible)

4. Steps to Implement or Execute Code

  1. Unzip the attached folder to your computer
  2. Verify that all the text files are in the same folder than the Consolidate Spreadsheet By Columns_LV2012_NI Verified.vi
  3. Open the VI "Consolidate Spreadsheet By Columns_LV2012_NI Verified.vi"
  4. Select the desired colums. The same colums will be retrieved from every file
  5. Run the program

5. Additional Information or References

VI Block Diagram

 

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

Peter Flores
Applications Engineer

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