LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in Overwriting result in text file

Sorry, im new to Labview.

My situation is this.

I can store the name and the result and i have the index.

Now I'm having a problem on overwriting result i had in text file.

I give you an example.

Now in my text file i have a name of a student and the result.

i wan to overwrite the result of the student.(this is just an example.)

can someone guide me please?

really need help as this is my school project.

Thanks!

i'll attach my program i have done soon.

0 Kudos
Message 1 of 10
(3,625 Views)
You can use the write to spreadsheet file and over write the file name when asked for replace existing file.
Message 2 of 10
(3,614 Views)
fill.JPG
Message 3 of 10
(3,610 Views)

you got the wrong idea.

i do not want to replace the file to a new file.

what i want was to edit the exsiting file if the same name appear twice.

Example:

in my text file i have already had the name of example Tom and result 80

and now i input the same name and diff result.

i wan was to overwrite the result. 

my project was similar to this here is my attachment of my project

Download All
0 Kudos
Message 4 of 10
(3,587 Views)

Use read from spreadsheet file to read data fitst.

Then, edit read data and write it back using write to spreadsheet file.

0 Kudos
Message 5 of 10
(3,574 Views)
How am I to edit and write back? I read from spreadsheet first then use search and replace function? Is there any example on it?
0 Kudos
Message 6 of 10
(3,567 Views)
One of the idea.
0 Kudos
Message 7 of 10
(3,560 Views)

By doing that, must i manually change it myself by looking at the table?

(btw im using labview 2009)

 Can it be by when there's the same data in the file, it will overwrite by itself ONLY on the result.

Something like this:

In my text file i have:

 

 Name       Result

 Tom            80

 

 and when i key in again on the front panel to store:

 

Name: Tom 

Result:  70

 

it detect the same name, but different result and it will overwrite the previous result.

and they will show (when you search for the name):

Name: Tom

result :70

 

 

you can take a look at the attachment.

 

0 Kudos
Message 8 of 10
(3,525 Views)

There are many array manipulation function available in LabVIEW.

Try study each of them to see how can you utilize it for your task.

0 Kudos
Message 9 of 10
(3,523 Views)

i got the idea what funtion to use. But i dont know how to apply it.

 

0 Kudos
Message 10 of 10
(3,511 Views)