Example Code

Converting a Space-Delimited File to Tab-Delimited (Spreadsheet) Format

Code and Documents

Attachment

Overview

Reads in a space-delimited text file, and converts it to the tab-delimited format.

Description

 This VI reads reads in a space-delimited text file and writes it to a tab-delimited string. It also converts the data to a 2D array of doubles. If no path is provided to the File Path In control, it opens a File Dialog to select the text file to read from. the VI reformats the string by removing the spaces between each data column and replacing the spaces with one tab, so you can read the string as a spreadsheet string and then convert it to an array. 

Hardware and Software Requirements

LabVIEW NXG 1.0 or compatible

Steps to Implement or Execute Code

  1. Run the VI.
  2. Navigate to the space-delimited text file and hit "OK".

Additional Information or References

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

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

Contributors