| | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.XSSFPictureData; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * 标题行号 |
| | | */ |
| | | private CellType changeType; |
| | | |
| | | private Map<String, XSSFPictureData> pictureList; |
| | | /** |
| | | * 构造函数 |
| | | * @param--path 导入文件,读取第一个工作表 |
| | |
| | | this.sheet = this.wb.getSheetAt(sheetIndex); |
| | | this.headerNum = headerNum; |
| | | this.changeType = cellType; |
| | | this.pictureList = ExcelPictureUtil.getExcelPictures(in); |
| | | log.debug("Initialize success."); |
| | | } |
| | | |
| | |
| | | } |
| | | return val; |
| | | } |
| | | public Map<String,XSSFPictureData> getExcelPictures(){ |
| | | return this.pictureList; |
| | | } |
| | | |
| | | /** |
| | | * 获取导入数据列表 |