public class J4E extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> boolean |
appendExcel(File excel,
List<T> dataList,
J4EConf j4eConf) |
static String |
cellValue(org.apache.poi.ss.usermodel.Cell c,
J4EColumn jcol) |
static <T> List<T> |
fromExcel(InputStream in,
Class<T> objClz,
J4EConf j4eConf)
解析输入流, 按照j4eConf中的配置, 读取后返回objClz类型的数量列表
|
static <T> List<T> |
fromSheet(org.apache.poi.ss.usermodel.Sheet sheet,
Class<T> objClz,
J4EConf j4eConf,
boolean onlyHeader) |
static org.apache.poi.ss.usermodel.Sheet |
getSheet(org.apache.poi.ss.usermodel.Workbook wb,
Class<?> objClz,
J4EConf j4eConf) |
static org.apache.poi.ss.usermodel.Workbook |
loadExcel(InputStream in)
读取excel文件, 返回wb对象, 如果读取发生错误, 返回null
|
static <T> boolean |
matchExcel(InputStream in,
Class<T> objClz) |
static <T> T |
rowValue(org.apache.poi.ss.usermodel.Row row,
J4EConf j4eConf,
org.nutz.lang.Mirror<T> mc) |
static boolean |
saveExcel(OutputStream out,
org.apache.poi.ss.usermodel.Workbook wb)
保存excel文件, 返回保存是否成功
|
static <T> boolean |
toExcel(File excel,
List<T> dataList,
J4EConf j4eConf) |
static <T> boolean |
toExcel(OutputStream out,
List<T> dataList,
J4EConf j4eConf)
将给定的数据列表datalist, 按照j4eConf中的配置, 输出到out
|
static <T> boolean |
toExcel(org.apache.poi.ss.usermodel.Workbook wb,
OutputStream out,
List<T> dataList,
J4EConf j4eConf) |
public static <T> boolean toExcel(OutputStream out, List<T> dataList, J4EConf j4eConf)
out - 输出流objClz - 转换后的对象Class, 对应一行数据j4eConf - 转换配置(非必须, 可自动生成)public static <T> boolean toExcel(org.apache.poi.ss.usermodel.Workbook wb,
OutputStream out,
List<T> dataList,
J4EConf j4eConf)
public static <T> List<T> fromExcel(InputStream in, Class<T> objClz, J4EConf j4eConf)
in - 输入流objClz - 转换后的对象Class, 对应一行数据j4eConf - 转换配置(非必须, 可自动生成)public static <T> List<T> fromSheet(org.apache.poi.ss.usermodel.Sheet sheet, Class<T> objClz, J4EConf j4eConf, boolean onlyHeader)
public static <T> boolean matchExcel(InputStream in, Class<T> objClz)
public static <T> T rowValue(org.apache.poi.ss.usermodel.Row row,
J4EConf j4eConf,
org.nutz.lang.Mirror<T> mc)
public static org.apache.poi.ss.usermodel.Sheet getSheet(org.apache.poi.ss.usermodel.Workbook wb,
Class<?> objClz,
J4EConf j4eConf)
public static org.apache.poi.ss.usermodel.Workbook loadExcel(InputStream in)
excel - public static boolean saveExcel(OutputStream out, org.apache.poi.ss.usermodel.Workbook wb)
out - wb - Copyright © 2019. All rights reserved.