This commit is contained in:
Looly 2021-12-05 23:47:17 +08:00
parent 3fefdf5151
commit 41532e0a4d
2 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 5.7.17 (2021-12-01)
# 5.7.17 (2021-12-05)
### 🐣新特性
* 【core 】 增加AsyncUtilpr#457@Gitee
@ -41,6 +41,8 @@
* 【poi 】 修复SoapClient参数未使用问题
* 【core 】 修复HashUtil.cityHash128参数未使用问题
* 【core 】 修复DateUtil.formatChineseDate显示问题issue#I4KK5F@Gitee
* 【poi 】 修复CellUtil.setCellValuestyle空导致值无法写入问题issue#1995@Github
* 【poi 】 修复CellUtil.setComment参数设置错误问题
-------------------------------------------------------------------------------------------------------------

View File

@ -162,9 +162,9 @@ public class CellUtil {
*/
public static void setCellValue(Cell cell, Object value, CellStyle style) {
setCellValue(cell, (CellSetter) cell1 -> {
setCellValue(cell, value);
if (null != style) {
cell1.setCellStyle(style);
setCellValue(cell, value);
}
});
}
@ -175,7 +175,7 @@ public class CellUtil {
* 当为头部样式时默认赋值头部样式但是头部中如果有数字日期等类型将按照数字日期样式设置
*
* @param cell 单元格
* @param value
* @param value {@link CellSetter}
* @since 5.6.4
*/
public static void setCellValue(Cell cell, Object value) {
@ -402,7 +402,7 @@ public class CellUtil {
}
Comment comment = drawing.createCellComment(anchor);
comment.setString(factory.createRichTextString(commentText));
comment.setAuthor(StrUtil.nullToEmpty(commentText));
comment.setAuthor(StrUtil.nullToEmpty(commentAuthor));
cell.setCellComment(comment);
}