LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write real time values and summary values to the same excel file?

Hi,
 
I'm having some problems with writing the measurements to an Excel file. The attached VI writes every second all the values nicely to an Excel file but that's not the way I want it. Every second, I want to write down the first 7 values (Time, mean, maximum and minimum of the last 10 measurements; like the VI does right now) and when the program stops, I want to write the last 6 values (summary at the end of the total mean, maximum and minimum) in the same file. Is this possible? And how can I add a header to each column?

with kind regards,

Kevin

0 Kudos
Message 1 of 2
(2,496 Views)
Hi Kevin:

You should be able to write out your summary and your column to a different file and then use the read and write file functions to glue the two files together.  If your file is not too huge, you can also just keep the data in memory and write it at the end of your run, after massaging all the data however you see fit.

Also, I see that you are naming your output file as <name>.xls.   I would use an extension of .txt or .tab, since your file is not really an Excel file, it's a "spreadsheet-compatible text file".  With the .tab extension, you can safely set up your computer to open those file types in Excel.

Jason

0 Kudos
Message 2 of 2
(2,481 Views)