cancel
Showing results for 
Search instead for 
Did you mean: 

txt string spreadsheet

Elyan_wisam
Member

txt string spreadsheet

Hi :

 

i have txt string and i want to spread it to array

 

for example my txt string is like the

 

Power Off,0.00,0,0,Volts,Pass
Relay Init,1.00,1,1,,Pass
Power On,12.00,11.8,12.2,Volts,Pass
-- Result Pass (59/0)

 

and i want to each raw insert to array\record like this

index 0 = Power Off,0.00,0,0,Volts,Pass

index 1=Relay Init,1.00,1,1,,Pass

index 2=Power On,12.00,11.8,12.2,Volts,Pass

index 3=-- Result Pass (59/0)

 

how can i do that in labview

 

 

 

 

4 REPLIES 4
NitzZ
Active Participant

Re: txt string spreadsheet

Message contains an attachment

Hi,

 

Take a look at the code i have attached .. This will solve your problem.


Regards,


Nitzz

(Give Kudos to good Answers, Mark as a solution if your problem is Solved:smileywink:)

MikeS81
Proven Zealot

Re: txt string spreadsheet

Hi Elyan wisam,

see the "Spreadsheet String to Array" function. It's located in the string palette.

 

Mike

Sletten
Member

Re: txt string spreadsheet

Message contains an image

Hey Elyan

 

As Mike wrote this is what you could do.

stringToArray

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If you want to load your string input from a txt file you need to use the read txt file subVI in the File I/O palette.

 

Sletten

NitzZ
Active Participant

Re: txt string spreadsheet

Hi Mike,


Thanks for this solution.. I didn't think about this simple solution..Smiley Happy

 

Regards,

Nitzz