取消
显示结果 
搜索替代 
您的意思是: 

Write To Spreadsheet File

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

 

 

0 项奖励
1 条消息(共 17 条)
5,642 次查看

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

0 项奖励
2 条消息(共 17 条)
5,640 次查看

And I can create a column with the name of the signals?
Jus like the picture

0 项奖励
3 条消息(共 17 条)
5,626 次查看

You can write the tab delimited header row whenever you create a new spreasheet file, then append the data.


@Bechard wrote:

And I can create a column with the name of the signals?
Jus like the picture


This code seems incredibly convoluted!!!

0 项奖励
4 条消息(共 17 条)
5,619 次查看

And How can I do that?

0 项奖励
5 条消息(共 17 条)
5,608 次查看

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,

Tom L.
0 项奖励
6 条消息(共 17 条)
5,599 次查看

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 项奖励
7 条消息(共 17 条)
5,596 次查看
And How can I do to create a database daily automatically?

 

0 项奖励
8 条消息(共 17 条)
5,581 次查看

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

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 项奖励
9 条消息(共 17 条)
5,578 次查看

Damn, this is so complicated XD

0 项奖励
10 条消息(共 17 条)
5,558 次查看