标签:free pascal wps ket application
这个例子是讲 how to 调用桌面应用程序,比如:WPS电子表格
testCom.pas
program testCom; {$mode objfpc}{$H+} uses SysUtils,Variants,ComObj,ActiveX,Windows; const Com = 'KET.Application'; var App :Variant; wbook :Variant; Filename :WideString; begin if Assigned(InitProc) then TProcedure(InitProc); try App:= CreateOleObject(Com); App.Visible:= True; Filename:= App.GetOpenFilename('Excel Files (*.xls), *.xls'); if FileExists(Filename) then wbook:= App.Workbooks.Open(Filename); except writeln(' Open Error '); end; end.
标签:free pascal wps ket application
原文地址:http://blog.csdn.net/belldeep/article/details/45110349