LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I save mutliple strings to a spreadsheet file?

First, I start of with a table of strings.  I chose different strings to go to different indicators.  The original strings have been formatted a little and I want to save the new strings to a spreadsheet file.  For ex ....The original table looks like....
 
Auto-Compensating: ON
Power Supply: ON
Set battery voltage to 3.5 V
Set ignition voltage to 6V
Set Torque 1 = 2.5
Set Torque 2 = 2.5
Set Torque 1 = 1.5
Set Torque 2 = 3.5
** There are more torque values --- I want to be able to save it with an unlimited amount of torque values**
 
That is the original table of strings.  But after I send it through my program I want to save it as...
 
Battery Voltage set to 3.5 V
Ignition Voltage set to 6 V
Torque 1 = 2.5
Torque 2 = 2.5
Torque 1 = 1.5
Torque 2 = 3.5
 
How can it be done?
 
 
0 Kudos
Message 1 of 7
(3,316 Views)
Also how can I show each step as it is being placed into the new table?
0 Kudos
Message 2 of 7
(3,304 Views)
Also,   I turned my table of strings into token strings, and I sent each token string out into a match first string function.  I entered in the keywords that I wanted to be match to each string, but in one string I have.......Set Torque 1 = 2.5 (Torque 2 = 2.5).   I only want the value of torque 1 to go into an indicator.  Also.  I would like for there to be a text box that shows the new formatted string before it goes into the new table.
 
Here is an example of my program
0 Kudos
Message 3 of 7
(3,297 Views)
Hi,
I'm not sure if this is what you need.
Paulo
Message 4 of 7
(3,293 Views)
PauloM......Also in my original text file I have strings like: Set Torque 1 = 2.5 (Torque 2 = 2.5).   How can I have it to where it saves as .......
Torque 1 = 2.5
Torque 2 = 2.5.
 
And also how can have it to where I can put only the value for torque 1 in an indicator?
0 Kudos
Message 5 of 7
(3,282 Views)
Also, the value for Torque 1 will never be the same, How can I do it so where the computer reads the value for Torque 2 no matter what Torque 1 is.  And how can I make it so where I can also send the value for Torque 1 into an indicator?
0 Kudos
Message 6 of 7
(3,274 Views)

I'd recommend using the Match Pattern VI (located in the All Functions>>String palette) to parse through the original string, to remove/collect what you want, and then to concatenate everything together. I've attached an example VI to show you how this might work. It may not be an exact solution to your case, but it should show you how it works and how you can use it to achieve your goal.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
Message 7 of 7
(3,257 Views)