From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to export waveforms to excel with waveform names instead of Y(0), Y(1) etc

Solved!
Go to solution
 
0 Kudos
Message 1 of 9
(3,892 Views)

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.

 

 

0 Kudos
Message 2 of 9
(3,891 Views)

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.

0 Kudos
Message 3 of 9
(3,885 Views)

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.

0 Kudos
Message 4 of 9
(3,867 Views)

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.

 

 Image write to excel.jpg

 

 

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

 

 

 

0 Kudos
Message 5 of 9
(3,862 Views)

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.

0 Kudos
Message 6 of 9
(3,858 Views)

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.

0 Kudos
Message 7 of 9
(3,854 Views)
Open the example finder and on the Browse tab, go to Fundamentals>File Input and Output. A couple of them (i.e. Write to Text File, Using Spreadsheet Format) use the Write to Text File and Array to Spreadsheet functions. The plain Write to Spreadsheet File function makes use of these as well.
0 Kudos
Message 8 of 9
(3,841 Views)
Solution
Accepted by topic author nero.nl

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
0 Kudos
Message 9 of 9
(3,833 Views)