我正在使用 C# 阅读 MS Word 表格内容,但我不知道如何获取合并的单元格信息。像这样的表:
--------------------- | c(1,1)| c(1,2) | |-------------------- | c(2,1) | c(2,2)|单元格 c(3,1) 是合并单元格,但我无法获取信息。我的代码:
|-------------------- | c(3,1) | |-------------------|
for (int i = 1; i <= doc.Tables.Count; i++)
{
Microsoft.Office.Interop.Word.Table nowTable = doc.Tables[i];
for (int rowPos = 1; rowPos <= nowTable.Rows.Count; r
{
for (int columPos = 1; columPos <= nowTable.Colum)
{
String strContent = nowTable.Cell(rowPos, columPos).Range.Text;
}
}
}