我有需要从 ASP.NET 应用程序在 Microsoft 字处理器中打开文档的要求。到目前为止,我能够显示所有文档,但我不确定如何在 ASP.NET 应用程序中打开文档。如果我需要执行更新和重定位等进一步操作,请告知并让我知道它在未来的前景中有多灵活。
最佳答案
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
http://support.microsoft.com/kb/257757
有第三方组件设计用于在服务器环境中处理 Office 文档。
Aspose 挺流行的,虽然我个人从来没用过
http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
更新
Open XML 在 ASP.Net 应用程序中受支持,是一个不错的选择(尽管我相信 Aspose 可能更容易使用)。请参阅@Seth 关于 Open XML 的回答,请参阅@Rob 关于 Aspose 与 Open XML 体验的回答。
关于c# - 是否可以在 ASP.NET 应用程序中打开 Word 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11316070/