LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert a comma delimited txt file to a 1d array?

Hi,

 I have a newbie question. I have a txt file with a series of numbers delimited by commas I have been trying to convert them to a 1d array of numbers precision is 6.

0 Kudos
Message 1 of 3
(2,576 Views)

Have a look at the "Read from Spreadsheet File" VI

0 Kudos
Message 2 of 3
(2,573 Views)

You really have two options here:

1) Just use the Read Spreadsheet File.vi, be sure to set the delimiter to be a comma.

2) Do what the above mentioned VI does (just will less overhead and the ability to pass on errors) and just read the entire text file and then use Spreadsheet String To Array.  For the SSTA, you need to set the delimiter to a comma, set the format to %f, and wire in a 1D Array of double to the type.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,529 Views)