W
wangfangzhen
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
var
mExcelApplication,mExcelWorkbook,mExcelWorkSheet:OleVariant;
begin
mExcelApplication:=createoleobject('Excel.Application');
mExcelApplication.Workbooks.Open(extractfilepath(application.ExeName)+'/Model.XLS',false);
mExcelApplication.Visible:=false;
mExcelWorkbook:=mExcelApplication.Workbooks[1];
mExcelWorkSheet := mExcelWorkbook.Sheets[1];
mExcelWorkSheet.Activate;
mExcelWorkSheet.Delete;
mExcelApplication.Workbooks[1].save;
mExcelApplication.Workbooks[1].Close;
mExcelApplication.Quit;
mExcelApplication:= unassigned;
但就是删除不掉,请高手指点一下
var
mExcelApplication,mExcelWorkbook,mExcelWorkSheet:OleVariant;
begin
mExcelApplication:=createoleobject('Excel.Application');
mExcelApplication.Workbooks.Open(extractfilepath(application.ExeName)+'/Model.XLS',false);
mExcelApplication.Visible:=false;
mExcelWorkbook:=mExcelApplication.Workbooks[1];
mExcelWorkSheet := mExcelWorkbook.Sheets[1];
mExcelWorkSheet.Activate;
mExcelWorkSheet.Delete;
mExcelApplication.Workbooks[1].save;
mExcelApplication.Workbooks[1].Close;
mExcelApplication.Quit;
mExcelApplication:= unassigned;
但就是删除不掉,请高手指点一下