You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XWPFDocumentdoc=LoadDoc();// Get the maximum number of columns in the table// The current version can be obtained with this code,// but it is not reliable, and the table must have at least 1 row// without any horizontally merged cells// in order to correctly obtain the actual number of columns in the table.// ---> table.Rows.Max(r => r.GetTableCells().Count);intcolumnCount=doc.Tables[0].ColumnCount;// Get the visual number of columns in the row,// The effect of the merged cells on the number of columns// should be considered, assuming that the whole row is merged// and the number of columns in the changed row should be 1// The following code is equivalent to: doc.Tables[0].GetRow(0).GetTableCells().Count;intcolumnCountOfRow=doc.Tables[0].GetRow(0).VisualColumnCount;// Get all the cells of the row, if there is a merged cell// it should be regarded as unmerged cells,// assuming that the row has 3 columns, and merged into 1 cell,// the method should still return 3 cells// As I understand it, the current version of NPOI is visual cells (i.e., merged cells as one cell)IListcells=doc.Tables[0].GetRow(0).GetActualTableCells();
The text was updated successfully, but these errors were encountered:
NPOI Version Used
2.7.2
File Type
Use Case
The text was updated successfully, but these errors were encountered: