07-21-2012 06:15 AM
Hi, I want to save the data in an excel file...
In fact,I use a DAQ board and acquire signals from the muscles of a patient.
I want to save in the excel file the patient name, the date and the data that i had measured from the DAQ.
For the values of the DAQ, there are no problems since i am using the "write to speadsheet block"
Any help please. Thank you in advance
07-21-2012 07:44 AM
If there are no problems, then what is your question?
Are you asking how to add a header? Since you are using Write To Spreadsheet File, simply call the VI before your loop, and wire in a 1D array of strings, or a 2D array of strings, that corresponds to your header (depending on how you want to format the header). Inside the loop just call the Write to Spreadsheet File with the "append" input set to true.
07-21-2012 08:30 AM
Thank you for your reply.
The problem is that i can't save the sting of characters of the patient name, the date and the time... I couldn't integrate them using the "write to speadsheet block"... There was a problem with the data type.
Thank you again
07-21-2012 08:40 AM
Convert to strings.
07-21-2012 09:25 AM
Are you trying to save the patient information as part of the file name or as part of the spreadsheet?
07-21-2012 09:26 AM
As part of the spreadsheet...
07-21-2012 09:48 AM
patient name is text so what exactly is the problem???
07-21-2012 09:50 AM
Well, if I have a number and I need to call a function that takes in a string, I clearly need to convert the number to a string, right? Well, you obviously need to do the same thing. You need to format the date to a string. There are plenty of string functions that you can use. You can use the generic Format Into String function, or the datetime-specific ones in the Time palette. Look at the LabVIEW Help for these functions. They provide examples of the strings you get.
07-21-2012 09:50 AM
I don't know how to save the patient name and hte data in a single spreadsheet
07-21-2012 09:51 AM
Did you read my original response?