首页 新闻 会员 周边 捐助

反射调用Excel 急救!

0
悬赏园豆:20 [已关闭问题] 关闭于 2008-12-02 11:20

object hrexcel;

Type excelType = Type.GetTypeFromProgID("Excel.Application");
hrexcel = Activator.CreateInstance(excelType);
SetObjPeoperty(hrexcel,"Visible","true");
SetObjPeoperty(hrexcel,"UserControl","true");
object workbooks=GetObjPeoperty(hrexcel,"Workbooks");
object xBk =CallObjMethod(workbooks,"Add",new object[]{true});
object excelSheet=GetObjPeopertyWithParam(xBk,"Worksheets",new object[]{1});
object[] agr2 = new object[2] { 1, 1 };
object excelcellcell=GetObjPeopertyWithParam(excelSheet,"Cells",agr2);

为什么最后这个方法一直提示 未知的名称 ?请大家帮忙

小潘的主页 小潘 | 初学一级 | 园豆:15
提问于:2008-11-17 18:34
< >
分享
所有回答(2)
0

你再好好看看

飞少 | 园豆:205 (菜鸟二级) | 2008-11-17 19:59
0

Peoperty?

Anders Liu | 园豆:230 (菜鸟二级) | 2008-11-17 22:04
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册