如 如云 Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-14 #2 首先创建 Excel 对象,使用ComObj: var ExcelID: Variant; ExcelID := CreateOleObject( 'Excel.Application' ); ExcelID.WorksSheets[ 'Sheet2' ].close; //关闭工作表 ExcelID.WorkBooks.Close; //关闭工作簿
首先创建 Excel 对象,使用ComObj: var ExcelID: Variant; ExcelID := CreateOleObject( 'Excel.Application' ); ExcelID.WorksSheets[ 'Sheet2' ].close; //关闭工作表 ExcelID.WorkBooks.Close; //关闭工作簿
衫 衫菜 Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-14 #3 但是,我是用的组件呀,是这样写的: ap1.Connect; ap1.Visible[0]:=true; ap1.Workbooks.Add(null, 0); bk1.ConnectTo(ap1.Workbooks[1]); st1.ConnectTo(bk1.Sheets[1] as _WorkSheet); st1.Delete;//这里它就问要不要确定什么的? //st1.close;这个属性没有 请问如何才能让我删除workssheets and workbooks呢?
但是,我是用的组件呀,是这样写的: ap1.Connect; ap1.Visible[0]:=true; ap1.Workbooks.Add(null, 0); bk1.ConnectTo(ap1.Workbooks[1]); st1.ConnectTo(bk1.Sheets[1] as _WorkSheet); st1.Delete;//这里它就问要不要确定什么的? //st1.close;这个属性没有 请问如何才能让我删除workssheets and workbooks呢?
R realLearning Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-14 #4 Application.DisplayAlerts = False
W wfzha Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-14 #5 这样就行了 ap1.Connect; ap1.Visible[0]:=true; ap1.Workbooks.Add(null, 0); bk1.ConnectTo(ap1.Workbooks[1]); st1.ConnectTo(bk1.Sheets[1] as _WorkSheet); st1.Cells.Item[1,1]:='sdfsd'; ap1.DisplayAlerts[0]:=False; st1.Delete;//这里它就问要不要确定什么的? ap1.DisplayAlerts[0]:=True; //st1.close;这个属性没有
这样就行了 ap1.Connect; ap1.Visible[0]:=true; ap1.Workbooks.Add(null, 0); bk1.ConnectTo(ap1.Workbooks[1]); st1.ConnectTo(bk1.Sheets[1] as _WorkSheet); st1.Cells.Item[1,1]:='sdfsd'; ap1.DisplayAlerts[0]:=False; st1.Delete;//这里它就问要不要确定什么的? ap1.DisplayAlerts[0]:=True; //st1.close;这个属性没有