]> source.dussan.org Git - poi.git/commitdiff
Add a note on how this is not the right way to make a string of your cell
authorNick Burch <nick@apache.org>
Thu, 16 Oct 2014 21:41:11 +0000 (21:41 +0000)
committerNick Burch <nick@apache.org>
Thu, 16 Oct 2014 21:41:11 +0000 (21:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1632438 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/usermodel/Cell.java

index 0a3f668cf45944c0f8867bb765b5208871679e32..528fa2730cb263ef8c7a68a23170b40782823f83 100644 (file)
@@ -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