如何在保存excel文件时去掉是否保存的提示? 如何在保存excel文件时去掉是否保存的提示? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不行啊。method saved not suppported by automation object. 我是用SERVER组件,你用的是什么? 我想直接存一个xls文件。CreateOleObject('excel.application'); XlsApp.DisplayAlerts := True; Var ExlApp:OleVariant;ExlApp:=CreateOLEObject('Excel.Application'); ExlBook:=CreateOLEObject('Excel.Sheet'); ExlApp.Visible :=False;// True; ExlApp.DisplayAlerts := False; 不行啊。method displayalerts not suppported by automation object. 我在D5下var exlApp,et :OleVariant;begin exlapp:=createOleObject('excel.application'); exlapp.visible:=true; exlapp.workbooks.add(1); et:=excelapplication.workbooks[1].worksheets['sheet1']; et.cells.item[1,1]:='str'; et.saveas('c:\a.xls');end; var exlApp,et :OleVariant;begin exlapp:=createOleObject('excel.application'); exlapp.visible:=true; exlapp.workbooks.add(1); ExlApp.DisplayAlerts := False; et:=exlapp.workbooks[1].worksheets['sheet1']; et.cells.item[1,1]:='str'; et.saveas('c:\a.xls');倒数第三句有问题,我已在D6下通过。 unit Unit1;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,//Variants,Excel2000,OleSever, Dialogs, StdCtrls,Comobj;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private ExcelApplication,Sheet1:Variant; { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);begin try excelapplication:=CreateOleObject('excel.application'); except showmessage('sorry,你可能?color="#000000">]有安装Excel'); abort; end; Excelapplication.visible:=true; Excelapplication.workbooks.add(1);//(xlWBatWorkSheet); sheet1:=Excelapplication.workbooks[1].worksheets['sheet1']; sheet1.name:='Delphi控制Excel Chat'; sheet1.Cells.item[1,1]:='Excel Chat 范例'; sheet1.Cells.item[2,1]:='星期'; sheet1.Cells.item[2,2]:='星期一'; sheet1.Cells.item[2,3]:='星期二'; sheet1.Cells.item[2,4]:='星期三'; sheet1.Cells.item[2,5]:='星期四'; sheet1.Cells.item[2,6]:='星期五'; sheet1.Cells.item[2,7]:='星期六'; sheet1.Cells.item[2,8]:='星期日'; sheet1.Cells.item[3,1]:='销售量'; sheet1.Cells.item[3,2]:=115; sheet1.Cells.item[3,3]:=112; sheet1.Cells.item[3,4]:=156; sheet1.Cells.item[3,5]:=148; sheet1.Cells.item[3,6]:=132; sheet1.Cells.item[3,7]:=196; sheet1.Cells.item[3,8]:=162; sheet1.DisplayAlerts := False; sheet1.saveas('c:\a.xls');end;end.不行啊。method displayalerts not suppported by automation object.D5是否有这个属性啊 我的代码是在D6+OFF2000下通过,你的OFFICE是否是2000? sheet1.DisplayAlerts := False;改为 Excelapplication.DisplayAlerts := False; delphi中反射,如何调用dll中的函数? delphi如果从数据库读去图片,我做了整天都没做出来。 最新版FastMM4.76发布,但是使用有问题,请各位测试一下. 求用delphi开isapi源码 请问如何实现有选择性的查询??各位大虾请帮忙!! 一个致力于软件开发、软件企业管理和软件创业的专业论坛 求解,在线等待(分不限) SQL的外联接问题? 请问有没有api可以实现流的操作.有的话麻烦给我详细的参数意义.谢谢. listbox的text能够编辑的选项在哪里设置的啊!谢谢了! 如何在EXCEL中设置边框线??? ★★Delphi操作Excel,如何合并单元格,如何设置字体★★
ExlApp:OleVariant;
ExlApp:=CreateOLEObject('Excel.Application');
ExlBook:=CreateOLEObject('Excel.Sheet');
ExlApp.Visible :=False;// True;
ExlApp.DisplayAlerts := False;
var
exlApp,et :OleVariant;
begin
exlapp:=createOleObject('excel.application');
exlapp.visible:=true;
exlapp.workbooks.add(1);
et:=excelapplication.workbooks[1].worksheets['sheet1'];
et.cells.item[1,1]:='str';
et.saveas('c:\a.xls');
end;
exlApp,et :OleVariant;
begin
exlapp:=createOleObject('excel.application');
exlapp.visible:=true;
exlapp.workbooks.add(1);
ExlApp.DisplayAlerts := False;
et:=exlapp.workbooks[1].worksheets['sheet1'];
et.cells.item[1,1]:='str';
et.saveas('c:\a.xls');
倒数第三句有问题,我已在D6下通过。
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,//Variants,Excel2000,OleSever,
Dialogs, StdCtrls,Comobj;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
ExcelApplication,Sheet1:Variant;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
begin
try
excelapplication:=CreateOleObject('excel.application');
except
showmessage('sorry,你可能?color="#000000">]有安装Excel');
abort;
end;
Excelapplication.visible:=true;
Excelapplication.workbooks.add(1);//(xlWBatWorkSheet);
sheet1:=Excelapplication.workbooks[1].worksheets['sheet1'];
sheet1.name:='Delphi控制Excel Chat';
sheet1.Cells.item[1,1]:='Excel Chat 范例';
sheet1.Cells.item[2,1]:='星期';
sheet1.Cells.item[2,2]:='星期一';
sheet1.Cells.item[2,3]:='星期二';
sheet1.Cells.item[2,4]:='星期三';
sheet1.Cells.item[2,5]:='星期四';
sheet1.Cells.item[2,6]:='星期五';
sheet1.Cells.item[2,7]:='星期六';
sheet1.Cells.item[2,8]:='星期日';
sheet1.Cells.item[3,1]:='销售量';
sheet1.Cells.item[3,2]:=115;
sheet1.Cells.item[3,3]:=112;
sheet1.Cells.item[3,4]:=156;
sheet1.Cells.item[3,5]:=148;
sheet1.Cells.item[3,6]:=132;
sheet1.Cells.item[3,7]:=196;
sheet1.Cells.item[3,8]:=162;
sheet1.DisplayAlerts := False; sheet1.saveas('c:\a.xls');
end;
end.不行啊。method displayalerts not suppported by automation object.
D5是否有这个属性啊
Excelapplication.DisplayAlerts := False;