LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove blank element in array

how to remove tht data only frm text file
0 Kudos
Message 11 of 17
(4,040 Views)


MikeS81 wrote:

Hi jeyanthi,

i can´t find the original post, but here is another solution.


Did you mean that you cannot get/read this link? Smiley Indifferent
 
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 12 of 17
(4,037 Views)
If you are reading from a Spreadsheet file, try this:



Then just write the new array to the file.

Message Edited by StevenD on 06-09-2008 02:44 AM

Message Edited by StevenD on 06-09-2008 02:44 AM
0 Kudos
Message 13 of 17
(4,035 Views)


parthabe wrote:
 
Did you mean that you cannot get/read this link? Smiley Indifferent

Hi parthabe,
no i meant another one.
Mike
0 Kudos
Message 14 of 17
(4,031 Views)

Jeyanthi,

Dont keep repeating the same que even after you have got the clearest of the answers. Smiley Mad

Read the text file into a Str indicator, convert it into a Str Arr [1D or 2D based on your file contents], then rip the corresponding column [if it is a 2D Str Arr], do a search & delete operation for the required element inside a while loop, stop the loop if the condition that all the instances of the required element are removed from the array and then stop the VI. Smiley Happy

I hope this is clearer than the diagrammatic explanation of Mike. Smiley Very Happy

After all, a picture is worth a 1000 lines. Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 15 of 17
(4,028 Views)


jeyanthi wrote:

i get the data frm text file and pass it to array. let say my array is like this

abc
cde
abc
cde

ok let say i wana remove the cde from the text file to..how can it been done?



Well, to remove all lines with cde from a text file, there is no need to make it into an array.
 
Simply replace all instances of "cde/n" (in \-codes display) with nothing and write it back to the file.
 
 
You might need to adjust things, depending on the end of line definition (\n vs. \n\r for example).


Message Edited by altenbach on 06-09-2008 01:09 AM
0 Kudos
Message 16 of 17
(4,008 Views)

Hey MIKE I just built the exact same block diagram that you have posted because I am wanting to resolve a similar issue but I keep getting error 74, does it appear that anything is wrong with mine?

 

Thx,

Sam

0 Kudos
Message 17 of 17
(2,022 Views)