首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

,win7,office2010下,不能打开excel

2012-03-14 
求助,win7,office2010下,不能打开excelpowerbuilder 9.0操作系统:win7office版本:microsoft excel starter

求助,win7,office2010下,不能打开excel
powerbuilder 9.0  
操作系统:win7  
office版本:microsoft excel starter 2010 


oleobject xlapp
xlapp = Create oleobject
ret = xlapp.connectToNewObject("Excel.application")
if ret < 0 then
messagebox("错误","连接到excel失败,请确认系统是否安装Excel")
messagebox("",string(ret))
end if

上面语句执行 ret 返回 -2 Class name not found

怎么办?
如果我安装上office2003,就可以通过,但是不想安装office2003.

[解决办法]
查一下VBA ,看看是不是EXCEL 更改了OLE 接入名称。
[解决办法]
试了试你的代码,没有问题,我是的office 2010 标准版

应该和你的office版本有关

热点排行