|
c#操作word表格(8) //wordDoc.Tables.Item(k).Cell(10, 4).Range.Text = (DT.Rows[i]["Label"].ToString()=="1"?"有":"无"); #endregion
#region 第十一行显示 wordDoc.Tables.Item(1).Cell(11,1).Merge(wordDoc.Tables.Item(1).Cell(11,2)); wordDoc.Tables.Item(1).Cell(11,3).Merge(wordDoc.Tables.Item(1).Cell(11,4)); ////****************** wordDoc.Tables.Item(1).Cell(11, 1).Range.Text = "cell111";
////****************** wordDoc.Tables.Item(1).Cell(11, 3).Range.Text = "cell113"; #endregion
#region 第十二行显示 wordDoc.Tables.Item(1).Cell(12,1).Merge(wordDoc.Tables.Item(1).Cell(12,2)); wordDoc.Tables.Item(1).Cell(12,3).Merge(wordDoc.Tables.Item(1).Cell(12,4)); ////****************** wordDoc.Tables.Item(1).Cell(12, 1).Range.Text = "cell121";
////****************** wordDoc.Tables.Item(1).Cell(12, 3).Range.Text = "cell123";
#endregion
#region 第十三行显示 wordDoc.Tables.Item(1).Cell(13,1).Merge(wordDoc.Tables.Item(1).Cell(13,2)); wordDoc.Tables.Item(1).Cell(13,3).Merge(wordDoc.Tables.Item(1).Cell(13,4));
////****************** wordDoc.Tables.Item(1).Cell(13, 1).Range.Text = "cell131";
////****************** wordDoc.Tables.Item(1).Cell(13, 3).Range.Text = "cell133"; #endregion
wordDoc.Tables.Item(1).Select();
|