Author: nick
Date: Thu Oct 16 21:41:11 2014
New Revision: 1632438
URL: http://svn.apache.org/r1632438
Log:
Add a note on how this is not the right way to make a string of your cell
Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java?rev=1632438&r1=1632437&r2=1632438&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java Thu Oct 16
21:41:11 2014
@@ -110,8 +110,13 @@ public interface Cell {
/**
* Set the cells type (numeric, formula or string).
- * If the cell currently contains a value, the value will
- * be converted to match the new type, if possible.
+ * <p>If the cell currently contains a value, the value will
+ * be converted to match the new type, if possible. Formatting
+ * is generally lost in the process however.</p>
+ * <p>If what you want to do is get a String value for your
+ * numeric cell, <i>stop!</i>. This is not the way to do it.
+ * Instead, for fetching the string value of a numeric or boolean
+ * or date cell, use {@link DataFormatter} instead.</p>
*
* @throws IllegalArgumentException if the specified cell type is invalid
* @throws IllegalStateException if the current value cannot be converted
to the new type
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]