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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX real-time with MS Excel

Hi All!
I am new to ActiveX things and have the following situation.
I want to accumulate data from different LABView Channels and write them into Excel (while Excel is open). I want to do this real-time and actually be able to see my values change in Excel. The row and column (E:16 or A:3 or whatever in Excel) need to be defined for each channel. I have to do it this way because it needs to function with an existing Excel program that calculates some results from the incoming values and then displays them in a graph (a pH-diagram for CO2).
I don't have any idea where to start and all examples and discussions seem to deal with writing to spreadsheets WITHOUT the speadsheet program actually being open. It seems no one actually looks at the spreadsheet while the data is being entered, and this is exactly what I need to do.
If anyone has some advice or an example where I can at least start off with logging one channel and see its values change in Excel during logging, it would be fantastic!
I work with LABView 8.2 and NIDAQ 8.3, but I don't have any other special toolkits or report generators and will not be allowed to buy anything else. I also do not have LABView Real-Time. I only have the standard LABView 8.2 and NIDAQ 8.3.

Any help or suggestions would be greatly appreciated!

Thanks all.

Charel Marais
0 Kudos
Message 1 of 3
(2,552 Views)

One starting point is to buy the Reporting Toolkit for Microsoft Office. This toolkit has a lot of the basic Active-X functions you will also need. On the other hand you can implement it for your own and I think you will need about 3 to 5 days as you said you are new to Active-X. You can ask your boss which is cheaper the toolkit or 5 days work.

 

Another thing you need in Excel is the installation of the VBA Documentation. You need this to know which properties and methods are available through the Active-X interface.

 

You are talking about real-time. Do not expect to have much more than 10 updates per second. Which is enough while looking on the display. And Excel has to do some work too. you have to decouple the DAQ loop and the Excel Update loop with a queue to get proper evenly distributed samples. The Active-X interface is far away from working with reliable response in term of runtime.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 3
(2,546 Views)
I would have to that it would not be your best interest to use this method. It would be a lot more stable for you to recreate the math and graphing functions in LV. it will take you longer to learn Active x then it would be to do it this way. But since you want to use excel.\

1. when using active x with excel the workbook is always "open" it is just not visual to you. All you have to do is set the make excel visible to true.
2. there is an example that ships with LV called write table to file. Have a look at this example. If you want to see it in action change the visible boolean constant to true.

For more information and some sample VI's and tool kits, you can go to the excel board .
This is a really good place to start when using active and excel. There are many examples and toolkits on there that are free and will help you greatly. Let me know when you have more questions or you have something for me to look at.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 3
(2,536 Views)