为什么 Win32::OLE 在 Win2003 下无法与 Excel2003 对话?

发布于 2024-07-11 20:45:27 字数 525 浏览 11 评论 0原文

我有一个基于 Web 的 Perl Win32::OLE 脚本,它在服务器端使用 Excel。 它已经在运行 Excel2000 的 Win2000 服务器上愉快地工作了很多年。 我们最近升级到 Win2003/Excel2003,现在我从脚本中收到以下错误:

 Win32::OLE(0.1709) error 0x80070005: "Access is denied" at create_worksheet_lib.plx line 639
eval {...} called at create_worksheet_lib.plx line 639

第 639 行是:

$Excel = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start Excel";

看来 Perl 不再能够访问 Excel。 有没有 Windows 专家可以帮助解决这个问题?

I have a Web-based Perl Win32::OLE script that uses Excel on the server side. It has been working happily for years on a Win2000 server running Excel2000. We recently upgraded to Win2003/Excel2003 and I now get the following error from the script:

 Win32::OLE(0.1709) error 0x80070005: "Access is denied" at create_worksheet_lib.plx line 639
eval {...} called at create_worksheet_lib.plx line 639

line 639 is:

$Excel = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start Excel";

It appears that Perl no longer has access to Excel. Any Windows gurus out there that might be able to help trouble shoot this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦醒灬来后我 2024-07-18 20:45:28

似乎与 中描述的同样邪恶的问题另一篇文章,但是,没有找到解决方案...

也许使用 Procmon 进行故障排除将揭示问题所在(请参阅 http://support.microsoft.com/kb/286198)。

Seems like the same wicked problem described in another post, however, no solution found...

Maybe troubleshooting with Procmon will reveal where the problem lies (see http://support.microsoft.com/kb/286198).

℉絮湮 2024-07-18 20:45:28

您可以从服务器上的命令行运行该脚本(将 Web 服务器排除在外)吗? 这是我要尝试的第一件事。 如果它可以从命令行运行,那么可能是权限问题或 Web 服务器配置问题。

Can you run the script from a command line on the server (taking the web server out of the mix)? That's the first thing I'd try. If it works from the command line then it's probably a permissions issue or a web server configuration issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文