| | |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.CommonUtil; |
| | | import com.whyc.util.FileUtil; |
| | | import com.whyc.util.Zip4jUtil; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.apache.poi.ss.usermodel.*; |
| | |
| | | //遍历解压后的文件夹路径,解析excel |
| | | System.out.println(filePath); |
| | | List<String> fileList = new ArrayList<>(); |
| | | |
| | | fileList = FileUtil.getStaticFilePath(parentFile,fileList); |
| | | for (int i = 0; i < fileList.size(); i++) { |
| | | String fileTempUrl = fileList.get(i); |
| | | //查询到xls数据 |
| | |
| | | Row row3 = sheet.getRow(3); |
| | | String productVersion = row3.getCell(5).getStringCellValue(); |
| | | for (int l = 8; l < lastRowNum-1; l++) { |
| | | Cell cellTemp = sheet.getRow(l).getCell(1); |
| | | cellTemp.setCellType(Cell.CELL_TYPE_STRING); |
| | | if(cellTemp.getStringCellValue().equals("")){ |
| | | break; |
| | | } |
| | | ComponentApproving approving = new ComponentApproving(); |
| | | approving.setCreateDate(new Date()); |
| | | |
| | |
| | | int cellValueInt = 0; |
| | | Double cellValueDouble = null; |
| | | if(m == 3){ |
| | | cellValueDouble = cell.getNumericCellValue(); |
| | | DecimalFormat decimalFormat = new DecimalFormat("0"); |
| | | cellValue = decimalFormat.format(cellValueDouble); |
| | | //cellValueDouble = cell.getNumericCellValue(); |
| | | //DecimalFormat decimalFormat = new DecimalFormat("0"); |
| | | //cellValue = decimalFormat.format(cellValueDouble); |
| | | cell.setCellType(Cell.CELL_TYPE_STRING); |
| | | cellValue = cell.getStringCellValue(); |
| | | } |
| | | else if(m ==7){ |
| | | cellValueDouble = cell.getNumericCellValue(); |