public class ExcelCommonJsonField extends Object
文件名:ExcelCommonJsonField.java
用途:定义excel模板类和excel写入工具中公用的字段及json定义方法,便于不同类之间的统一管理
编码时间:2022年10月24日 上午10:24:48
修改时间:2022年10月24日 上午10:24:48
Modifier and Type | Field and Description |
---|---|
static String |
KEY_BACKGROUND
标记json中的background字段
|
static String |
KEY_BORDER
标记json中的border字段
|
static String |
KEY_ORIENTATION
标记json中的orientation字段
|
static String |
KEY_TYPE
标记json中的type字段
|
Constructor and Description |
---|
ExcelCommonJsonField() |
Modifier and Type | Method and Description |
---|---|
static com.alibaba.fastjson.JSONObject |
getBorderJson(org.apache.poi.ss.usermodel.BorderStyle borderStyle,
OrientationType... orientationTypes)
该方法用于根据单元格边框样式和边框的位置,组合并返回边框样式json
|
public static final String KEY_BACKGROUND
public static final String KEY_TYPE
public static final String KEY_BORDER
public static final String KEY_ORIENTATION
public static com.alibaba.fastjson.JSONObject getBorderJson(org.apache.poi.ss.usermodel.BorderStyle borderStyle, OrientationType... orientationTypes)
该json的完整样式为:
{
"type":1,
"orientation":[0, 1, 2, 3]
}
borderStyle
- 单元格样式orientationTypes
- 添加边框的位置Copyright © 2024. All rights reserved.