P
PLWang
Unregistered / Unconfirmed
GUEST, unregistred user!
http://www.delphibbs.com/delphibbs/dispq.asp?lid=759711
主要看了上面的帖子 但是自己做的时候还是问题多多
程序使用控件
ExcelApplication1.Connect;
ExcelApplication1.Visible[0]:=True;
// ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks.Add(EmptyParam,0));
// Temp_Worksheet:=ExcelWorkbook1.WorkSheets.Add(EmptyParam,EmptyParam,EmptyParam,EmptyParam,0) as _WorkSheet;
// ExcelWorkSheet1.ConnectTo(Temp_WorkSheet);
ExcelApplication1.Workbooks.Open ('E:/文档/汇总表20070320.xls',
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,0);
ExcelApplication1.WorkSheets[ 'Sheet1' ].Activate;
str := VarToStr(ExcelApplication1.Cells[1,4].Value);
ExcelApplication1.WorkBooks.Close;
ExcelApplication1.Quit;
ExcelApplication1.Disconnect;
showmessage(str);
[Error] Unit1.pas(45): Not enough actual parameters
[Error] Unit1.pas(47): Undeclared identifier: 'Activate'
open函数找原型或帮助找不到 但是看自动提示信息参数是全的
主要看了上面的帖子 但是自己做的时候还是问题多多
程序使用控件
ExcelApplication1.Connect;
ExcelApplication1.Visible[0]:=True;
// ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks.Add(EmptyParam,0));
// Temp_Worksheet:=ExcelWorkbook1.WorkSheets.Add(EmptyParam,EmptyParam,EmptyParam,EmptyParam,0) as _WorkSheet;
// ExcelWorkSheet1.ConnectTo(Temp_WorkSheet);
ExcelApplication1.Workbooks.Open ('E:/文档/汇总表20070320.xls',
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,0);
ExcelApplication1.WorkSheets[ 'Sheet1' ].Activate;
str := VarToStr(ExcelApplication1.Cells[1,4].Value);
ExcelApplication1.WorkBooks.Close;
ExcelApplication1.Quit;
ExcelApplication1.Disconnect;
showmessage(str);
[Error] Unit1.pas(45): Not enough actual parameters
[Error] Unit1.pas(47): Undeclared identifier: 'Activate'
open函数找原型或帮助找不到 但是看自动提示信息参数是全的