LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

append data to top of text file

Solved!
Go to solution

Hello,

 

How can I go about appending data to the top of the file instead of the bottom as the attached VI does?

Thanks,

hiNI.

Download All
0 Kudos
Message 1 of 7
(5,060 Views)
Solution
Accepted by topic author hiNI

Read the whole file, set the file position offset to 0, then write the data with the new data at the top.

 

SubVI_1[1]_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 7
(5,049 Views)

Jim's solution is the proper way to do it.

but if the task is only this

a.png

0 Kudos
Message 3 of 7
(5,035 Views)

That just puts the new data at the end of the file, but backwards.

 

What did you mean by this?


@Neos wrote:

[...]

but if the task is only this


 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 7
(5,031 Views)

just for specific example.Smiley Happy( pun intended )

Solution is of course what you have given..........

0 Kudos
Message 5 of 7
(5,025 Views)

Hello,

 

I am having a problem with the second line and beyond...there seems to be an extra tab.  How do I go about getting rid of the first tab from the second line and after?

 

Thanks,

hiNi.

Download All
0 Kudos
Message 6 of 7
(4,994 Views)
Solution
Accepted by topic author hiNI

Your strings already have the End Of Line on them.  You do not want to use the Spreadsheet String To Array.  Wire your array straight into the Concatinate String.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 7
(4,986 Views)