Reputation: 37672
How we can detect that MS Excel is installed in Silverlight 4 and C# ?
Can I use somehow this code or ??
dynamic excelApp;
excelApp = AutomationFactory.CreateObject("Excel.Application");
if (excelApp != null)
{
// MS Excel is installed!
}
Thank you!
Upvotes: 1
Views: 110
Reputation: 10357
check this registry path:
HKLM\Software\Microsoft\Office\12.0\Excel\InstallRoot::Path
Replace 12.0 (for Office 2007) with the corresponding version number:
Office 2000 - 9.0
Office XP - 10.0
Office 2003 - 11.0
Office 2007 - 12.0
Office 2010 - 14.0
check this link for more info.
Upvotes: 2