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版本有关