G
gywlily
Unregistered / Unconfirmed
GUEST, unregistred user!
我得程序:
procedure TForm1.Button1Click(Sender: TObject);
const
xlWBATWorksheet = -4167;
begin
//coinitialize(nil);
try
app := createoleobject('excel.application');
app.visible := true;
app.worksheets.add; //执行到此出错!!!
app.worksheets.add(xlWBATWorksheet);
except
if not varisempty(app) then begin
app.DisplayAlerts := false;
app.quit;
end;
end;
end;
请各位执教为何出错,谢谢拉
procedure TForm1.Button1Click(Sender: TObject);
const
xlWBATWorksheet = -4167;
begin
//coinitialize(nil);
try
app := createoleobject('excel.application');
app.visible := true;
app.worksheets.add; //执行到此出错!!!
app.worksheets.add(xlWBATWorksheet);
except
if not varisempty(app) then begin
app.DisplayAlerts := false;
app.quit;
end;
end;
end;
请各位执教为何出错,谢谢拉