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

时间:2024-10-19 07:26:00 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方法】相关文章:

Word文档字数快速统计的方法09-02

《在WORD文档中插入图片》说课稿07-09

如何取消Word文档中的超链接11-19

Word轻松设置长文档的页眉页脚方法02-21

Word2007文档中显示文本动画的操作方法07-17

如何取消Word文档中的超链接呢09-23

word停止工作的解决方法08-18

word中输入分数的方法07-02

Word文档1.25倍行间距的设置方法12-27

如何给word文档加密08-02