LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Data to excel file periodically

Hi 

 

I would like to save data which i will be collecting over a full day. I will be making a measurement (say every 5 minutes) and hence want to save the data to an excel file (or something similar if you have recommendations) which would prevent the whole days data being lost in case the program stops running mid-way. Ive tried looking everywhere but couldn't find anything. Also how to add two data (mean and standard Deviation) to a single file with the times?

 

A bit of background to what i'm collecting - I'm using a solar panel to measure the sunlight over a day. 

0 Kudos
Message 1 of 3
(2,697 Views)

Hi you could take a look into TDMS files, they are Excel friendly and lightweight. Depending on your data perhaps the best approach is to keep a buffer and periodically save the date or a continuos streaming if you use DAQmx for example

0 Kudos
Message 2 of 3
(2,669 Views)

I'm surprised you could not find anything about writing data to a file, this is a very common usage of LabVIEW.

 

There are many ways to do it of course, and there is confusion when calling a file an "Excel" file. Excel can be used as a general spreadsheet editing environment but also has its own proprietary format (.xls, .xlsx, and others). If you really want a .xls file, the best way is to use the report generation toolkit. I prefer .csv files when I don't need any fancy formatting. Taking a data point every 5 minutes is not very strenuous, and you would be fine using the Write To Spreadsheet File VI, (called something like Write to Delimited Spreadsheet in newer versions). Just wire in a comma string to the delimiter, set "append" to true, and wire in a 1D string array with your data point.

0 Kudos
Message 3 of 3
(2,662 Views)