LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multi space dlemiter

http://forums.ni.com/t5/LabVIEW/How-to-convert-ASCII-to-Array-with-multiple-space-intercolumn/td-p/3...

 above mentin site having a programme of multiple space delitimer ,,

 

this programme is gud for small files but not working for large data file can you me other programme

0 Kudos
Message 1 of 9
(3,413 Views)

Your question is not clear. Can you clarify a bit? What is your specific issue? I'm interpreting that you are trying to parse a large file. Are you running into memory issues? With large files you usually have to read it and parse it in chunks, rather than trying to do it all at once.

 

Also, what program are you referring to? The thread you point to (your link is broken, by the way) has many examples.

0 Kudos
Message 2 of 9
(3,400 Views)

http://forums.ni.com/t5/LabVIEW/How-to-convert-ASCII-to-Array-with-multiple-space-intercolumn/td-p/3...

 

this the perfect link , above given programme is working for samll file , but not working for larage file,

 

my file have multile sapce delitimeter, i want replace all sapce and insert a tab as delitimeter ,

 

here  I have attcheed my file with ,,

0 Kudos
Message 3 of 9
(3,393 Views)

my file have multile sapce delitimeter, i want replace all sapce and insert a tab as delitimeter ,

 

here  I have attched my file and programme which aplicable for samll file but not working for my file.

Download All
0 Kudos
Message 4 of 9
(3,391 Views)

That is still the wrong link. In the first one you had an extra comma at the end. In the second one the link was repeated. This is the correct link: http://forums.ni.com/t5/LabVIEW/How-to-convert-ASCII-to-Array-with-multiple-space-intercolumn/td-p/3...

 

What is the purpose of the for-loop?

 

The function Read Text File reads ... text files. It does not read Microsoft Word documents.

 

Assuming you are saving it as a text file, as I said, with large files you may not be able to do the whole thing at once. You will need to read the file in chunks. The Read Text File function can be set to read lines (right-click on it and select "Read Lines" and wire in the number of lines to read. Repeat until you've read the whole file.

0 Kudos
Message 5 of 9
(3,382 Views)

A better solution would be the implementation of this idea. Please vote for it if you like it. 😄

0 Kudos
Message 6 of 9
(3,377 Views)

This snippet will chew through the file you attached quite quickly.  It will strip the space from the beginning of the line and combine multiple spaces into a single tab.  You do not have the same number of columns in all rows so there will be some padding in the array.

 

PurgeMultipleSpaces.png

 

That was mostly for fun and an excuse to use implies and a feedback node.  What I normally do, and would do here, is to use an array of delimiters in Spreadsheet String to Array with one space, two spaces, three spaces, etc. for the choices.  You'll have to fix the first line which is the only one not to begin with a space, and then ignore the empty first column.

 

MultipleSpaceDelimiters.png

 


@altenbach wrote:

A better solution would be the implementation of this idea. Please vote for it if you like it. 😄


 

And yes, LV should deal with multiple delimiters, so I would go further and say please vote for it even if you don't like it. 

Message 7 of 9
(3,371 Views)

thank you sir , sending me nice programme,, it very much useful for me,

 

now suggess me a programme that i can attached a folder, and that forder having multiple no of file, so programme can run for all file one by one,,

0 Kudos
Message 8 of 9
(3,350 Views)

I am more convinced than ever that "how in wrong" is not a sincere person, but a rather a jerk posting for his own pathetic entertainment.

The text of his postings (lack of coherence, nature of the misspellings), the front panel (giant browse button) and the block diagram (single iteration for-loop) of his VI all reek of fake idiocy.

Another clue is that the words in the title of the VI are all correctly spelled (he forgot to try to act like an idiot when he named the VI).

0 Kudos
Message 9 of 9
(3,341 Views)