public class ExcelReader extends Object
限定符和类型 | 字段和说明 |
---|---|
protected static String |
dateFmtPattern |
protected static String |
dateTimeFmtPattern |
protected static org.apache.poi.ss.usermodel.DataFormatter |
formatter |
protected static org.slf4j.Logger |
logger |
构造器和说明 |
---|
ExcelReader() |
限定符和类型 | 方法和说明 |
---|---|
protected static String |
getCellValue(org.apache.poi.ss.usermodel.Cell cell) |
static void |
main(String[] args) |
static List<Map<String,String>> |
read(FileInputStream fis,
String extension)
读取excel文件(同时支持2003和2007格式)
|
static List<Map<String,String>> |
read(String fileName)
读取excel文件(同时支持2003和2007格式)
|
protected static List<Map<String,String>> |
readWorkbook(org.apache.poi.ss.usermodel.Workbook wb) |
protected static org.slf4j.Logger logger
protected static final org.apache.poi.ss.usermodel.DataFormatter formatter
public static List<Map<String,String>> read(FileInputStream fis, String extension) throws Exception
fis
- 文件输入流extension
- 文件名扩展名: xls 或 xlsx 不区分大小写Exception
- io异常等public static List<Map<String,String>> read(String fileName) throws Exception
fileName
- 文件名,绝对路径Exception
- io异常等protected static String getCellValue(org.apache.poi.ss.usermodel.Cell cell)
Copyright © 2015 jiucai.org. All rights reserved.