我已经从 NuGet 安装了 OpenXML 2.5 包,但它缺少 OpenXML.Extensions 引用。
已经尝试查找搜索 google 和 nuget 但没有成功。
我在哪里可以得到这个?
最佳答案
如果您正在寻找 OpenXML 2.5 的官方 MS 实现,则需要从以下链接下载它。目前没有官方的 NuGet 包。
根据以下 MSDN 论坛帖子,NuGet 上的 OpenXML 2.5 包不是官方的,这可能解释了为什么您缺少一些引用。
更新:
不确定这是否是您的意思,但 OpenXML 文档保存方法有一个重载以保存到流。
var memoryStream = new MemoryStream();
var x = new DocumentFormat.OpenXml.Wordprocessing.Document();
x.Save(memoryStream);
关于c# - 缺少 DocumentFormat.OpenXml.Extensions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21607468/