HI,
I'd like to insert a string as a new line to a text file but can't find a way to do this using the fum
eg
Name1 Name2
1 25
2 26
saved as a text file. I would like to add a string as a new line to end up with eg
Name_of_test
Name1 Name2
1 25
2 26
I believe file utilities can't insert a new line at the beginning. I have tried something along the lines of :
nn=file.open(c:\temp\pete.dat,2);
file.setpos(0,nn);
file.lread(Z); // reads first row
file.setpos(0,nn);
file.lwrite("Name_of_test");
file.setpos(12,nn);
file.twrite(Z);
file.close();
but not getting anywhere...
Any help would be appreciated.
The original problem was to save a worksheet with column labels as headers and then to insert the string (nameoftest) at the top of the file ie single column on first line.
Cheers,
pete