Document doc = new Document("文檔路徑"); NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true); //獲取文檔中所有表格 Aspose.Words.Tables.Table tableTmp = allTables[0] as Aspose.Words.Tables.Table;//獲取第1個表格 Aspose.Words.Tables.Cell c = tableTmp.Rows[0].Cells[0];//獲取第一行第一個單元格 c.CellFormat.Shading.BackgroundPatternColor = System.Drawing.Color.Blue;//設置單元格背景色 tableTmp.Rows[0].Cells[0].Remove();//移除第一行第一個單元格 tableTmp.Rows[0].Cells.Insert(0, c); //將單元格c 插入第一行第一個單元格的位置