09-10-2009 07:17 AM
Solved! Go to Solution.
09-10-2009 07:23 AM
You seem to have clicked the 'Post' button before you entered anything into the message body (like what software you are using, etc.) or even attaching your code.
Try again.
09-10-2009 07:31 AM
Srry, The question is how I can add channel or signal names to the exported excel file.
Exporting the file works fine but the headers show Y(0), Y(1) etc. I would like to see the signal names or channels, whatever is possible, in that possition so I don't have to figure out when I open the excel file.
09-10-2009 09:30 AM
You still have not provided the programming environment you are using. Is it LabVIEW, CVI, C++, something else? How are you acquiring the signals and what function are you using to write to a file?
Providing the code you are using will go a long way to answering all of these questions and help someone see what needs to be changed. Just click on the 'Add attachments' link below the message body.
If you are using LabVIEW, I know this question has been asked and answered numerous times. Try doing a search of that board if in fact, you are using LabVIEW.
09-10-2009 11:17 AM
I'm using labview 8.5 and the example vi : Export Waveforms to Spreadsheet File.vi part of the default libaryof Labview 8.5.
As input I use a several combined waveforms from my mDAQ. The write result to excel you can see below.Changing the name of the waveform only effect the graphs in the front panel but not the results writen to excel.
I would like to see the waveform names in the header of excel when I export the results, instead of Y(0) etc.
waveform |
[0] |
[1] |
[2] |
[3] |
[4] |
[5] |
[6] |
t0 |
02:06,0 |
02:06,0 |
02:06,0 |
02:06,0 |
02:06,0 |
02:06,0 |
02:06,0 |
delta t |
0,2 |
0,2 |
0,2 |
0,2 |
0,2 |
0,2 |
0,2 |
time |
Y[0] |
Y[1] |
Y[2] |
Y[3] |
Y[4] |
Y[5] |
Y[6] |
02:06,0 |
5,41E+01 |
7,93E+01 |
9,60E+00 |
1,64E+01 |
5,04E+01 |
6,21E+01 |
4,31E+01 |
02:06,2 |
3,86E+01 |
2,64E+01 |
6,44E+00 |
8,14E+01 |
5,79E+01 |
8,51E+01 |
8,33E+01 |
02:06,4 |
1,08E+01 |
8,58E+01 |
4,51E+00 |
5,21E+01 |
1,73E+01 |
4,27E+01 |
8,33E+01 |
02:06,6 |
3,43E+01 |
4,30E+01 |
8,57E+01 |
8,14E+01 |
6,89E+01 |
4,39E+01 |
4,60E+01 |
09-10-2009 12:17 PM
The Export Waveforms to Spreadsheet File does not write channel names. You can modify it to get the attribute "NI_ChannelName" and use that instead of the Y[x] that is now created in the for loop called 'Generate formatted data'. You would use the Get Waveform Attribute function.
The Write to Measurement File does write the channel name. You could also use the lower level file write functions to format the file in any way you want.
09-10-2009 02:50 PM
Where could I find an example of the low level file write.
It seems the best methode for my use. I can write the signal name to the excel file first and then append the results.
09-10-2009 04:51 PM
09-11-2009 09:58 AM
Thx it work now. I write the channel names first and append the results later. See below.
Testname | Cooling air pressure | Blow thru Air pressure | Medium Pressure | Flow medium | Tank Level |
t0 | 54:49,7 | 54:49,7 | 54:49,7 | 54:49,7 | 54:49,7 |
delta t | 0,001 | 0,001 | 0,001 | 0,001 | 0,001 |
time | Y[0] | Y[1] | Y[2] | Y[3] | Y[4] |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 4,50E-08 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | -2,83E-07 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 3,73E-07 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 4,50E-08 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 7,01E-07 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 3,73E-07 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,13E-02 | 7,96E-03 | 3,73E-07 |
54:49,7 | 7,35E-03 | 1,16E-02 | 2,12E-02 | 7,96E-03 | 3,73E-07 |