09-19-2012 07:53 PM
I am new to the ActiveX Excel functions, but I seem to be running into a problem with some of them -
I can run example1, and example2 no problem, but when I try to run the function 'excel get workbooks', it returns none, even though there are some open (the ones created by the examples).
I dug into the code, and it seems to rely on a password protected piece of code 'excel objectRepository' - and I beleive it is this piece of code that is failing, as it returns empty results when run.
As this objectRepository piece of code seems to be used in many excel functions - I'd like to get it going.
Unfortunately it is password protected, so I cannot dig into it.
I got the impression this piece of code depended on 'GOOP' - is this true, and if so, is this now included as part of LV 2011?
The funny thing is, I create my own activeX calls to get all workbooks, and then get the names of each workbook, and this works.
Can anyone using LV2011 and office 2007 (or similar LV/office combo) comment on whether excel get workbooks works for them?
Thanks in advance for any help or ideas.
09-20-2012 08:17 AM
What examples are you referring to?
09-20-2012 09:17 AM
I was referring to 'example2' that is provided with the excel functions (the excel functions are shown in action here)
I figured out part of the issue - it seems the 'excel get workbooks' function only returns workbooks it has created itself while the current VI has been running - it does not query the actual workbooks that excel has open, which was what I was expecting.
09-20-2012 09:45 AM
You said you figured out part of the issue. Is there still another?
09-20-2012 11:05 AM
Well, the remainder of the issue is -
If I want to get a list of all open work-books in excel, not just the ones created by these vis, how can I do that?
I can get the list or workboos another way - by using the low-level activex calls directly, but proble then is the workbook references returned by that are not compatible with the excel vis, as they use a custom reference/data-type to handle the excel files.
09-20-2012 12:57 PM
I cannot find the "excel get workbooks" function in the toolkit. Did you download the one that's posted in the second message in that thread, or a different version?
That library uses GOOP, and some GOOP stuff was included with LabVIEW. The GOOP object was designed to only keep track of the currently opened Excel application, and the currently opened workbook and the currently opened worksheet, as well as some other information. The individual VIs unbundle the information and make the ActiveX calls. NI's Report Generation Toolkit does the same thing - ultimately both have to eventually get down to the ActiveX calls. However, NI's Report Generation Toolkit is based on classes usinv LVOOP.
In terms of your issue, what are you trying to do with the other workbooks?
09-21-2012 06:18 AM
I downloaded it from this message:
(message 8, from EvenDeejay's attachment) - I did not find a link or page that gave the latest version - but this version has excel get workbooks -
The vi in the functions panel I see is here: