| | |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | public List<List<Object>> getListByExcel(InputStream in, String fileName) throws Exception { |
| | | public static List<List<Object>> getListByExcel(InputStream in, String fileName) throws Exception { |
| | | List<List<Object>> list = null; |
| | | |
| | | // 创建Excel工作薄 |
| | | Workbook work = this.getWorkbook(in, fileName); |
| | | Workbook work = getWorkbook(in, fileName); |
| | | if (null == work) { |
| | | throw new Exception("创建Excel工作薄为空!"); |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Workbook getWorkbook(InputStream inStr, String fileName) throws Exception { |
| | | public static Workbook getWorkbook(InputStream inStr, String fileName) throws Exception { |
| | | Workbook wb = null; |
| | | String fileType = fileName.substring(fileName.lastIndexOf(".")); |
| | | if (excel2003L.equals(fileType)) { |
| | |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("deprecation") |
| | | public Object getCellValue(Cell cell) { |
| | | public static Object getCellValue(Cell cell) { |
| | | try { |
| | | Object value = null; |
| | | |