类 ExcelHelper
- java.lang.Object
-
- net.sinodawn.framework.io.excel.ExcelHelper
-
public abstract class ExcelHelper extends Object
-
-
构造器概要
构造器 构造器 说明 ExcelHelper()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static booleancanConvertCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<?> targetType)static booleancontainCornerMark(String text)static <T> TgetCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<?> clazz, String propertyName)static <T> TgetCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<T> clazz)static <T extends BaseData>
List<T>readDataFromExcel(String filePath, int sheetIndex, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)static <T extends BaseData>
List<T>readDataFromExcel(String filePath, int sheetIndex, int headerRowIndex, int dataFromRowIndex, Class<T> clazz, String masterPropertyName)static <T extends BaseData>
List<T>readDataFromExcel(String filePath, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)static <T extends BaseData>
List<T>readDataFromExcel(String filePath, int headerRowIndex, int dataFromRowIndex, Class<T> clazz, String masterPropertyName)static <T extends BaseData>
List<T>readDataFromExcel(String filePath, String sheetName, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)static org.apache.poi.ss.usermodel.RichTextStringreplaceCornerMarkToText(String text, org.apache.poi.ss.usermodel.Workbook wb)static voidsetCellStringValue(String text, org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Workbook wb)static <T extends BaseData>
voidwriteAsExcel(File file, String name, SheetContext sheetContext, List<T> itemList)static <T extends BaseData>
FilePathDTOwriteImportFailureListAsExcel(String filePath, List<T> itemList, int headerIndex, int validIndex, String errorFileName)
-
-
-
方法详细资料
-
getCellValue
public static final <T> T getCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<T> clazz)
-
getCellValue
public static <T> T getCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<?> clazz, String propertyName)
-
canConvertCellValue
public static boolean canConvertCellValue(org.apache.poi.ss.usermodel.Cell cell, Class<?> targetType)
-
setCellStringValue
public static void setCellStringValue(String text, org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Workbook wb)
-
containCornerMark
public static boolean containCornerMark(String text)
-
replaceCornerMarkToText
public static org.apache.poi.ss.usermodel.RichTextString replaceCornerMarkToText(String text, org.apache.poi.ss.usermodel.Workbook wb)
-
writeAsExcel
public static <T extends BaseData> void writeAsExcel(File file, String name, SheetContext sheetContext, List<T> itemList)
-
writeImportFailureListAsExcel
public static <T extends BaseData> FilePathDTO writeImportFailureListAsExcel(String filePath, List<T> itemList, int headerIndex, int validIndex, String errorFileName)
-
readDataFromExcel
public static <T extends BaseData> List<T> readDataFromExcel(String filePath, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)
-
readDataFromExcel
public static <T extends BaseData> List<T> readDataFromExcel(String filePath, int headerRowIndex, int dataFromRowIndex, Class<T> clazz, String masterPropertyName)
-
readDataFromExcel
public static <T extends BaseData> List<T> readDataFromExcel(String filePath, int sheetIndex, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)
-
readDataFromExcel
public static <T extends BaseData> List<T> readDataFromExcel(String filePath, String sheetName, int headerRowIndex, int dataFromRowIndex, Class<T> clazz)
-
-