File tree Expand file tree Collapse file tree
src/main/java/com/monitorjbl/xlsx/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,17 @@ public Cell getCell(int cellnum) {
6666 return cellMap .get (cellnum );
6767 }
6868
69+ /**
70+ * Gets the index of the last cell contained in this row <b>PLUS ONE</b>.
71+ *
72+ * @return short representing the last logical cell in the row <b>PLUS ONE</b>,
73+ * or -1 if the row does not contain any cells.
74+ */
75+ @ Override
76+ public short getLastCellNum () {
77+ return (short ) (cellMap .size () == 0 ? -1 : cellMap .size () + 1 );
78+ }
79+
6980 /* Not supported */
7081
7182 /**
@@ -116,14 +127,6 @@ public short getFirstCellNum() {
116127 throw new NotSupportedException ();
117128 }
118129
119- /**
120- * Not supported
121- */
122- @ Override
123- public short getLastCellNum () {
124- throw new NotSupportedException ();
125- }
126-
127130 /**
128131 * Not supported
129132 */
@@ -220,4 +223,4 @@ public int getOutlineLevel() {
220223 throw new NotSupportedException ();
221224 }
222225
223- }
226+ }
You can’t perform that action at this time.
0 commit comments