Hi!
If you just want to save new data to existing old data,
use "append to file" in the "write to spreadsheet.vi"
But if you want to add new columns in the existing spreadsheet?
See the message wrote by Craig Graham.
In that message,
"1st: The ideal is to build the whole table within your for loop, using
shift
registers to hold the header string and data array, and concatenate the new
header text and columns as they become available. Then when the for loop
finishes, write the entire header and table to a file in two single
operations.
2nd: If this cannot be done- for instance if the program takes a long time
to
execute and you're concerned with the long term reliability of the system-
then each time new data is available, you'll have to first rename your
datafile to "datafile.bak", after deleting any currently existing
"datafile.bak". You then have to load in the previous datafile, concatenate
the new columns and then write it back out to disk. This sequence of
operations could be contained within a "append columns to spreadsheet
file.vi" function. There is no way to add columns to a spreadsheet file,
since the file is just lines of text.
3rd: A more efficient but slightly more complex method, since you know in
advance
how many rows and columns are needed, would be to treat the file as a
"virtual array" and first initialise it with zero data, taking the same
number of characters as the real data- for instance the first two columns
would be
time nnnV
n.nn n.nnn
n.nn n.nnn
n.nn n.nnn
"
I used 1st method, and then I did add new column to spreadsheet.
If iteration number of loop is small, you can use build array in my thought.
I want to say "thank a lot " to Craig Graham again.
Jin-ho Nam..
"Aaron"
wrote in message news:3a80827b@newsgroups.ni.com...
>
> I am collecting data with my program and writing to a spreadsheet after
each
> loop. My problem is that I have created a spreadsheet and I want labview
> to open that existing spreadsheet and write to it. I seem to have no
problem
> if it is a new spreadsheet, but no luck writing to an existing
spreadsheet.
>
> Any Help Is Greatly Appreciated,
>
> Thanks
>
> Aaron