LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an easy way to append a new column of data to an existing xl file?

I am modifying and existing program and the new needs are to have a compilation of averaging information to later be plotted with an xl graph. The VI will need to open the existing xl file, add the new column of data points without disturbing the existing columns of data, with a column header, and save the new file with the existing file name. The open and save are obviously not a problem, but I have never appended a new column, just rows in the past. The existing program is LV5.1, but i have a professional developement version of LV6i at my disposal if I need to convert it. Thank you in advance for any suggestions.

Tim Fleeger
Siemems Medical Systems
0 Kudos
Message 1 of 3
(2,841 Views)
Yes you can do it with Excel activeX.
Refer to the example Write Table to Excel.vi provided with LV.
First you have to determine the number of columns you have in the XLS file; then determine the position of the new column (column number) in which insert the data. At this point you're ready to create a routine that insert the data in your column.

All of this can be done with little modification of the example vi.
Good job.
0 Kudos
Message 2 of 3
(2,841 Views)
TMF:

INdeed there is. YOu want to use the "write characters to file" node. (If you're using numerical data, you might have to convert with one of the STRING conversion functions) YOu want to concatenate the string as follows: TAB/DATA/CARRIAGE RETURN. Also be sure to wire TRUE to the Append File terminal of the WRite Characters to File node.. Good luck!
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 3 of 3
(2,841 Views)