LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overwrite specific lines in data file

Solved!
Go to solution

Hi All,

 

I am trying to overwrite specific lines in a datafile (either strings or doubles, does not matter) but without having to load the whole datafile

 

I know the option of reading the ASCII file line by line, changing a few lines in LabView and then writing each line to a new datafile by appending the lines using Write to Spreadsheet File. Moreover, reading/writing line by line is super slow and also kind of stupid in case there exists a way to do it for one line only. Even more importantly, I do not want to load the whole dataset to memory in one chunk since the files can reach >1GB.

 

Since I have not found any solution online yet I am asking you guys: 

Is there a way to do this in LabView 2014?

Otherwise, do you know a (memory-efficient) workaround?

 

Thanks in advance! 

 

 

0 Kudos
Message 1 of 2
(2,290 Views)
Solution
Accepted by topic author miraculix

Only if all of the lines are the exact same size.  If they are, you just just set the file pointer (Set File Position) to the start of the line and write your updated line.


GCentral
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
0 Kudos
Message 2 of 2
(2,261 Views)