以下是代码,请帮看下哪里出错?
procedure TForm1.FormCreate(Sender: TObject);
var
excelapp:variant;
m:integer;
begin
excelapp:=createoleobject('excel.application');
excelapp.visible:=false;
excelapp.DisplayAlerts:=False;
excelapp.workbooks.open('e:\11.xls');
m:=excelapp.sheet[1].usedrange.rows.count;
showmessage(inttostr(m));end;
报错“无效的类别字符串”,应该如何解决?
procedure TForm1.FormCreate(Sender: TObject);
var
excelapp:variant;
m:integer;
begin
excelapp:=createoleobject('excel.application');
excelapp.visible:=false;
excelapp.DisplayAlerts:=False;
excelapp.workbooks.open('e:\11.xls');
m:=excelapp.sheet[1].usedrange.rows.count;
showmessage(inttostr(m));end;
报错“无效的类别字符串”,应该如何解决?
解决方案 »
- delphi Socket Error #10061 connection refused
- [姹傚姪--鎬?]濡備綍寤虹珛"鍩轰簬ip缃戝拰瀹炴椂鏁版嵁搴撶殑杩滅▼娓╂箍搴︾洃娴嬪拰鎶ヨ绯荤粺"
- 跪求~~~(delphi 做的P2P原码)
- Listview自画添加编辑框问题,有点小难度。
- 今天辞职了,散分~,我好象很久都没有散过分啦
- Delphi做好,再输送到Excel打印,请问如何实现.
- 急!!!CheckListbox的边框颜色和滚动条问题!!(在线等待)
- 请问一个问题!
- dbchart 如何改变柱状图的柱子的大小?
- 那里有BC++企业版下载。
- windows2000如何启动Socket服务
- 公司难道都是这样的吗?
[Error] Unit1.pas(43): Undeclared identifier: 'ReadOnly'