Skip to content

Commit

Permalink
roll back code
Browse files Browse the repository at this point in the history
  • Loading branch information
whoishower committed May 26, 2023
1 parent c07a3d9 commit 4323a98
Showing 1 changed file with 5 additions and 32 deletions.
37 changes: 5 additions & 32 deletions hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1105,49 +1105,22 @@ public ExcelWriter writeRow(Iterable<?> rowData) {
* @since 5.1.4
*/
public ExcelWriter writeCellValue(String locationRef, Object value) {
return writeCellValue(locationRef, value, false);
}

/**
* 给指定单元格赋值,使用默认单元格样式
*
* @param locationRef 单元格地址标识符,例如A11,B5
* @param value 值
* @param isHeader 是否为Header
* @return this
* @since 5.1.4
*/
public ExcelWriter writeCellValue(String locationRef, Object value, boolean isHeader) {
final CellLocation cellLocation = ExcelUtil.toLocation(locationRef);
return writeCellValue(cellLocation.getX(), cellLocation.getY(), value, isHeader);
return writeCellValue(cellLocation.getX(), cellLocation.getY(), value);
}

/**
* 给指定单元格赋值,使用默认单元格样式
*
* @param x X坐标,从0计数,即列号
* @param y Y坐标,从0计数,即行号
* @param value
* @param x X坐标,从0计数,即列号
* @param y Y坐标,从0计数,即行号
* @param value 值
* @return this
* @since 4.0.2
*/
public ExcelWriter writeCellValue(int x, int y, Object value) {
return writeCellValue(x, y, value, false);
}

/**
* 给指定单元格赋值,使用默认单元格样式
*
* @param x X坐标,从0计数,即列号
* @param y Y坐标,从0计数,即行号
* @param value 值
* @param isHeader 是否为Header
* @return this
* @since 4.0.2
*/
public ExcelWriter writeCellValue(int x, int y, Object value, boolean isHeader) {
final Cell cell = getOrCreateCell(x, y);
CellUtil.setCellValue(cell, value, this.styleSet, isHeader);
CellUtil.setCellValue(cell, value, this.styleSet, false);
return this;
}

Expand Down

0 comments on commit 4323a98

Please sign in to comment.