- 相关推荐
aspose.words解决实现文档格的中创word方法
代码如下所示:
复制代码 代码如下:
//Open document and create Documentbuilder
Aspose.Words.Document doc = new Aspose.Words.Document("demo.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
//Set table formating
//Set borders
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = Color.Red;
//Set left indent
builder.RowFormat.LeftIndent = 100;
// etc...
//Move documentBuilder cursor to the bookmark
builder.MoveToBookmark("myBookmark");
//Insert some table
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
builder.InsertCell();
builder.Write("this is cell");
}
builder.EndRow();
}
builder.EndTable();
//Save output document
doc.Save("demo2.doc");
【aspose.words解决实现文档格的中创word方法】相关文章:
在Word文档中给文章段落分栏的方法11-10
Word文档无法正常打开解决方法01-24
恢复受损Word文档的9种方法01-22
word停止工作的解决方法08-17
Word文档域功能详细介绍12-08
Word文档页面设置教程09-28