aspose.words解决实现文档格的中创word方法

时间:2020-12-10 12:22:12 office办公 我要投稿

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方法】相关文章:

1.用javascript打开word文档的方法

2.word文档中排版的两种方法

3.cad图纸转到word文档

4.word文档简洁版合同

5.Java中goto实现方法

6.浅析在Word2007中创建XML文档的技巧

7.在VBScript中实现函数的方法

8.word文档类自荐信

9.办公软件word文档使用技巧