我正在尝试创建一个带有标题的表格。我希望为表格占用的每个新页面重复此标题。如何在 C# 和 OpenXml 文字处理中做到这一点?
DocumentFormat.OpenXml.Packaging.WordprocessingDocument internalDoc =
DocumentFormat.OpenXml.Packaging.WordprocessingDocument.Open(stream, true);
var tables = wordDoc.MainDocumentPart.Document.Descendants<SdtBlock>().Where
( r => r.SdtProperties.GetFirstChild<Tag>().Val.Value.StartsWith(DATA_TABLE_TAG));
Table table = tables.Descendants<Table>().Single();
//Here can I set some property to repeat the header of the table?