- uses
- ActiveX, comObj, ...;
- procedure TForm1.Button1Click(Sender: TObject);
- var
- ClassID: TCLSID;
- begin
- // 檢查電腦是否有安裝 Excel
- if not Succeeded(CLSIDFromProgID(PWideChar(WideString('Excel.Application')),ClassID)) then
- begin
- ShowMessage('請檢查電腦是否有安裝 Excel');
- end;
- end;
沒有留言:
張貼留言