Checking whether Excel is installed on the machine.
-
Hi all, How can my VB.NET program checks whether the MS Excel is installed on the machine. Is there any .NET library that let me to check whether particular application is installed on the computer? Thanks in advance.
You could do one of two things. 1) You could search for the installed files. Excel.exe 2) You could try an instance the excel object via com. Forever Developing
-
You could do one of two things. 1) You could search for the installed files. Excel.exe 2) You could try an instance the excel object via com. Forever Developing
Hi, I would like to try the second approach. However, how do I know I failed to create the COM instance is the error that the machine is not installed the MS Excel? Thanks for replying.
-
Hi, I would like to try the second approach. However, how do I know I failed to create the COM instance is the error that the machine is not installed the MS Excel? Thanks for replying.
Put the code in a Try/Catch block! Believe me, if Excel is not installed, it'll bomb as soon as you try to create the object. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Put the code in a Try/Catch block! Believe me, if Excel is not installed, it'll bomb as soon as you try to create the object. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks for reply. But there are many possible reasons for failing to create an instance of COM in TRY .. CATCH... How do I know that error is caused by the MS Excel not installed?
-
Thanks for reply. But there are many possible reasons for failing to create an instance of COM in TRY .. CATCH... How do I know that error is caused by the MS Excel not installed?
Yes there are and that's why you check for the exception type in the Catch code. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome