- 相關(guān)推薦
aspose.words解決實現(xiàn)文檔格的中創(chuàng)word方法
代碼如下所示:
復(fù)制代碼 代碼如下:
//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解決實現(xiàn)文檔格的中創(chuàng)word方法】相關(guān)文章:
在Word文檔中給文章段落分欄的方法11-10
Word文檔無法正常打開解決方法01-24
關(guān)于Word打開WPS文檔成亂碼的解決方法07-22
恢復(fù)受損Word文檔的9種方法01-22
word停止工作的解決方法08-17
Word文檔域功能詳細(xì)介紹12-08
Word文檔頁面設(shè)置教程09-28