我可以在启用所有宏的情况下从 .cmd 脚本运行 Excel 吗?

发布于 2024-07-29 00:16:35 字数 56 浏览 12 评论 0 原文

如何从命令行/cmd 脚本运行 excel,这样如果我想在运行它的电子表格中启用宏,它就不会提示?

How can I run excel from command line / cmd script such that it doesn't prompt if I want to enable macros in the spreadsheet I am running it with?

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

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

发布评论

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

评论(2

单身狗的梦 2024-08-05 00:16:35

使用数字签名对宏进行签名可能会满足您的要求。 如果您已在电子表格中签署宏,则会提示打开该电子表格的用户:

“Foo.xls”包含 Acme Software, Inc. 的宏。宏可能包含病毒。 禁用宏通常是安全的,但如果宏是合法的,您可能会失去一些功能。

用户将获得通常的“禁用/启用宏”选择,但她还将获得一个奖励选项:

始终信任来自该发布者的宏。

如果用户选择该选项,她将永远不会再看到该文件或同一发布者签名的任何其他文件的提示。

Signing your macros with a digital signature may do what you want. If you've signed the macros in a spreadsheet, then a user who opens it is prompted:

"Foo.xls" contains macros by Acme Software, Inc. Macros may contain viruses. It is usually safe to disable macros, but if the macros are legitimate, you might lose some functionality.

The user will get the usual Disable / Enable Macros choice, but she will also get a bonus option:

Always trust macros from this publisher.

If the user selects that option, she will never see the prompt again for this file or any other signed by the same publisher.

夏日落 2024-08-05 00:16:35

提示是 Excel 设置,因此您需要进入 Excel 并更改安全设置。 您可以在 Excel 2007 中通过 Excel 选项 -> 更改它。 信任中心-> 信任中心设置-> 宏设置。

我不知道有什么方法可以通过命令行禁用此功能,而且我认为这样做没有意义,这对我来说听起来像是一个安全漏洞。

The prompt is an Excel settings so you'll need to go into Excel and change the security settings. You can change it in Excel 2007 through the Excel Options -> Trust center -> Trust center settings -> Macro Settings.

I don't know of a way to disable this through the command line, and I don't think it makes sense that you could, sounds like a security breach to me.

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