LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to list all currently open Excel files with ActiveX?

Hello all!
 
I would like to program with ActiveX a way to retrieve a list (array of strings) of the filenames of the currently opened Excel files in windows. However, I am fairly new to the ActiveX/Excel business in LV and after hours looking at the "millions" of objects in the property nodes I give up and hope some kind soul here can help me. I couldn't find any information in this forum regarding the same issue, although some were close 🙂
 
I am using LV 7.1 without the Report Generation Toolkit.
 
Thanks!
/Goran
0 Kudos
Message 1 of 4
(3,703 Views)

Hi Goran,

Did you searched the Excel Forum here

You could also make a macro in Excel to make a file with a list of all open Excel files and call this from LV.

0 Kudos
Message 2 of 4
(3,670 Views)
Hi KC,
 
thanks for your reply. I have in fact been able to find the desired things in the ActiveX properties/methods for Excel in LabView. It took me some looong work going through the functions which I suspected to be the ones. Anyway, I post a little jpeg here of the code if someone ever needs the same functionality. What it does is that it checks how many Excel workbooks are open and controls if each of them matches the searched Excel filename, if one does, it is closed.
 
Enjoy 😉
/Goran
0 Kudos
Message 3 of 4
(3,649 Views)
Hi Goran,
 
Glad it is working for you.
 
If I am right you are checking if files are open with names you already know.
 
And yes wrestling with VBA function and methods is also not what like to do,  you know before you start that it will take hours to get a solution   Smiley Sad
 
Glad that we can solve most things in LabVIEW  Smiley Very Happy Smiley Very Happy Smiley Very Happy
0 Kudos
Message 4 of 4
(3,636 Views)