- 积分
- 582
- 明经币
- 个
- 注册时间
- 2002-9-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Excel sheet1被打开,但无"Sheet1"''Line'等字符.程序提示:找不到成员。请问?[br]下面是 Delphi程序代码
ExcelAppStr:='Excel.Application';
ExcelInstalled := True;
try
ExcelObj:=GetActiveOleobject(ExcelAppStr);
except
on EOleSysError do
ExcelAlreadyRunning:=false;
end;
if not ExcelAlreadyRunning then
try
ExcelObj:=CreateOleObject(ExcelAppStr);
except
begin
MessageDlg('没有安装Excel。', mtInformation, [mbok], 0);
ExcelInstalled := false;
end;
end;
if not ExcelInstalled then Exit ; // Terminate the Application
ExcelObj.Visible := True;
ExcelObj.Workbooks.add;
ExcelWorkSheet:=ExcelObj.ActiveWorkBook.Sheets('"Sheet1"');
ExcelWorkSheet.Cells[1,1].value:='Line';
ExcelWorkSheet.Cells[2,1].value:='Start';
ExcelWorkSheet.Cells[3,1].value:='End';
Excel sheet1被打开,但无"Sheet1"''Line'等字符
程序提示:找不到成员。请问? |
|