| | |
| | | //创建单个sheet |
| | | HSSFSheet sheet = wb.createSheet("bom信息"); |
| | | sheet.setColumnWidth(16,6000); |
| | | sheet.setDefaultRowHeight((short)(1000)); |
| | | //图片元素 |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | int rownum = 1; |
| | |
| | | copyFile(sourceFile,rootFace); |
| | | } |
| | | Row row=sheet.createRow(rownum+i+1); |
| | | row.setHeight((short)(1500)); |
| | | //row.setHeight((short)(1500)); |
| | | sheet.getRow(rownum+i+1).createCell(1).setCellValue(i+1); |
| | | sheet.getRow(rownum+i+1).createCell(2).setCellValue(bom.getParentCode()); |
| | | sheet.getRow(rownum+i+1).createCell(3).setCellValue(bom.getParentName()); |
| | |
| | | in.close(); |
| | | out.close(); |
| | | file.delete(); |
| | | ZipUtils.delDir(rootFace); |
| | | //ZipUtils.delDir(rootFace); |
| | | } catch (FileNotFoundException | UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |