More javadocs for Cell.setCellType

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1550349 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2013-12-12 05:22:26 +00:00
parent 36a5196c2c
commit a7099fe6b7
2 changed files with 21 additions and 8 deletions

View File

@ -19,7 +19,10 @@ package org.apache.poi.hssf.usermodel;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.apache.poi.hssf.model.HSSFFormulaParser; import org.apache.poi.hssf.model.HSSFFormulaParser;
import org.apache.poi.hssf.model.InternalWorkbook; import org.apache.poi.hssf.model.InternalWorkbook;
@ -35,17 +38,22 @@ import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.record.RecordBase; import org.apache.poi.hssf.record.RecordBase;
import org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate; import org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate;
import org.apache.poi.hssf.record.common.UnicodeString; import org.apache.poi.hssf.record.common.UnicodeString;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.ptg.ExpPtg; import org.apache.poi.ss.formula.ptg.ExpPtg;
import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Comment;
import org.apache.poi.ss.usermodel.FormulaError;
import org.apache.poi.ss.usermodel.Hyperlink;
import org.apache.poi.ss.usermodel.RichTextString;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellReference; import org.apache.poi.ss.util.CellReference;
import org.apache.poi.ss.util.NumberToTextConverter; import org.apache.poi.ss.util.NumberToTextConverter;
import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.util.POILogger;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/** /**
* High level representation of a cell in a row of a spreadsheet. * High level representation of a cell in a row of a spreadsheet.
@ -254,7 +262,9 @@ public class HSSFCell implements Cell {
} }
/** /**
* set the cells type (numeric, formula or string) * 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.
* @see #CELL_TYPE_NUMERIC * @see #CELL_TYPE_NUMERIC
* @see #CELL_TYPE_STRING * @see #CELL_TYPE_STRING
* @see #CELL_TYPE_FORMULA * @see #CELL_TYPE_FORMULA

View File

@ -109,9 +109,12 @@ public interface Cell {
Row getRow(); Row getRow();
/** /**
* Set the cells type (numeric, formula or string) * 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.
* *
* @throws IllegalArgumentException if the specified cell type is invalid * @throws IllegalArgumentException if the specified cell type is invalid
* @throws IllegalStateException if the current value cannot be converted to the new type
* @see #CELL_TYPE_NUMERIC * @see #CELL_TYPE_NUMERIC
* @see #CELL_TYPE_STRING * @see #CELL_TYPE_STRING
* @see #CELL_TYPE_FORMULA * @see #CELL_TYPE_FORMULA