05-17-2013 11:06 AM
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
Solved! Go to Solution.
05-17-2013 12:58 PM
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.
05-17-2013 04:50 PM
It defaults to "tab delimited" so I don't even think you need to specify a delimiter.
05-21-2013 02:31 AM
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
05-21-2013 04:01 AM
Thanks a lot to everybody. It now works very well even for very large set of data.
All the best,
Andrea
05-21-2013 09:42 AM
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