Hi guys
I have a little program using a DAQ to receive some votalge signals, I have some requirements to do a database
The requirtements are:
1.- Save the signals every five seconds
2.- Create a file every day
3.- Create the next file automatically
4.- Open the database with excel
I can do this very well with the block "Write to measurement file". The problem is that I would to open this database in other one computer, I can´t, I have to install a complement for labview
My question is if I can do the job done for this block (Write to measurement) whit the block "Write to spreadsheet file" and save the databse direct to excel
Thank you
Yes.
Write to Spreadsheet File.vi creates a tab-dlimited text file which can be opened and read by Excel. It does not create a native Excel file format.
Lynn
And I can create a column with the name of the signals?
Jus like the picture
Something like this would do the trick:
NI Community Example: Add a Simple Header to a Spreadsheet
https://decibel.ni.com/content/docs/DOC-3817
A little bit of searching for terms like "spreadsheed", "header", "append", etc. on NI.com will go a long way- similar questions and problems have come up countless times before in the forums and there are numerous examples related to what you need to do.
Regards,
Write a text string to the filename you are going to save the data in, using Write to Text File function, with each "column header" text seperated with the using the delimiter that is used with the Write to Spreadsheet file function, in other words if you are creating a CSV (comma seperated variable) file, use commas, if tab delimited, tabs, then end the line with a CR/LF pair. Then on the Write to Spreadsheet file function, select append,, which should then put the correct values in the correct columns.
<typed too slow!> Outlaw's suggestion would be simpler.

It isn't going to be a "database" just a text file of formatted data. As to creating a new one each day, there are time and date functions in LabVIEW. When the program is started it can save the date/time in a shift register (or several other techniques) and before each write to the data file it can be compared with the current date/time, if it is the next day, or 24 hours later, or whatever criteria you decide is to be used, then it opens a new file, writing the header information, then saving the data, while updating the saved data/time to compare for the next 24 hours. You will also want to have some file naming scheme to create a new filename for each day, frequently some form of the date
