This commit is contained in:
Looly 2020-06-10 16:00:34 +08:00
parent c4b2405325
commit fd6c023c78
2 changed files with 9 additions and 8 deletions

View File

@ -13,6 +13,7 @@
### Bug修复
* 【json 】 修复append方法导致的JSONConfig传递失效问题issue#906@Github
* 【core 】 修复CollUtil.subtractToList判断错误pr#915@Github
* 【poi 】 修复WordWriter写表格问题pr#914@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -1,19 +1,18 @@
package cn.hutool.poi.word;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.IterUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.map.MapUtil;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Word中表格相关工具
@ -69,6 +68,7 @@ public class TableUtil {
public static void writeRow(XWPFTableRow row, Object rowBean, boolean isWriteKeyAsHead) {
if (rowBean instanceof Iterable) {
writeRow(row, (Iterable<?>) rowBean);
return;
}
Map rowMap = null;