Java Code Examples for org.jeecgframework.poi.excel.entity.params.ExcelImportEntity#setFormat()
The following examples show how to use
org.jeecgframework.poi.excel.entity.params.ExcelImportEntity#setFormat() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImportBaseService.java From autopoi with Apache License 2.0 | 5 votes |
public void getExcelField(String targetId, Field field, ExcelImportEntity excelEntity, Excel excel, Class<?> pojoClass) throws Exception { excelEntity.setName(getExcelName(excel.name(), targetId)); String fieldname = field.getName(); //update-begin-author:taoyan for:TASK #2798 【例子】导入扩展方法,支持自定义导入字段转换规则 excelEntity.setMethod(PoiPublicUtil.getMethod(fieldname, pojoClass, field.getType(),excel.importConvert())); //update-end-author:taoyan for:TASK #2798 【例子】导入扩展方法,支持自定义导入字段转换规则 if (StringUtils.isNotEmpty(excel.importFormat())) { excelEntity.setFormat(excel.importFormat()); } else { excelEntity.setFormat(excel.format()); } }
Example 2
Source File: ImportBaseService.java From jeasypoi with Apache License 2.0 | 5 votes |
public void getExcelField(String targetId, Field field, ExcelImportEntity excelEntity, Excel excel, Class<?> pojoClass) throws Exception { excelEntity.setName(getExcelName(excel.name(), targetId)); String fieldname = field.getName(); excelEntity.setMethod(PoiPublicUtil.getMethod(fieldname, pojoClass, field.getType())); if (StringUtils.isNotEmpty(excel.importFormat())) { excelEntity.setFormat(excel.importFormat()); } else { excelEntity.setFormat(excel.format()); } }
Example 3
Source File: ImportBaseService.java From easypoi with Apache License 2.0 | 5 votes |
public void getExcelField(String targetId, Field field, ExcelImportEntity excelEntity, Excel excel, Class<?> pojoClass) throws Exception { excelEntity.setName(getExcelName(excel.name(), targetId)); String fieldname = field.getName(); excelEntity.setMethod(PoiPublicUtil.getMethod(fieldname, pojoClass, field.getType())); if (StringUtils.isNotEmpty(excel.importFormat())) { excelEntity.setFormat(excel.importFormat()); } else { excelEntity.setFormat(excel.format()); } }