Purpose
Check whether Excel is installed

Solution
Call up a JavaScript function that reads the "class identifier" entry of Excel in the Windows registry.

Example
We display a particular pushbutton if Excel is installed.

CallJS xl = excel_installed
if
V[xl]
   Pushbutton ...
endif

JavaScript function

// Check whether Excel is installed
function excel_installed() {

   // create shell object for registry access
   var WshShell = guixt.CreateObject("WScript.Shell");

    try {
        return  WshShell.RegRead("HKCR\\Excel.Application\\CLSID\\");
    }
    catch (err) {
        return "";
    };
};

 

Components
InputAssistant + Controls