LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from spreadsheet doesn't get all the columns

Solved!
Go to solution

Dear users and moderator,

 

I am trying to get data out of a text file delimited by tabs. I would like to transfer the data into a 2D array with the "Read From Spreadsheet File" VI but it seems that only the first column is acquired.

 

I double-checked and the delimiter is fine. I also tryed to change the format but no effects.

 

Does anybody have an idea about the problem?

 

 

 

Thanks a lot and all the best,

 

Andrea

Download All
0 Kudos
Message 1 of 6
(3,445 Views)
Solution
Accepted by topic author amazz

You need to put the tab delimiter character correctly. Right click on the delimiter string constant and select codes display.  It will display \\t.  Delete one of the backslashes. Otherwise, just replace with the tab delimiter string character.

 

Read Text File.png

0 Kudos
Message 2 of 6
(3,435 Views)

It defaults to "tab delimited" so I don't even think you need to specify a delimiter.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 6
(3,414 Views)

Hey Andrea,

 

like SumTumWong and billko recommended, just disconnect the tab limiter constant from the "Read From Spreadsheet File" VI to get your programm running. I receive the correct data, if I don't use the constant.

 

If you want to set the tab limiter by hand, right click the string constant and choose "'\' Codes Display". After that, enter "\t" into the constant again and your programm will also work like you want.

 

Regards, Stephan

0 Kudos
Message 4 of 6
(3,367 Views)

Thanks a lot to everybody. It now works very well even for very large set of data.

 

All the best,

 

Andrea

0 Kudos
Message 5 of 6
(3,359 Views)

Andrea,

 

Just a comment on your last post: Read from Spreadsheet File.vi does not work well for very, very, large data files (hundreds of MB on 32-bit systems) because it reads the entire file as a string and then converts it to a numeric. This results in at least two copies of the data in different datatypes (string and Array of DBL), both of which require contiguous memory allocations. If you get to files of that size, you will need to read in segments.

 

Lynn

0 Kudos
Message 6 of 6
(3,342 Views)