LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Appending data to spreadsheet file

Hello,
     I using the append to file function to append data to a spreadsheet file. It works fine except I'd like to have the appended data placed in the next adjacent colunms rather than directly under the old data. I'm sure this is do-able but my attempts heve led to jumbled data files.
 
thanks in advance.
  Will
0 Kudos
Message 1 of 5
(2,938 Views)
The only way to actually append a column to an existing file is to read it in, append the new data to the array, and rewrite the file.
0 Kudos
Message 2 of 5
(2,931 Views)

Hi

   Yes this is how I have attempted it but my only problem is that if I have header information in the existing file its gets deleted. Any Ideas.

   Thanks

   Will

0 Kudos
Message 3 of 5
(2,901 Views)
Use the low level File VIs. Determine the length of the header and make that the read and write offset for the data portions.

Lynn
0 Kudos
Message 4 of 5
(2,895 Views)

Another option to consider is to write a file that is transposed from how you want it.  Each data set is appended as a new row starting with the title.  When the test is complete and all rows have been written to the file, read it back, transpose it and write the final formatted file.  The result is the same, but you eliminate all the earlier times you stepped on the file.

As a safety measure, you can keep the original file as a backup.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 5 of 5
(2,878 Views)