06-17-2010 03:12 PM - edited 06-17-2010 03:16 PM
Hi All,
Is there a way to check to see if Ms Excel is already installed on a given system? And is there a way to check for the current version of Excel? I'm running LV 8.6 w. Report Generation toolkit.
06-17-2010 03:33 PM
Automation Open will return error -2147221164 if excel is not installed
To get the version, use a property node to get the the Version property on the Excel._Application ref (the ref returned by the Automation Open call). I'm not sure of the correlation between version numbers and excel naming schemes, but i know that versions 11 and earlier and pre-Excel 2007.
Note that if you are using pre-2007 Excel, you should not save with a .xlsx extension or vice versa. neither old or new excel will know what to do with the file.
Whenever you have Excel issues, I recommend going to http://msdn.microsoft.com and searching for the function or idea you are having trouble with. You'll usually get some really good text programming examples that will get you where you need to go.
06-17-2010 04:46 PM
02-14-2018 08:59 AM
I tried this, using:
And picked "_Application". I always got Error 3005 (Automation Open: Object specified is not creatable), even on a computer with Excel installed.
I went back to select "Select ActiveX Class...", and switched on the "Show Creatable Objects Only" (very important). Now, "_Application" disappeared, but "Application (Excel.Application.16)" shows up. Using "Application..." works great.
By the way, these tools are on the Connectivity/ActiveX pallette.
I had also tried a .NET call, configured with Assembly="Microsoft.Office.Interop.Excel(15.0.0.0)", instantiating "ApplicationClass". That works great on a computer with Excel installed. But if I try to open the .vi on a development system without Excel, it has to search for (and can't find) Microsoft.Office.Interop.Excel.dll. And my particular use-case is for development environment only.