vba 如何从 SharePoint 运行 Excel 宏?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18106440/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Run Excel macro from SharePoint?
提问by Spiderman
I have a document library in SharePoint.
我在 SharePoint 中有一个文档库。
I export to Excel and then run a macro stored in my personal workbook to manipulate the data.
我导出到 Excel,然后运行存储在我的个人工作簿中的宏来操作数据。
Can the macro be stored in SharePoint and run against Excel from there?
宏可以存储在 SharePoint 中并从那里针对 Excel 运行吗?
回答by LincM
When navigating to the file in Sharepoint, it's simple to open the file directly in Excel with live editing to Sharepoint, if you enable high frequency Autosave parameters in Excel (or globally across Office).
导航到 Sharepoint 中的文件时,如果您在 Excel 中(或在 Office 中全局启用)高频自动保存参数,则可以通过实时编辑直接在 Excel 中打开文件到 Sharepoint。
This will enable your in-document Macros to operate.
这将使您的文档内宏能够运行。
If your macros are stored external to the document itself, you may need to map these connections inside of Excel in the "Data" tab on the ribbon, then select "Connections" and select "Add", which will give you the Fie Explorer dialogue for you to choose where the connections (which can include macros, other Excel files, SQL databases etc) are to be maintained, and also allows you to refresh these as the source may be updated or moved. This can be in Sharepoint. Please make sure your permissions are correctly set for this.
如果您的宏存储在文档本身的外部,您可能需要在功能区的“数据”选项卡中将这些连接映射到 Excel 内部,然后选择“连接”并选择“添加”,这将为您提供 Fie Explorer 对话框供您选择要维护连接(可以包括宏、其他 Excel 文件、SQL 数据库等)的位置,还允许您在源可能更新或移动时刷新这些连接。这可以在 Sharepoint 中。请确保为此正确设置了您的权限。
The Office browser versions (i.e. Microsoft Word/Excel/PowerPoint Web App) don't support Macros (at least not as of or up to Office 2013).
Office 浏览器版本(即 Microsoft Word/Excel/PowerPoint Web App)不支持宏(至少从 Office 2013 开始或直到 Office 2013 为止)。