LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange number of columns in text file

Solved!
Go to solution

Hello everyone

 

From an Excel file (.xls) I saved (tab delimited text) a file and opened it in Labview. The file has only 2 columns (apparently) but my VI says that it has 12 !! I tried to find any "lost" character into file but everything is in the first two columns.

 

Nevertheless, if I open the .xls file, save the tab delimited text file, open this tab delimited text file using excel, hit save and then open it in my VI, the VI will tell me that the file has only 2 columns. Strange.

 

Find attached my VI (I tried two different methods to load file and got the same results).

 

Thanks

 

Dan07

Method 2.jpg

Method 1.jpg

Download All
0 Kudos
Message 1 of 3
(2,626 Views)
Solution
Accepted by topic author dan07

Around this row you will notice a slew of tabs:

 

240.4926373\t507.1851226\t\t\t\t....

 

Edit: I would clean the source, but if you are stuck here is one way to clean it:

 

CleanMultipleDelimiters.png

Message 2 of 3
(2,606 Views)

Hi,

I think you have an error in your file example.txt. From the row with the values 240.4926373 507.1851226 to the row with the values 248.2722088 520.8333333 you have a lot of Tabs. I made the test erasing these rows and it worked ok.

 

Best Regards,

 

Jorge N.

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