public abstract class ExcelExportUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
appendDataToExcelSheet(String excelFilePath,
int sheetIndex,
List<?> objLists,
String[] header,
String[] property) |
static void |
appendDataToExcelSheet(String excelFilePath,
int sheetIndex,
List<Object[]> objLists,
String[] header) |
static void |
appendDataToExcelSheet(String excelFilePath,
String sheetName,
List<?> objLists,
String[] header,
String[] property) |
static void |
appendDataToExcelSheet(String excelFilePath,
String sheetName,
List<Object[]> objLists,
String[] header) |
static void |
copyCell(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Cell srcCell,
org.apache.poi.ss.usermodel.Cell distCell)
复制单元格
|
static void |
copyCellStyle(org.apache.poi.ss.usermodel.CellStyle fromStyle,
org.apache.poi.ss.usermodel.CellStyle toStyle,
org.apache.poi.ss.usermodel.Workbook workbook) |
static void |
copyRow(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
int fromRowIndex,
int toRowIndex,
int copyRowNum,
Integer colNum) |
static void |
createNewRowsForSaveData(org.apache.poi.ss.usermodel.Sheet sheet,
int beginRow,
int nRowCount) |
static void |
generateExcel(OutputStream outputStream,
List<?> objLists,
Class<?> objType) |
static void |
generateExcel(OutputStream outputStream,
List<?> objLists,
String[] header,
String[] property)
生成Excel字节流
|
static void |
generateExcel(OutputStream outputStream,
List<Object[]> objLists,
String[] header) |
static void |
generateExcel(OutputStream outputStream,
String sheetName,
List<?> objLists,
Class<?> objType)
生成Excel字节流
|
static void |
generateExcel(OutputStream outputStream,
String sheetName,
List<?> objLists,
String[] header,
String[] property)
生成Excel字节流
|
static void |
generateExcel(OutputStream outputStream,
String sheetName,
List<Object[]> objLists,
String[] header)
生成Excel字节流
|
static void |
generateExcel2003(OutputStream outputStream,
List<?> objLists,
Class<?> objType) |
static void |
generateExcel2003(OutputStream outputStream,
List<?> objLists,
String[] header,
String[] property) |
static void |
generateExcel2003(OutputStream outputStream,
List<Object[]> objLists,
String[] header) |
static void |
generateExcel2003(OutputStream outputStream,
String sheetName,
List<?> objLists,
Class<?> objType)
生成Excel 2003 字节流
|
static void |
generateExcel2003(OutputStream outputStream,
String sheetName,
List<?> objLists,
String[] header,
String[] property)
生成Excel 2003字节流
|
static void |
generateExcel2003(OutputStream outputStream,
String sheetName,
List<Object[]> objLists,
String[] header)
生成Excel 2003字节流
|
static InputStream |
generateExcel2003Stream(List<?> objLists,
Class<?> objType) |
static InputStream |
generateExcel2003Stream(List<?> objLists,
String[] header,
String[] property) |
static InputStream |
generateExcel2003Stream(List<Object[]> objLists,
String[] header) |
static InputStream |
generateExcel2003Stream(String sheetName,
List<?> objLists,
Class<?> objType)
生成Excel 2003 字节流
|
static InputStream |
generateExcel2003Stream(String sheetName,
List<?> objLists,
String[] header,
String[] property)
生成Excel 2003字节流
|
static InputStream |
generateExcel2003Stream(String sheetName,
List<Object[]> objLists,
String[] header)
生成Excel 2003字节流
|
static void |
generateExcelByTemplate(String excelTemplateFilePath,
String excelFilePath,
int sheetIndex,
List<?> objects,
Map<Integer,String> fieldDesc,
int beginRow,
boolean createRow)
保存对象到 Excel 文件
|
static void |
generateExcelByTemplate(String excelTemplateFilePath,
String excelFilePath,
int sheetIndex,
List<Object[]> objects,
int beginCol,
int beginRow,
boolean createRow)
保存二维数组到 Excel 文件
|
static void |
generateExcelByTemplate(String excelTemplateFilePath,
String excelFilePath,
String sheetName,
List<?> objects,
Map<Integer,String> fieldDesc,
int beginRow,
boolean createRow)
保存对象到 Excel 文件
|
static void |
generateExcelByTemplate(String excelTemplateFilePath,
String excelFilePath,
String sheetName,
List<Object[]> objects,
int beginCol,
int beginRow,
boolean createRow)
保存二维数组到 Excel 文件
|
static void |
generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objLists,
Class<?> objType) |
static void |
generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objLists,
String[] header,
String[] property)
生成Excel字节流
|
static void |
generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<Object[]> objLists,
String[] header)
生成Excel字节流
|
static InputStream |
generateExcelStream(List<?> objLists,
Class<?> objType) |
static InputStream |
generateExcelStream(List<?> objLists,
String[] header,
String[] property) |
static InputStream |
generateExcelStream(List<Object[]> objLists,
String[] header) |
static InputStream |
generateExcelStream(String sheetName,
List<?> objLists,
Class<?> objType)
生成Excel字节流
|
static InputStream |
generateExcelStream(String sheetName,
List<?> objLists,
String[] header,
String[] property)
生成Excel字节流
|
static InputStream |
generateExcelStream(String sheetName,
List<Object[]> objLists,
String[] header)
生成Excel字节流
|
static Set<Integer> |
praiseColsRangeDesc(String mergeColCellDesc) |
static void |
saveObjectsToExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objects,
Map<Integer,String> fieldDesc,
int beginRow,
boolean createRow,
String mergeColCell) |
static void |
saveObjectsToExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<Object[]> objects,
int beginCol,
int beginRow,
boolean createRow,
String mergeColCell) |
static void |
setCellValue(org.apache.poi.ss.usermodel.Cell cell,
Object value) |
public static void generateExcel(OutputStream outputStream, String sheetName, List<?> objLists, String[] header, String[] property) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合header - Excel页头property - 需要显示的属性IOException - 文件操作异常public static void generateExcel(OutputStream outputStream, List<?> objLists, String[] header, String[] property) throws IOException
outputStream - 输出文件流objLists - 对象集合header - Excel页头property - 需要显示的属性IOException - 文件操作异常public static void generateExcel(OutputStream outputStream, String sheetName, List<Object[]> objLists, String[] header) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合header - Excel页头IOException - 文件操作异常public static void generateExcel(OutputStream outputStream, List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static void generateExcel(OutputStream outputStream, String sheetName, List<?> objLists, Class<?> objType) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合objType - 对象类型IOException - 文件操作异常public static void generateExcel(OutputStream outputStream, List<?> objLists, Class<?> objType) throws IOException
IOExceptionpublic static void generateExcel2003(OutputStream outputStream, String sheetName, List<?> objLists, String[] header, String[] property) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合header - Excel页头property - 需要显示的属性IOException - 文件操作异常public static void generateExcel2003(OutputStream outputStream, List<?> objLists, String[] header, String[] property) throws IOException
IOExceptionpublic static void generateExcel2003(OutputStream outputStream, String sheetName, List<Object[]> objLists, String[] header) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合header - Excel页头IOException - 文件操作异常public static void generateExcel2003(OutputStream outputStream, List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static void generateExcel2003(OutputStream outputStream, String sheetName, List<?> objLists, Class<?> objType) throws IOException
outputStream - 输出文件流sheetName - pageName 页面名称objLists - 对象集合objType - 对象类型IOException - 文件操作异常public static void generateExcel2003(OutputStream outputStream, List<?> objLists, Class<?> objType) throws IOException
IOExceptionpublic static InputStream generateExcelStream(String sheetName, List<?> objLists, String[] header, String[] property) throws IOException
sheetName - pageName 页面名称objLists - 对象集合header - Excel页头property - 需要显示的属性IOException - 文件操作异常public static InputStream generateExcelStream(List<?> objLists, String[] header, String[] property) throws IOException
IOExceptionpublic static InputStream generateExcelStream(String sheetName, List<Object[]> objLists, String[] header) throws IOException
sheetName - pageName 页面名称objLists - 对象集合header - Excel页头IOException - 文件操作异常public static InputStream generateExcelStream(List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static InputStream generateExcelStream(String sheetName, List<?> objLists, Class<?> objType) throws IOException
sheetName - pageName 页面名称objLists - 对象集合objType - 对象类型IOException - 文件操作异常public static InputStream generateExcelStream(List<?> objLists, Class<?> objType) throws IOException
IOExceptionpublic static InputStream generateExcel2003Stream(String sheetName, List<?> objLists, String[] header, String[] property) throws IOException
sheetName - pageName 页面名称objLists - 对象集合header - Excel页头property - 需要显示的属性IOException - 文件操作异常public static InputStream generateExcel2003Stream(List<?> objLists, String[] header, String[] property) throws IOException
IOExceptionpublic static InputStream generateExcel2003Stream(String sheetName, List<Object[]> objLists, String[] header) throws IOException
sheetName - pageName 页面名称objLists - 对象集合header - Excel页头IOException - 文件操作异常public static InputStream generateExcel2003Stream(List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static InputStream generateExcel2003Stream(String sheetName, List<?> objLists, Class<?> objType) throws IOException
sheetName - pageName 页面名称objLists - 对象集合objType - 对象类型IOException - 文件操作异常public static InputStream generateExcel2003Stream(List<?> objLists, Class<?> objType) throws IOException
IOExceptionpublic static void generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objLists,
Class<?> objType)
public static void generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objLists,
String[] header,
String[] property)
sheet - excel页面objLists - 对象集合header - Excel页头property - 需要显示的属性public static void generateExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<Object[]> objLists,
String[] header)
sheet - excel页面objLists - 对象数组集合header - Excel页头public static void createNewRowsForSaveData(org.apache.poi.ss.usermodel.Sheet sheet,
int beginRow,
int nRowCount)
public static void setCellValue(org.apache.poi.ss.usermodel.Cell cell,
Object value)
public static void saveObjectsToExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<?> objects,
Map<Integer,String> fieldDesc,
int beginRow,
boolean createRow,
String mergeColCell)
public static void saveObjectsToExcelSheet(org.apache.poi.ss.usermodel.Sheet sheet,
List<Object[]> objects,
int beginCol,
int beginRow,
boolean createRow,
String mergeColCell)
public static void generateExcelByTemplate(String excelTemplateFilePath, String excelFilePath, String sheetName, List<?> objects, Map<Integer,String> fieldDesc, int beginRow, boolean createRow) throws IOException
excelTemplateFilePath - 文件excelFilePath - 文件sheetName - sheet名称objects - 对象数组fieldDesc - 列和字段对应关系beginRow - 写入起始行createRow - 是否 创建(插入)行 还是直接覆盖IOException - 文件存储异常public static void generateExcelByTemplate(String excelTemplateFilePath, String excelFilePath, int sheetIndex, List<?> objects, Map<Integer,String> fieldDesc, int beginRow, boolean createRow) throws IOException
excelTemplateFilePath - 文件excelFilePath - 文件sheetIndex - sheet 索引objects - 对象数组fieldDesc - 列和字段对应关系beginRow - 写入起始行createRow - 是否 创建(插入)行 还是直接覆盖IOException - 文件存储异常public static void generateExcelByTemplate(String excelTemplateFilePath, String excelFilePath, String sheetName, List<Object[]> objects, int beginCol, int beginRow, boolean createRow) throws IOException
excelTemplateFilePath - 文件excelFilePath - 文件sheetName - sheet 名称objects - 二维数组beginCol - 写入起始列beginRow - 写入起始行createRow - 是否 创建(插入)行 还是直接覆盖IOException - 文件存储异常public static void generateExcelByTemplate(String excelTemplateFilePath, String excelFilePath, int sheetIndex, List<Object[]> objects, int beginCol, int beginRow, boolean createRow) throws IOException
excelTemplateFilePath - 文件excelFilePath - 文件sheetIndex - sheet 索引objects - 二维数组beginCol - 写入起始列beginRow - 写入起始行createRow - 是否 创建(插入)行 还是直接覆盖IOException - 文件存储异常public static void appendDataToExcelSheet(String excelFilePath, String sheetName, List<?> objLists, String[] header, String[] property) throws IOException, InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException
public static void appendDataToExcelSheet(String excelFilePath, int sheetIndex, List<?> objLists, String[] header, String[] property) throws IOException, InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException
public static void appendDataToExcelSheet(String excelFilePath, String sheetName, List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static void appendDataToExcelSheet(String excelFilePath, int sheetIndex, List<Object[]> objLists, String[] header) throws IOException
IOExceptionpublic static void copyRow(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
int fromRowIndex,
int toRowIndex,
int copyRowNum,
Integer colNum)
public static void copyCell(org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Cell srcCell,
org.apache.poi.ss.usermodel.Cell distCell)
workbook - excel工作簿srcCell - 源单元格distCell - 目标单元格public static void copyCellStyle(org.apache.poi.ss.usermodel.CellStyle fromStyle,
org.apache.poi.ss.usermodel.CellStyle toStyle,
org.apache.poi.ss.usermodel.Workbook workbook)
Copyright © 2025 江苏南大先腾信息产业股份有限公司. All rights reserved.