try
xlapp:=createoleobject('excel.application');
xlapp.visible:=false;
xlapp.workbooks.add(path+'/REPORT/baobiao.xls');
pp:=pp+1;
except
showmessage('没有安装EXCEL');
exit;
end;
xlapp.CommandBars['standard'].Visible := False;
xlapp.CommandBars['Formatting'].Visible := False;
xlapp.DisplayFormulaBar := False;
xlapp.CommandBars['Drawing'].Visible := False;
xlapp.ActiveWindow.Zoom := 100;
xlapp.CommandBars['Chart'].Visible := False;
xlapp.CommandBars['Clipboard'].Visible := False;
xlapp.CommandBars['Reviewing'].Visible := False;
xlapp.CommandBars['Visual Basic'].Visible := False;
xlapp.CommandBars['Control Toolbox'].Visible := False;
xlapp.CommandBars['Forms'].Visible := False;
xlapp.CommandBars['External Data'].Visible := False;
xlapp.CommandBars['PivotTable'].Visible := False;
xlapp.CommandBars['Picture'].Visible := False;
xlapp.CommandBars['WordArt'].Visible := False;
xlapp.CommandBars['Web'].Visible := False;
xlapp.DisplayStatusBar := False;
这是我以前用来调用EXCEL的程序。但是intraweb,好像没有ole控件,不能用。
我现在用ExcelApplication控件,但是不会隐藏工具栏(包括菜单栏)。上述程序出错