public class ExcelUtil extends Object
| 构造器和说明 |
|---|
ExcelUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.poi.hssf.usermodel.HSSFCell |
getCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex) |
static org.apache.poi.hssf.usermodel.HSSFCell |
getCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex,
org.apache.poi.ss.usermodel.CellStyle style) |
static org.apache.poi.ss.usermodel.CellStyle |
getCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
int fontHeight) |
static org.apache.poi.ss.usermodel.CellStyle |
getCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
String fontName,
int fontHeight) |
static org.apache.poi.hssf.usermodel.HSSFRow |
getRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex) |
static org.apache.poi.hssf.usermodel.HSSFCell |
gtCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex) |
static void |
setBorder(org.apache.poi.ss.usermodel.CellStyle css) |
static void |
setCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
Object value) |
static void |
setCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
Object value,
org.apache.poi.ss.usermodel.CellStyle style) |
static File |
write(String tempFilePath,
String targetFilePath,
List<?> list) |
static File |
write(String tempFilePath,
String targetFilePath,
String title,
List<org.apache.poi.ss.util.CellRangeAddress> rangeAddList,
List<?> rangeList,
List<?> list) |
static File |
write(String tempFilePath,
String targetFilePath,
String title,
List<String> remarkList,
List<?> list) |
static File |
write(String tempFilePath,
String targetFilePath,
String title,
List<String> remarkList,
List<org.apache.poi.ss.util.CellRangeAddress> rangeAddList,
List<?> rangeList,
List<?> list) |
static void |
writeForeach(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex,
List<Map<String,String>> mapList)
写入数据
|
static void |
writeForeachWithStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex,
List<Map<String,String>> mapList,
org.apache.poi.ss.usermodel.CellStyle style)
写入数据
|
public static String FONT_SONG
public static org.apache.poi.hssf.usermodel.HSSFRow getRow(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex)
public static org.apache.poi.hssf.usermodel.HSSFCell gtCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex)
public static org.apache.poi.hssf.usermodel.HSSFCell getCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex,
org.apache.poi.ss.usermodel.CellStyle style)
public static void setCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
Object value)
public static void setCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
Object value,
org.apache.poi.ss.usermodel.CellStyle style)
public static org.apache.poi.ss.usermodel.CellStyle getCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
int fontHeight)
public static org.apache.poi.ss.usermodel.CellStyle getCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
String fontName,
int fontHeight)
public static void setBorder(org.apache.poi.ss.usermodel.CellStyle css)
public static void writeForeach(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex,
List<Map<String,String>> mapList)
workbook - sheet - rowIndex - mapList - public static File write(String tempFilePath, String targetFilePath, List<?> list) throws Exception
tempFilePath - 模板路径targetFilePath - 导出路径list - 列表数据集合Exceptionpublic static File write(String tempFilePath, String targetFilePath, String title, List<String> remarkList, List<?> list) throws Exception
tempFilePath - 模板路径targetFilePath - 导出路径title - 文件标题list - 列表数据集合Exceptionpublic static File write(String tempFilePath, String targetFilePath, String title, List<org.apache.poi.ss.util.CellRangeAddress> rangeAddList, List<?> rangeList, List<?> list) throws Exception
Exceptionpublic static File write(String tempFilePath, String targetFilePath, String title, List<String> remarkList, List<org.apache.poi.ss.util.CellRangeAddress> rangeAddList, List<?> rangeList, List<?> list) throws Exception
tempFilePath - 模板路径targetFilePath - 导出路径title - 标题rangeAddList - 合并单元格rangeList - 合并单元格数据list - 列表数据集合Exceptionpublic static void writeForeachWithStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
Integer rowIndex,
List<Map<String,String>> mapList,
org.apache.poi.ss.usermodel.CellStyle style)
workbook - sheet - rowIndex - mapList - public static org.apache.poi.hssf.usermodel.HSSFCell getCell(org.apache.poi.hssf.usermodel.HSSFRow row,
Integer cellIndex)
Copyright © 2024. All rights reserved.