我可以在启用所有宏的情况下从 .cmd 脚本运行 Excel 吗?
如何从命令行/cmd 脚本运行 excel,这样如果我想在运行它的电子表格中启用宏,它就不会提示?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何从命令行/cmd 脚本运行 excel,这样如果我想在运行它的电子表格中启用宏,它就不会提示?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
使用数字签名对宏进行签名可能会满足您的要求。 如果您已在电子表格中签署宏,则会提示打开该电子表格的用户:
用户将获得通常的“禁用/启用宏”选择,但她还将获得一个奖励选项:
如果用户选择该选项,她将永远不会再看到该文件或同一发布者签名的任何其他文件的提示。
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:
The user will get the usual Disable / Enable Macros choice, but she will also get a bonus option:
If the user selects that option, she will never see the prompt again for this file or any other signed by the same publisher.
提示是 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.