public class ExcelUtils extends Object
| 构造器和说明 |
|---|
ExcelUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
convertColCharIndexToIntIndex(String colIndex)
Convert excel column character index (such as 'A','B','AC') to integer index (0-based)
note: character index ignores case
eg: 'A' -> 0
'B' -> 1
'AC' -> 28
'aC' -> 28
'Ac' -> 28
|
static String |
convertColIntIndexToCharIndex(Integer index)
Convert excel column integer index (0-based) to character index (such as 'A','B','AC')
eg: 0 -> 'A'
1 -> 'B'
28 -> 'AC'
|
static void |
read(InputStream workbookInputStream,
ExcelReadSheetProcessor<?>... sheetProcessors)
parse excel file data to java object
|
static ExcelCellValue |
readCell(org.apache.poi.ss.usermodel.Cell cell)
convert Cell type to ExcelCellValue type
|
static void |
write(ExcelType fileType,
OutputStream outputStream,
ExcelWriteSheetProcessor<?>... sheetProcessors)
parse java object to excel file
|
static void |
write(InputStream template,
OutputStream outputStream,
ExcelWriteSheetProcessor<?>... sheetProcessors)
parse java object to excel file
|
static void |
writeCell(org.apache.poi.ss.usermodel.Cell cell,
Object val) |
public static void read(InputStream workbookInputStream, ExcelReadSheetProcessor<?>... sheetProcessors)
workbookInputStream - sheetProcessors - public static ExcelCellValue readCell(org.apache.poi.ss.usermodel.Cell cell)
cell - ExcelCellValuepublic static void write(InputStream template, OutputStream outputStream, ExcelWriteSheetProcessor<?>... sheetProcessors)
template - outputStream - sheetProcessors - public static void write(ExcelType fileType, OutputStream outputStream, ExcelWriteSheetProcessor<?>... sheetProcessors)
fileType - outputStream - sheetProcessors - public static void writeCell(org.apache.poi.ss.usermodel.Cell cell,
Object val)
public static int convertColCharIndexToIntIndex(String colIndex)
colIndex - column character indexconvertColIntIndexToCharIndex(java.lang.Integer)Copyright © 2016. All Rights Reserved.