public class PoiCommon extends Object
| 构造器和说明 |
|---|
PoiCommon() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
charAdd(String charStr)
字母相加
|
static String |
convertToCellChar(Integer cellNum)
转换数字为坐标
|
static void |
copyFont(org.apache.poi.ss.usermodel.Font newFont,
org.apache.poi.ss.usermodel.Font oldFont)
拷贝样式
|
static void |
copyStyleAndFont(org.apache.poi.ss.usermodel.CellStyle newStyle,
org.apache.poi.ss.usermodel.Font newFont,
org.apache.poi.ss.usermodel.CellStyle oldStyle,
org.apache.poi.ss.usermodel.Font oldFont)
拷贝样式
|
static Integer[] |
coverRangeIndex(String location)
合并单元格转换
|
static void |
fillCellRefNums(int times)
填充几位字母的列, 如3 就是填充 A~ZZZ
|
static Map<String,Field> |
getAllFields(Class<?> t)
获取实体的所有字段
|
static int[] |
getMapRowColNum(List<Integer[]> indexLocation)
获取map规则最大列和行数
|
static boolean |
isMapData(Class<?> cls)
判断是否是Map型数据
|
public static Integer[] coverRangeIndex(String location)
location - 合并规则 如将1,1,A,A 或者 A1:3C 转换public static String convertToCellChar(Integer cellNum)
cellNum - 列坐标public static void fillCellRefNums(int times)
times - 填充多少列public static int[] getMapRowColNum(List<Integer[]> indexLocation)
indexLocation - 规则public static void copyStyleAndFont(org.apache.poi.ss.usermodel.CellStyle newStyle,
org.apache.poi.ss.usermodel.Font newFont,
org.apache.poi.ss.usermodel.CellStyle oldStyle,
org.apache.poi.ss.usermodel.Font oldFont)
newStyle - 新newFont - 新oldStyle - 旧oldFont - 旧public static void copyFont(org.apache.poi.ss.usermodel.Font newFont,
org.apache.poi.ss.usermodel.Font oldFont)
newFont - 新oldFont - 旧public static boolean isMapData(Class<?> cls)
cls - 数据类Copyright © 2023. All rights reserved.