mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
reduce use of setCellType (#943)
This commit is contained in:
parent
11941cc4f7
commit
f9760568da
@ -111,7 +111,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
|
||||
* Use this to create new cells within the row and return it.
|
||||
* <p>
|
||||
* The cell that is returned is a {@link CellType#BLANK}. The type can be changed
|
||||
* either through calling {@code setCellValue} or {@code setCellType}.
|
||||
* either through calling {@code setCellValue} or {@code setCellFormula}.
|
||||
*
|
||||
* @param column - the column number this cell represents (zero-based)
|
||||
* @return Cell a high level representation of the created cell.
|
||||
@ -128,7 +128,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
|
||||
* Use this to create new cells within the row and return it.
|
||||
* <p>
|
||||
* The cell that is returned is a {@link CellType#BLANK}. The type can be changed
|
||||
* either through calling setCellValue or setCellType.
|
||||
* either through calling setCellValue or setCellFormula.
|
||||
*
|
||||
* @param column - the column number this cell represents (zero-based)
|
||||
* @return Cell a high level representation of the created cell.
|
||||
|
||||
@ -187,7 +187,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
|
||||
* Use this to create new cells within the row and return it.
|
||||
* <p>
|
||||
* The cell that is returned is a {@link CellType#BLANK}. The type can be changed
|
||||
* either through calling {@code setCellValue} or {@code setCellType}.
|
||||
* either through calling {@code setCellValue} or {@code setCellFormula}.
|
||||
* </p>
|
||||
* @param columnIndex - the column number this cell represents
|
||||
* @return Cell a high level representation of the created cell.
|
||||
|
||||
@ -71,7 +71,6 @@ class TestXSSFSheetShiftRowsAndColumns {
|
||||
final XSSFRow row = sheet.createRow(nRow);
|
||||
for (int nCol = 0; nCol < numCols; ++nCol) {
|
||||
final XSSFCell cell = row.createCell(nCol);
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.format(Locale.US, "Row %d col %d", nRow, nCol));
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> {
|
||||
* Use this to create new cells within the row and return it.
|
||||
* <p>
|
||||
* The cell that is returned is a {@link CellType#BLANK}. The type can be changed
|
||||
* either through calling <code>setCellValue</code> or <code>setCellType</code>.
|
||||
* either through calling <code>setCellValue</code> or <code>setCellFormula</code>.
|
||||
*
|
||||
* @param column - the column number this cell represents
|
||||
*
|
||||
@ -125,7 +125,7 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> {
|
||||
@Override
|
||||
public HSSFCell createCell(int column)
|
||||
{
|
||||
return this.createCell(column,CellType.BLANK);
|
||||
return this.createCell(column, CellType.BLANK);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,7 +133,7 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> {
|
||||
* <p>
|
||||
* The cell that is returned will be of the requested type.
|
||||
* The type can be changed either through calling setCellValue
|
||||
* or setCellType, but there is a small overhead to doing this,
|
||||
* or setCellFormula, but there is a small overhead to doing this,
|
||||
* so it is best to create the required type up front.
|
||||
*
|
||||
* @param columnIndex - the column number this cell represents
|
||||
|
||||
@ -30,7 +30,7 @@ public interface Row extends Iterable<Cell> {
|
||||
* Use this to create new cells within the row and return it.
|
||||
* <p>
|
||||
* The cell that is returned is a {@link CellType#BLANK}. The type can be changed
|
||||
* either through calling <code>setCellValue</code> or <code>setCellType</code>.
|
||||
* either through calling <code>setCellValue</code> or <code>setCellFormula</code>.
|
||||
*
|
||||
* @param column - the column number this cell represents
|
||||
* @return Cell a high level representation of the created cell.
|
||||
@ -44,7 +44,7 @@ public interface Row extends Iterable<Cell> {
|
||||
* <p>
|
||||
* The cell that is returned will be of the requested type.
|
||||
* The type can be changed either through calling setCellValue
|
||||
* or setCellType, but there is a small overhead to doing this,
|
||||
* or setCellFormula, but there is a small overhead to doing this,
|
||||
* so it is best to create of the required type up front.
|
||||
*
|
||||
* @param column - the column number this cell represents
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user