CheckExcelInstalled.cs 335 B

12345678910111213141516
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace PrintSolution
  6. {
  7. public class CheckExcelInstalled
  8. {
  9. public static bool isExcelInstalled()
  10. {
  11. Type type = Type.GetTypeFromProgID("Excel.Application");
  12. return type != null;
  13. }
  14. }
  15. }