VSTO 是否在 Windows Azure 上运行?
我有一个将部署到 Windows Azure 的 Web 应用程序,并且我正在寻找生成 Excel 电子表格的替代方案。
我可以使用 VSTO 在 Windows Azure 上运行的 Web 角色中以编程方式生成 Excel 电子表格吗?...如果可以,我应该如何将应用程序部署到 Windows Azure?我应该包括哪些组件?
I have a Web application which will be deployed to Windows Azure and I'm looking for alternatives to generate Excel spreadsheets.
Can I use VSTO to programatically generate an Excel spreadsheet in a Web Role running on Windows Azure?... If yes, how should I deploy the application to Windows Azure? What assemblies should I include?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
乔尼和乔是正确的。 VSTO 不会在 Azure 上运行。
我相信您正在寻找Open XML SDK。这使您可以从 .NET 创建 Excel 或其他 Office 文件,而无需使用 Office 自动化。
编辑:当 Open XML SDK 不具备我可以通过直接访问 Office 应用的对象模型获得的功能时,我考虑了一个选项。在 Azure 外部设置一台计算机,该计算机通过处理来自 Azure 队列的消息,就像 Azure 辅助角色一样运行。由于该计算机上的应用程序可以设置为按顺序执行任务,因此如果您尝试从 Web 角色执行 Office 应用程序,您应该能够摆脱不建议执行的操作。该计算机可能位于您的数据中心,或者您可以使用 Azure VM 以便安装 Office。如果该 VM 正在创建和/或读取 Excel 文档,则只需使用 Azure Blob 存储来存储文档。
如果运行 Office 的计算机位于 Azure 外部,则进出 Azure 的所有数据都会产生额外的带宽成本。
Joni and Joe are correct. VSTO will not run on Azure.
I believe you're looking for the Open XML SDK. That lets you create Excel or other Office files from .NET without using Office automation.
Edit: Here's one option I have considered for those times when the Open XML SDK just doesn't have the functionality I can get from accessing an Office app's object model directly. Set up a machine outside of Azure that operates just as an Azure worker role would by processing messages from an Azure Queue. Since the app on that machine could be setup to execute tasks sequentially, you should be able to get away with things that wouldn't be advisable if you were trying to execute an Office app from a web role. This machine could be in your data center, or you could use an Azure VM so that you could install Office. If that VM was creating and/or reading Excel documents, then just use Azure Blob storage to store the documents.
If the machine running Office is outside of Azure, you will incur additional bandwidth costs for all the data coming in and out of Azure.
我对此进行了测试,显然它不起作用,VSTO 需要安装 Office。
I tested this and apparently it won't work, VSTO requires Office to be installed.
我已经使用 EPPlus 开源项目在 Azure 中成功生成了 Excel 电子表格。它构建于 OpenXML SDK 之上,但使用起来更加简单。
我已将代码部署到辅助角色而不是 Web 角色(根据 Lokad.CQRS for Azure 架构),以便预先生成报告,从而使应用程序更具可扩展性。 唯一需要的程序集是 Epplus.dll。
I've been successful with generating Excel Spreadsheets in Azure using EPPlus open source project. It builds on the OpenXML SDK, but is much simpler to use.
I've been deploying the code to Worker Role instead of Web Role (as per Lokad.CQRS for Azure architecture) in order to pregenerate reports, so that the application would be more scalable. And the only required assembly was the Epplus.dll.