03-07-2013 05:58 AM
Hi :
I have txt file the include data into it
I want to know the number of row inside this file
how I can do that using labview
thanks alot for your help
I have attach file for example if you can see the this file have 7 rows
Solved! Go to Solution.
03-07-2013 06:20 AM
You can use the read text file primitive from file file palette, and then right clic on it to select "read rows" :
Then it slightly changes the icon and the function :
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
03-07-2013 07:32 AM
Be careful with this solution. It can easily result in a memory issue, since you are reading the whole file.
If this is a problem, read the file in 65,000 character blocks and search each block for EOL (end of line) characters. Be aware that EOL varies from platform to platform, and can be \r, \n, or \r\n. This is usually only a problem when moving files from one OS to another. The End of Line constant in LabVIEW gives you the proper EOL for the platform under which it is running. If properly implemented, this method is faster than the previous one.