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.
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.
09-24-2014 06:40 PM - edited 09-24-2014 06:43 PM
just a guess here Tim the method that loads that document into the ActiveX object is probably not performing to a point working and ni will not release it or there is a problem with the active x object self
okay Google speak still got a little bit of work to do
09-25-2014 09:32 AM
@elset191 wrote:
Are either of you well versed enough to know why we can't just display the Excel worksheets in the Document container? You can do it in Edit mode as Michael shows in the original post. It stands to reason you ought to be able to do this with some code.
I think this solution will work fine for us, but there's always something unsettling about not knowing why something fails.
The answer by smercurio_fc in the following thread should answer you question http://forums.ni.com/t5/LabVIEW/Labview-2010-activex-container-Excel-2007/td-p/1230155
It boils down to ActiveX control versus ActiveX interface.
09-25-2014 09:34 AM
Kudos for your superior site searching abilities.
11-03-2017 11:09 AM - edited 11-03-2017 11:13 AM
I realize that this is an old thread, but after not liking the solution presented here, I decided to reattempt this using LabVIEW 2015 and MS Office 2013 using the Microsoft Excel 15.0 Object Library Version 1.8 ActiveX Automation Objects.
I followed the same paradigm as the OP when creating the ActiveX Control. What I found, is that an ActiveX Container created from an Existing document cannot be interacted with. Same result as OP. However, when LabVIEW loads the control into memory, Excel is opened along with the Excel file that the control is linked to. Using this knowledge, I was able to programmatically get a reference to Excel. From the Application reference I was able to get the open workbook reference and modify the worksheet data and graph as expected.
Please download the Example VI and Excel Workbook. I have them saved in C:\Projects. I'm not sure how the file is linked but it would be best to start with the files there.
Please note, that you cannot save the workbook modified in memory to disk, it will create a file when saved, but I have been unsuccessful in reopening the file.
Open the VI and run the example and you should (crossing fingers) see the graph become populated with random data.