three lines of code to check MS Excel is installed on PC

RegistryKey key = Registry.ClassesRoot;
			RegistryKey excelKey = key.OpenSubKey("Excel.Application");
			bool excelInstalled = excelKey == null ? false : true;

i forgot to say that you have to add Microsoft.Win32 namespace