Author: centic
Date: Thu Sep 28 13:12:32 2017
New Revision: 1809988
URL: http://svn.apache.org/viewvc?rev=1809988&view=rev
Log:
Bug 61082: Adjust JavaDoc for getFirst/LastRow/Cell to explain that there might
be empty rows/cells included in the counts
Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/Row.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Row.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Row.java?rev=1809988&r1=1809987&r2=1809988&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Row.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Row.java Thu Sep 28 13:12:32
2017
@@ -118,6 +118,11 @@ public interface Row extends Iterable<Ce
/**
* Get the number of the first cell contained in this row.
*
+ * Note: cells which had content before and were set to empty later might
+ * still be counted as cells by Excel and Apache POI, so the result of this
+ * method will include such rows and thus the returned value might be lower
+ * than expected!
+ *
* @return short representing the first logical cell in the row,
* or -1 if the row does not contain any cells.
*/
@@ -139,6 +144,11 @@ public interface Row extends Iterable<Ce
* }
* </pre>
*
+ * Note: cells which had content before and were set to empty later might
+ * still be counted as cells by Excel and Apache POI, so the result of this
+ * method will include such rows and thus the returned value might be
higher
+ * than expected!
+ *
* @return short representing the last logical cell in the row <b>PLUS
ONE</b>,
* or -1 if the row does not contain any cells.
*/
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java?rev=1809988&r1=1809987&r2=1809988&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java Thu Sep 28
13:12:32 2017
@@ -91,7 +91,12 @@ public interface Sheet extends Iterable<
int getPhysicalNumberOfRows();
/**
- * Gets the first row on the sheet
+ * Gets the first row on the sheet.
+ *
+ * Note: rows which had content before and were set to empty later might
+ * still be counted as rows by Excel and Apache POI, so the result of this
+ * method will include such rows and thus the returned value might be lower
+ * than expected!
*
* @return the number of the first logical row on the sheet (0-based)
*/
@@ -100,6 +105,11 @@ public interface Sheet extends Iterable<
/**
* Gets the last row on the sheet
*
+ * Note: rows which had content before and were set to empty later might
+ * still be counted as rows by Excel and Apache POI, so the result of this
+ * method will include such rows and thus the returned value might be
higher
+ * than expected!
+ *
* @return last row contained n this sheet (0-based)
*/
int getLastRowNum();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]