LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening .txt file - Need another set of eyes

Solved!
Go to solution

Hi folks - The attached file opens in Notepad and MS Excel as 9999 rows x 3 columns (X,Y,Z values, respectively).  I have tried different delimiters using 'Read From Spreadsheet File.vi' to bring in all the data but only successful bringing in the first column of 9999 values.  Can someone take a look at this and give me the trickto get it open using LabVIEW?  I expect it is something very simple but it is a Monday, isn't it?

 

Thanks in advance.

 

Don

0 Kudos
Message 1 of 9
(3,328 Views)
The delimiter is a space (\s)
Message Edited by elset191 on 11-16-2009 11:31 AM
--
Tim Elsey
Certified LabVIEW Architect
Message 2 of 9
(3,311 Views)

This is all you should need to do...

 

spreadsheet2array.JPG

 

-CAC

Message 3 of 9
(3,302 Views)
Solution
Accepted by topic author DonRoth

untitled.PNG

Make sure you select '\' Codes Display.  otherwise it's actually \\s which is nothing. Additionally you could just use the space constant like the person above this post did.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 4 of 9
(3,286 Views)

...Bitten again by the syntax for 'Space Constant'!  Here is the easiest way:

Thanks for looking at this.  I knew it had to be simple - I was using \s for space delimiter and it will not work as mentioned above unless 'codes display' is selected (which I did overlook).

 

Don readtxtfile_w_space-delimiter.png

 

Message Edited by DonRoth on 11-16-2009 12:06 PM
0 Kudos
Message 5 of 9
(3,281 Views)


Thanks for looking at this.  I knew it had to be simple - I was using \s for space delimiter and it will not work.


\s works.  See my post right before yours

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 6 of 9
(3,275 Views)
I was in the middle of correcting the post when you replied....thanks again, Don
0 Kudos
Message 7 of 9
(3,269 Views)

If you've ever been burned by this before, please kudo altenbach's Idea Exchange submission...

 

Indicate the display format of Strings

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 8 of 9
(3,242 Views)
I have done so.  It is a good idea.  I normally work with binary files but it is remarkable how about every 2 years when a text file comes my way, I forget about this one....Don
0 Kudos
Message 9 of 9
(3,228 Views)