LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read delimiter spreadsheet usage

I was having a little bit of trouble trying to figure out what delimiter to use to output the attached text.txt file into a "all rows" string array.?

 

 

0 Kudos
Message 1 of 6
(665 Views)

It's pretty standard to use a Tab or Comma as the delimiter. 

 

Using a Tab makes the raw text file "human readable".

 

A comma is more universally accepted ".csv file type" but the raw text is less readable.

 

Honestly it looks like your issue is how you are terminating each line.

 

Use the EOL character (CR+LF) not just CR or LF   

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 6
(655 Views)

Looks like your column delimiter is a [tab], but you simple needs to be more wordy! What is a "all rows" string array? What functions are you using that has that input?

 

Tab is typically the default, so you probably don't even need to wire it.

0 Kudos
Message 3 of 6
(649 Views)

 


@altenbach wrote:

Looks like your column delimiter is a [tab], but you simple needs to be more wordy! What is a "all rows" string array? What functions are you using that has that input?

 

Tab is typically the default, so you probably don't even need to wire it.


Agree. The OP needs to consider multiple tab separators. I seen that the data was separated up to four times - meaning four tabs between pieces of data - looking at the file using Notepad++.

0 Kudos
Message 4 of 6
(623 Views)

thank you I realize what you mean

0 Kudos
Message 5 of 6
(607 Views)

Here is how I would approach doing this file.  I would create a 2D array of the information that I want to send out.  From the looks of this file you are dealing with a lot of text strings and a moderate amount of numbers so first I would convert the numbers to strings using something from the

 

Programming -> String -> number/string conversion

 

Then I would build a 2D array of strings with all of the stuff that you want into the file. Then I would go to

 

Programming -> Array to Spreadsheet String

 

and use it to create a tab delimited string with a carriage return - line feed at the end of each line.  Notes:

 

(a) going back from spreadsheet string to 2D array the end of line character can be either <carriage return - line feed> or Carriage return or line feed.

 

(b) you have to be careful that none of the strings that you use to build the 2D array contain any tabs, CR or LF as that will goof things up. If it is a user input right clicking on the control and selecting single line entry helps then you just have to check for tab characters and replace them with a space.

 

 

0 Kudos
Message 6 of 6
(590 Views)