|
@@ -461,7 +461,7 @@ public class ExcelUtil<T> |
|
@@ -461,7 +461,7 @@ public class ExcelUtil<T> |
|
461
|
}
|
461
|
}
|
|
462
|
else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
462
|
else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
|
463
|
{
|
463
|
{
|
|
464
|
- val = dataFormatHandlerAdapter(val, attr);
|
464
|
+ val = dataFormatHandlerAdapter(val, attr, null);
|
|
465
|
}
|
465
|
}
|
|
466
|
else if (ColumnType.IMAGE == attr.cellType() && StringUtils.isNotEmpty(pictures))
|
466
|
else if (ColumnType.IMAGE == attr.cellType() && StringUtils.isNotEmpty(pictures))
|
|
467
|
{
|
467
|
{
|
|
@@ -1052,7 +1052,7 @@ public class ExcelUtil<T> |
|
@@ -1052,7 +1052,7 @@ public class ExcelUtil<T> |
|
1052
|
}
|
1052
|
}
|
|
1053
|
else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
1053
|
else if (!attr.handler().equals(ExcelHandlerAdapter.class))
|
|
1054
|
{
|
1054
|
{
|
|
1055
|
- cell.setCellValue(dataFormatHandlerAdapter(value, attr));
|
1055
|
+ cell.setCellValue(dataFormatHandlerAdapter(value, attr, cell));
|
|
1056
|
}
|
1056
|
}
|
|
1057
|
else
|
1057
|
else
|
|
1058
|
{
|
1058
|
{
|
|
@@ -1265,13 +1265,13 @@ public class ExcelUtil<T> |
|
@@ -1265,13 +1265,13 @@ public class ExcelUtil<T> |
|
1265
|
* @param excel 数据注解
|
1265
|
* @param excel 数据注解
|
|
1266
|
* @return
|
1266
|
* @return
|
|
1267
|
*/
|
1267
|
*/
|
|
1268
|
- public String dataFormatHandlerAdapter(Object value, Excel excel)
|
1268
|
+ public String dataFormatHandlerAdapter(Object value, Excel excel, Cell cell)
|
|
1269
|
{
|
1269
|
{
|
|
1270
|
try
|
1270
|
try
|
|
1271
|
{
|
1271
|
{
|
|
1272
|
Object instance = excel.handler().newInstance();
|
1272
|
Object instance = excel.handler().newInstance();
|
|
1273
|
- Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class });
|
|
|
|
1274
|
- value = formatMethod.invoke(instance, value, excel.args());
|
1273
|
+ Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class, Cell.class, Workbook.class });
|
|
|
|
1274
|
+ value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb);
|
|
1275
|
}
|
1275
|
}
|
|
1276
|
catch (Exception e)
|
1276
|
catch (Exception e)
|
|
1277
|
{
|
1277
|
{
|