【发布时间】:2014-11-25 04:31:36
【问题描述】:
我想使用 c sharp 代码中的 openxml 包编辑 doc 文件中表格行中的值。在这里,我展示了查找表的代码,但它给了我 null,如果我使用 default 而不是 firstordefault,那么它会给我异常,比如序列不包含任何元素。
DocumentFormat.OpenXml.Wordprocessing.Table table=doc.MainDocumentPart.Document.Body.Elements<DocumentFormat.OpenXml.Wordprocessing.Table>().FirstOrDefault();
谢谢。
【问题讨论】:
标签: c# openxml-sdk doc