From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Read and export from excel

Hi All

 

Can someone please assist me in this regard:

 

I have a VI that continuosly measure and log data from two frequencies, frequecy A and frequncy B interchangeably and then save the logged data in excel spreadsheet with a time stamp.

 

the problem i am having is that both frequncies and associated data, which differs, are logged vertically below each other and associated data horizontally in line with each frequency.

 

I would like to have a VI that can seperate these two frequncies like data from frequency A be looged in one tab of the spreadsheet and that from B on the other tab of the same spreadsheet.

0 Kudos
Message 1 of 6
(5,209 Views)

Just checking, you're using LabVIEW and not Measurement Studio, correct?  I just see that your post is under MS for VC++.

 

This seems like a perfect application for TDMS.  You can log multiple channels of data into a spreadsheet which you can then access easily.  You'll need a plug-in for Excel (link below).  There's also plenty of community examples to help you figure out how to log multiple items.

 

1. TDMS Format Overview:

http://www.ni.com/white-paper/3727/en/

 

2.  TDM Excel Add-in:

http://www.ni.com/example/27944/en/

 

Look at the examples in LabVIEW help, they'll help you configure your TDMS channels correctly to write different datasets to different places in your spreadsheet.

Chris
0 Kudos
Message 2 of 6
(5,189 Views)

Thank you for your assistance. 

 

I believe i did not phrase my question properly. Please allow me to rephrase.

 

I have a Labview system which acquires and log data from two frequencies (279750 Hz and 295750 Hz) and export it to excel as shown below.

 

Sample

 

As can be seen from the caption above, data from these two frequencies is presented in one excel sheet, one after the other. I would like to have a system that can help me separate data as shown in the two images below, which i did manually, whereby all data in associated with a frequency of 279750 Hz (black) is logged on one sheet of the spreadsheet and the one associated with 295750 Hz frequency (red)  on the other sheet of the same spreadsheet.

 

Untitled.jpgUntitled.jpg

 

Please aasist.

0 Kudos
Message 3 of 6
(5,168 Views)

I think I understand your question now, drmotsei.

 

What method are you currently using to log data to Excel?

Chris
0 Kudos
Message 4 of 6
(5,159 Views)

In any case, I think the following link will help you find examples of writing data to multiple sheets within the same Excel file:

 

http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:ex/q/excel%20write/

Chris
0 Kudos
Message 5 of 6
(5,149 Views)

Thanks a lot Chris. much appreciated.

 

Will try to work around the examples you gave and will be in touch again.

 

Drmotsei

0 Kudos
Message 6 of 6
(5,140 Views)