通过OLE Automation编程,示例如下:
var
e:variant;
begin
try e:=createoleobject('excel.sheet');
except
messagedlg('Can not boot Microsoft Excel.',mtError,[mbOK],0);
exit;
end;
e.application.workbooks.open(OpenDialog1.FileName);
showmessage(e.application.cells[1,1].value);//
e.application.quit;
end;