S
stzy
Unregistered / Unconfirmed
GUEST, unregistred user!
我在activeform中使用如下语句另存为EXCEL文件,怎么老是提示错误,请大家指教
if savedialog1.execute then
begin
fname:=savedialog1.filename;
// try
eclapp:=createoleobject('excel.application');
workbook:=createoleobject('excel.sheet');
// except
// end;
end;
//workbook:=eclapp.workbooks.add;
workbook.saveas(fname);
workbook.close;
if savedialog1.execute then
begin
fname:=savedialog1.filename;
// try
eclapp:=createoleobject('excel.application');
workbook:=createoleobject('excel.sheet');
// except
// end;
end;
//workbook:=eclapp.workbooks.add;
workbook.saveas(fname);
workbook.close;