【发布时间】:2017-01-19 10:22:12
【问题描述】:
我在 .net API 中使用 Aspose.words 并遇到问题,使用此工具在 word 页脚中添加单独的表格。任何人都可以加快我这样做吗?
【问题讨论】:
-
另请参阅文档的以下部分:Working with Tables using Aspose.Words 我与 Aspose 一起担任开发人员宣传员。
标签: aspose aspose.words
我在 .net API 中使用 Aspose.words 并遇到问题,使用此工具在 word 页脚中添加单独的表格。任何人都可以加快我这样做吗?
【问题讨论】:
标签: aspose aspose.words
您可以使用以下代码在 Word 页脚中插入包含三个单元格的表格:
var doc = new Document();
var builder = new DocumentBuilder(doc)
{
PageSetup =
{
Orientation = Orientation.Portrait,
PaperSize = PaperSize.Letter
},
};
builder.MoveToHeaderFooter(Word.HeaderFooterType.FooterPrimary);
builder.StartTable();
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 1");
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 2");
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 3");
builder.EndTable();
builder.MoveToDocumentEnd();
【讨论】: