| | |
| | | if (ServletUtils.isNotNull(ltop_echart)) { |
| | | String[] url = ltop_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | }if (ServletUtils.isNotNull(rtop_echart)) { |
| | | } |
| | | if (ServletUtils.isNotNull(rtop_echart)) { |
| | | String[] url = rtop_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | }if (ServletUtils.isNotNull(lbottom_echart)) { |
| | | } |
| | | if (ServletUtils.isNotNull(lbottom_echart)) { |
| | | String[] url = lbottom_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | }if (ServletUtils.isNotNull(rbottom_echart)) { |
| | | } |
| | | if (ServletUtils.isNotNull(rbottom_echart)) { |
| | | String[] url = rbottom_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | } |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | | |
| | | HSSFSheet sheet = wb.createSheet("Sheet1"); |
| | | |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | |
| | |
| | | //LD9放电整组信息 |
| | | private void createLd9GroupInfo(HSSFWorkbook wb, Title title, String[][] datas,Battinf binf) { |
| | | HSSFSheet sheet1 = wb.createSheet("数据总览"); |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | int rownum = 1; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("电池组名称"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName()+"-"+binf.getBattGroupName()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName() + "-" + binf.getBattGroupName()); |
| | | rownum++; |
| | | |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue( "电池品牌:"+binf.getBattProducer()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue( "安装日期:"+formartDate(binf.getBattInUseDate(),"yyyy-MM-dd")); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue( "单体数量:"+binf.getMonCount()); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue( "单体电压:"+binf.getMonVolStd()+"V"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue( "单体标称容量:"+formartDouble(binf.getMonCapStd(),0)+"AH"); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue( "单体标称内阻:"+formartDouble(binf.getMonResStd(),3)+"mΩ"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue( "单体标称电导:"+formartDouble(binf.getMonSerStd(),0)); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("电池品牌:" + binf.getBattProducer()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("安装日期:" + formartDate(binf.getBattInUseDate(), "yyyy-MM-dd")); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("单体数量:" + binf.getMonCount()); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue("单体电压:" + binf.getMonVolStd() + "V"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue("单体标称容量:" + formartDouble(binf.getMonCapStd(), 0) + "AH"); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue("单体标称内阻:" + formartDouble(binf.getMonResStd(), 3) + "mΩ"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue("单体标称电导:" + formartDouble(binf.getMonSerStd(), 0)); |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue( "报告日期:"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(formartDate(new Date(),"yyyy-MM-dd HH:mm:ss")); |
| | | rownum+=2; |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("报告日期:"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(formartDate(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | rownum += 2; |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | |
| | | byte[] data = null; |
| | | // 读取图片字节数组 |
| | | try { |
| | | in = new FileInputStream(picroot+files[i].getName()); |
| | | in = new FileInputStream(picroot + files[i].getName()); |
| | | data = new byte[in.available()]; |
| | | in.read(data); |
| | | in.close(); |
| | |
| | | listbyte.add(data); |
| | | } |
| | | } |
| | | HSSFSheet sheet1 = wb.createSheet(ld9stop.getMonNum()+"#历史"+BattTestData.getTestType_4019(ld9stop.getTestType())+"信息表"); |
| | | HSSFSheet sheet1 = wb.createSheet(ld9stop.getMonNum() + "#历史" + BattTestData.getTestType_4019(ld9stop.getTestType()) + "信息表"); |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | HSSFPatriarch patriarch = sheet1.createDrawingPatriarch(); |
| | | int rownum = 1; |
| | | |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("电池组名称"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName()+"-"+binf.getBattGroupName()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName() + "-" + binf.getBattGroupName()); |
| | | rownum++; |
| | | |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue( "电池品牌:"+binf.getBattProducer()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue( "安装日期:"+formartDate(binf.getBattInUseDate(),"yyyy-MM-dd")); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue( "单体数量:"+binf.getMonCount()); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue( "单体电压:"+binf.getMonVolStd()+"V"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue( "单体标称容量:"+formartDouble(binf.getMonCapStd(),0)+"AH"); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue( "单体标称内阻:"+formartDouble(binf.getMonResStd(),3)+"mΩ"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue( "单体标称电导:"+formartDouble(binf.getMonSerStd(),0)); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("电池品牌:" + binf.getBattProducer()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("安装日期:" + formartDate(binf.getBattInUseDate(), "yyyy-MM-dd")); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("单体数量:" + binf.getMonCount()); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue("单体电压:" + binf.getMonVolStd() + "V"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue("单体标称容量:" + formartDouble(binf.getMonCapStd(), 0) + "AH"); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue("单体标称内阻:" + formartDouble(binf.getMonResStd(), 3) + "mΩ"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue("单体标称电导:" + formartDouble(binf.getMonSerStd(), 0)); |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue( "被测单体编号:#"+ld9stop.getMonNum()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue( "测试类型:"+BattTestData.getTestType_4019(ld9stop.getTestType())); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue( "测试时间:"+formartDate(ld9stop.getTestStarttime(),"yyyy-MM-dd HH:mm:ss")); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue( "测试电流:"+ld9stop.getTestCurr()+"A"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue( "测试时长:"+formatTestLong(ld9stop.getTestTimelong())); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue( "测试容量:"+formartDouble(ld9stop.getTestCap(),0)+"AH"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue( "终止原因:"+BattTestData.getStopType_4019(ld9stop.getTestStopreason())); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("被测单体编号:#" + ld9stop.getMonNum()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("测试类型:" + BattTestData.getTestType_4019(ld9stop.getTestType())); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("测试时间:" + formartDate(ld9stop.getTestStarttime(), "yyyy-MM-dd HH:mm:ss")); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue("测试电流:" + ld9stop.getTestCurr() + "A"); |
| | | sheet1.getRow(rownum).createCell(5).setCellValue("测试时长:" + formatTestLong(ld9stop.getTestTimelong())); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue("测试容量:" + formartDouble(ld9stop.getTestCap(), 0) + "AH"); |
| | | sheet1.getRow(rownum).createCell(7).setCellValue("终止原因:" + BattTestData.getStopType_4019(ld9stop.getTestStopreason())); |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue( "报告日期:"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(formartDate(new Date(),"yyyy-MM-dd HH:mm:ss")); |
| | | rownum+=2; |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("报告日期:"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(formartDate(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | rownum += 2; |
| | | |
| | | //画图 |
| | | if(listbyte!=null&&listbyte.size()>0){ |
| | | for(int i=0;i<listbyte.size();i++){ |
| | | if (listbyte != null && listbyte.size() > 0) { |
| | | for (int i = 0; i < listbyte.size(); i++) { |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue(picName.get(i).equals("测试容量") ? "单体测试容量柱状图" : picName.get(i)); |
| | | rownum++; |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, rownum, (short) 10, 25 * (i + 1)); |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, rownum, (short) 10, 25 * (i + 1)); |
| | | anchor.setAnchorType(3); |
| | | patriarch.createPicture(anchor,wb.addPicture(listbyte.get(i),HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | rownum+=25; |
| | | patriarch.createPicture(anchor, wb.addPicture(listbyte.get(i), HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | rownum += 25; |
| | | } |
| | | } |
| | | } |
| | |
| | | // 创建一个工作薄 |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | | HSSFSheet sheet1 = wb.createSheet("数据总表"); |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | // HSSFRow row = sheet1.createRow(2); |
| | | HSSFPatriarch patriarch = sheet1.createDrawingPatriarch(); |
| | | int rownum = 1; |
| | | |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("电池组名称"); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName()+"-"+binf.getBattGroupName()); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue(binf.getStationName() + "-" + binf.getBattGroupName()); |
| | | rownum++; |
| | | |
| | | sheet1.createRow(rownum); |
| | |
| | | //创建整组放电折线图 |
| | | private void createLD9AllGroupVolLine(HSSFWorkbook wb, List<byte[]> bytes1) { |
| | | HSSFSheet sheet = wb.createSheet("整组折线图"); |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | int picnum = 0; |
| | | int rownum = 0; |
| | | String[] picName = new String[]{ |
| | | "整组端电压折线图","多单体电流折线图","多单体电压折线图" |
| | | "整组端电压折线图", "多单体电流折线图", "多单体电压折线图" |
| | | }; |
| | | if(picName.length>0){ |
| | | for(int i=0;i<picName.length;i++){ |
| | | if (picName.length > 0) { |
| | | for (int i = 0; i < picName.length; i++) { |
| | | sheet.createRow(rownum); |
| | | sheet.getRow(rownum).createCell(1).setCellValue(picName[i]); |
| | | rownum++; |
| | | if(bytes1.size()>0){ |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, rownum, (short) 10, 25 * (picnum + 1)); |
| | | if (bytes1.size() > 0) { |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, rownum, (short) 10, 25 * (picnum + 1)); |
| | | anchor.setAnchorType(3); |
| | | patriarch.createPicture(anchor,wb.addPicture(bytes1.get(picnum),HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | patriarch.createPicture(anchor, wb.addPicture(bytes1.get(picnum), HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | } |
| | | picnum ++;rownum+=25; |
| | | picnum++; |
| | | rownum += 25; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /*更改ld9文件导出时改为整组放电信息导出*/ |
| | | public void createLD9AllGroup(HSSFWorkbook wb,Ld9testdataInf mondatainfo){ |
| | | public void createLD9AllGroup(HSSFWorkbook wb, Ld9testdataInf mondatainfo) { |
| | | HSSFSheet sheet = wb.createSheet("LD9整组测试数据表"); |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //根据电池组id和test_record_count查询出整组的放电记录 |
| | | int monNum=0;//放电记录中的单体编号 |
| | | int maxcol = 254; //设置最大列数 |
| | | int currRow = 0; //当前行 |
| | | int currCel= 0; //当前列 |
| | | if(mondatainfo != null){ |
| | | List<Ld9testdata> montestdata=ld9service.getLD9AllGroupByTestRecordCount(mondatainfo); |
| | | for(int i=0;i<montestdata.size();i++){ |
| | | Ld9testdata data=montestdata.get(i); |
| | | if(currCel>=maxcol){ |
| | | monNum=0; |
| | | currRow=currRow+10; |
| | | int monNum = 0;//放电记录中的单体编号 |
| | | int maxcol = 254; //设置最大列数 |
| | | int currRow = 0; //当前行 |
| | | int currCel = 0; //当前列 |
| | | if (mondatainfo != null) { |
| | | List<Ld9testdata> montestdata = ld9service.getLD9AllGroupByTestRecordCount(mondatainfo); |
| | | for (int i = 0; i < montestdata.size(); i++) { |
| | | Ld9testdata data = montestdata.get(i); |
| | | if (currCel >= maxcol) { |
| | | monNum = 0; |
| | | currRow = currRow + 10; |
| | | } |
| | | if(monNum!=data.getMonNum()){ |
| | | if(monNum!=0){ |
| | | currRow=currRow+10; |
| | | if (monNum != data.getMonNum()) { |
| | | if (monNum != 0) { |
| | | currRow = currRow + 10; |
| | | } |
| | | currCel=0; |
| | | monNum=data.getMonNum(); |
| | | currCel = 0; |
| | | monNum = data.getMonNum(); |
| | | sheet.createRow(currRow); //创建行 |
| | | sheet.createRow(currRow+1); //创建行 |
| | | sheet.createRow(currRow+2); //创建行 |
| | | sheet.createRow(currRow+3); //创建行 |
| | | sheet.createRow(currRow+4); //创建行 |
| | | sheet.createRow(currRow+5); //创建行 |
| | | sheet.createRow(currRow+6); //创建行 |
| | | sheet.createRow(currRow+7); //创建行 |
| | | sheet.createRow(currRow+8); //创建行 |
| | | sheet.getRow(currRow).createCell(currCel).setCellValue(monNum+"#测试数据"); |
| | | sheet.getRow(currRow+1).createCell(currCel).setCellValue("时间(HH:MM:SS)"); |
| | | sheet.getRow(currRow+2).createCell(currCel).setCellValue("组端电压(V)"); |
| | | sheet.getRow(currRow+3).createCell(currCel).setCellValue("在线电压(V)"); |
| | | sheet.getRow(currRow+4).createCell(currCel).setCellValue("电流(A)"); |
| | | sheet.getRow(currRow+5).createCell(currCel).setCellValue("测试容量(AH)"); |
| | | sheet.getRow(currRow+6).createCell(currCel).setCellValue("单体电压"+monNum+"(V)"); |
| | | sheet.getRow(currRow+7).createCell(currCel).setCellValue("实际容量(AH)"); |
| | | sheet.getRow(currRow+8).createCell(currCel).setCellValue("剩余容量(AH)"); |
| | | sheet.createRow(currRow + 1); //创建行 |
| | | sheet.createRow(currRow + 2); //创建行 |
| | | sheet.createRow(currRow + 3); //创建行 |
| | | sheet.createRow(currRow + 4); //创建行 |
| | | sheet.createRow(currRow + 5); //创建行 |
| | | sheet.createRow(currRow + 6); //创建行 |
| | | sheet.createRow(currRow + 7); //创建行 |
| | | sheet.createRow(currRow + 8); //创建行 |
| | | sheet.getRow(currRow).createCell(currCel).setCellValue(monNum + "#测试数据"); |
| | | sheet.getRow(currRow + 1).createCell(currCel).setCellValue("时间(HH:MM:SS)"); |
| | | sheet.getRow(currRow + 2).createCell(currCel).setCellValue("组端电压(V)"); |
| | | sheet.getRow(currRow + 3).createCell(currCel).setCellValue("在线电压(V)"); |
| | | sheet.getRow(currRow + 4).createCell(currCel).setCellValue("电流(A)"); |
| | | sheet.getRow(currRow + 5).createCell(currCel).setCellValue("测试容量(AH)"); |
| | | sheet.getRow(currRow + 6).createCell(currCel).setCellValue("单体电压" + monNum + "(V)"); |
| | | sheet.getRow(currRow + 7).createCell(currCel).setCellValue("实际容量(AH)"); |
| | | sheet.getRow(currRow + 8).createCell(currCel).setCellValue("剩余容量(AH)"); |
| | | } |
| | | currCel++; |
| | | sheet.getRow(currRow+1).createCell(currCel).setCellValue(formatTestLong(data.getTestTimelong())); |
| | |
| | | } |
| | | } |
| | | |
| | | public void createNewLD9DataSheet(HSSFWorkbook wb,final List<Ld9testdata> montestdata){ |
| | | public void createNewLD9DataSheet(HSSFWorkbook wb, final List<Ld9testdata> montestdata) { |
| | | HSSFSheet sheet = wb.createSheet("单体数据表"); |
| | | if(montestdata != null && montestdata.size()>0){ |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | if (montestdata != null && montestdata.size() > 0) { |
| | | |
| | | int mon_count = 1; //总单体数量 |
| | | int total_col = montestdata.size(); //总记录条数 |
| | | int mon_count = 1; //总单体数量 |
| | | int total_col = montestdata.size(); //总记录条数 |
| | | |
| | | |
| | | List<String> tabTh = new ArrayList<String>(){{ |
| | | this.add("时间(HH:MM:SS)");this.add("组端电压(V)");this.add("在线电压(V)");this.add("电流(A)");this.add("测试容量(AH)");this.add("单体电压"+montestdata.get(0).getTestMonnum()+"(V)"); |
| | | List<String> tabTh = new ArrayList<String>() {{ |
| | | this.add("时间(HH:MM:SS)"); |
| | | this.add("组端电压(V)"); |
| | | this.add("在线电压(V)"); |
| | | this.add("电流(A)"); |
| | | this.add("测试容量(AH)"); |
| | | this.add("单体电压" + montestdata.get(0).getTestMonnum() + "(V)"); |
| | | }}; |
| | | //for(int i=1;i<=mon_count;i++){ |
| | | // tabTh.add("单体电压"+i+"(V)"); |
| | |
| | | |
| | | //System.out.println("data.length"+datas.length+"\t datas[0].length:"+datas[0].length); |
| | | |
| | | for(int j=0;j < datas.length;j++){ |
| | | for (int j = 0; j < datas.length; j++) { |
| | | int currnum = 0; |
| | | datas[j][currnum++] = formatTestLong(montestdata.get(j).getTestTimelong()); |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getGroupVol(),1)+""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getOnlineVol(),1)+""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getTestCurr(),3)+""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getTestCap(),1)+""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getGroupVol(), 1) + ""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getOnlineVol(), 1) + ""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getTestCurr(), 3) + ""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getTestCap(), 1) + ""; |
| | | |
| | | |
| | | datas[j][currnum++] =formartDouble(montestdata.get(j).getMonVol(),3)+""; |
| | | datas[j][currnum++] = formartDouble(montestdata.get(j).getMonVol(), 3) + ""; |
| | | |
| | | //datas[j][currnum++] = ""; |
| | | |
| | |
| | | } |
| | | |
| | | //生成报告封面 |
| | | private void CreateReportCover(HSSFWorkbook wb,BattMaintDealarm bmd){ |
| | | private void CreateReportCover(HSSFWorkbook wb, BattMaintDealarm bmd) { |
| | | HSSFSheet sheet = wb.createSheet("报告封面"); |
| | | |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultRowHeight((short)(30*11)); |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultRowHeight((short) (30 * 11)); |
| | | //sheet.setDefaultRowHeightInPoints(18); //设置单元格默认高度 |
| | | |
| | | //System.out.println(bmd.getSdata()); |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb,"楷体_GB2312",28,true,true); //单元格样式 |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb, "楷体_GB2312", 28, true, true); //单元格样式 |
| | | |
| | | HSSFCellStyle menuCellStyle = ExcelUtil.createCellStyle(wb,"楷体_GB2312",20,false,true); //单元格样式 |
| | | HSSFCellStyle textCellStyle = ExcelUtil.createCellStyle(wb,"楷体_GB2312",20,true,true); //单元格样式 |
| | | sheet.setColumnWidth(3, 24*256); |
| | | HSSFCellStyle menuCellStyle = ExcelUtil.createCellStyle(wb, "楷体_GB2312", 20, false, true); //单元格样式 |
| | | HSSFCellStyle textCellStyle = ExcelUtil.createCellStyle(wb, "楷体_GB2312", 20, true, true); //单元格样式 |
| | | sheet.setColumnWidth(3, 24 * 256); |
| | | //sheet.setColumnWidth(3, 20*256); |
| | | int rowNum = 1; |
| | | sheet.createRow(rowNum++); |
| | | sheet.createRow(rowNum++); |
| | | sheet.createRow(rowNum++); |
| | | sheet.addMergedRegion(new CellRangeAddress(2,3,2,8)); //合并指定的单元格 param1 开始行 param2 结束行 param3 开始列 param4 结束列 |
| | | sheet.addMergedRegion(new CellRangeAddress(2, 3, 2, 8)); //合并指定的单元格 param1 开始行 param2 结束行 param3 开始列 param4 结束列 |
| | | sheet.getRow(2).createCell(2).setCellValue("蓄电池容量测试报告"); |
| | | sheet.getRow(2).getCell(2).setCellStyle(titleCellStyle); |
| | | sheet.getRow(2).setHeightInPoints(17); |
| | |
| | | } |
| | | |
| | | //生成起止电压数据 |
| | | private void CreateStartEndVol(HSSFWorkbook wb,String[][] data){ |
| | | private void CreateStartEndVol(HSSFWorkbook wb, String[][] data) { |
| | | HSSFSheet sheet = wb.createSheet("起止电压数据"); |
| | | |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,true); //单元格样式 |
| | | HSSFCellStyle numCellStyle = ExcelUtil.createCellStyle(wb,"Times New Roman",12,true,true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,false); //单元格样式 |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, true); //单元格样式 |
| | | HSSFCellStyle numCellStyle = ExcelUtil.createCellStyle(wb, "Times New Roman", 12, true, true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, false); //单元格样式 |
| | | |
| | | sheet.setColumnWidth(2, 24*256); |
| | | sheet.setColumnWidth(3, 24*256); |
| | | sheet.setColumnWidth(4, 24*256); |
| | | sheet.setColumnWidth(2, 24 * 256); |
| | | sheet.setColumnWidth(3, 24 * 256); |
| | | sheet.setColumnWidth(4, 24 * 256); |
| | | |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultRowHeight((short)(30*11)); |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultRowHeight((short) (30 * 11)); |
| | | int rowNum = 0; |
| | | sheet.createRow(rowNum); |
| | | sheet.getRow(rowNum).createCell(3).setCellValue("起始值(V)"); |
| | |
| | | sheet.getRow(rowNum++).getCell(4).setCellStyle(txtCellStyle); |
| | | for(int i=0;i<startArr.length;i++){ |
| | | sheet.createRow(rowNum); |
| | | sheet.getRow(rowNum).createCell(2).setCellValue("#"+(i+1)); |
| | | sheet.getRow(rowNum).createCell(2).setCellValue("#" + (i + 1)); |
| | | sheet.getRow(rowNum).getCell(2).setCellStyle(numCellStyle); |
| | | sheet.getRow(rowNum).createCell(3).setCellValue(""+startArr[i]); |
| | | sheet.getRow(rowNum).createCell(3).setCellValue("" + startArr[i]); |
| | | sheet.getRow(rowNum).getCell(3).setCellStyle(txtCellStyle); |
| | | sheet.getRow(rowNum).createCell(4).setCellValue(""+endArr[i]); |
| | | sheet.getRow(rowNum).createCell(4).setCellValue("" + endArr[i]); |
| | | sheet.getRow(rowNum++).getCell(4).setCellStyle(txtCellStyle); |
| | | } |
| | | } |
| | | |
| | | //生成容量分析表 |
| | | private void CreateCapAnalyTable(HSSFWorkbook wb,String[][] data,String picstr){ |
| | | private void CreateCapAnalyTable(HSSFWorkbook wb, String[][] data, String picstr) { |
| | | HSSFSheet sheet = wb.createSheet("容量分析表"); |
| | | |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,false); //单元格样式 |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, false); //单元格样式 |
| | | |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setColumnWidth(0, 8*256); |
| | | sheet.setColumnWidth(1, 6*256); |
| | | sheet.setColumnWidth(2, 13*256); |
| | | sheet.setColumnWidth(3, 18*256); |
| | | sheet.setColumnWidth(4, 18*256); |
| | | sheet.setColumnWidth(5, 18*256); |
| | | sheet.setColumnWidth(6, 18*256); |
| | | |
| | | byte [] pic = null; |
| | | if(ServletUtils.isNotNull(picstr)){ |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setColumnWidth(0, 8 * 256); |
| | | sheet.setColumnWidth(1, 6 * 256); |
| | | sheet.setColumnWidth(2, 13 * 256); |
| | | sheet.setColumnWidth(3, 18 * 256); |
| | | sheet.setColumnWidth(4, 18 * 256); |
| | | sheet.setColumnWidth(5, 18 * 256); |
| | | sheet.setColumnWidth(6, 18 * 256); |
| | | byte[] pic = null; |
| | | if (ServletUtils.isNotNull(picstr)) { |
| | | try { |
| | | String[] url = picstr.split(","); |
| | | pic = new BASE64Decoder().decodeBuffer(url[1]); |
| | |
| | | } |
| | | } |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | if(pic != null){ |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | if (pic != null) { |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | anchor.setAnchorType(3); |
| | | // 插入图片 |
| | | patriarch.createPicture(anchor, wb.addPicture(pic,HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | patriarch.createPicture(anchor, wb.addPicture(pic, HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | } |
| | | |
| | | int rouNum = 26; |
| | |
| | | } |
| | | |
| | | //生成电压特性比较图 |
| | | private void CreateMonVolAnalyTable(HSSFWorkbook wb,String[][] data,String picstr){ |
| | | private void CreateMonVolAnalyTable(HSSFWorkbook wb, String[][] data, String picstr) { |
| | | HSSFSheet sheet = wb.createSheet("电压特性比较图"); |
| | | |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb,"宋体",12,true,false); //单元格样式 |
| | | HSSFCellStyle titleCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, true); //单元格样式 |
| | | HSSFCellStyle txtCellStyle = ExcelUtil.createCellStyle(wb, "宋体", 12, true, false); //单元格样式 |
| | | |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | |
| | | sheet.setColumnWidth(2, 19*256); |
| | | sheet.setColumnWidth(3, 19*256); |
| | | sheet.setColumnWidth(4, 19*256); |
| | | sheet.setColumnWidth(2, 19 * 256); |
| | | sheet.setColumnWidth(3, 19 * 256); |
| | | sheet.setColumnWidth(4, 19 * 256); |
| | | |
| | | byte [] pic = null; |
| | | if(ServletUtils.isNotNull(picstr)){ |
| | | byte[] pic = null; |
| | | if (ServletUtils.isNotNull(picstr)) { |
| | | try { |
| | | String[] url = picstr.split(","); |
| | | pic = new BASE64Decoder().decodeBuffer(url[1]); |
| | |
| | | } |
| | | } |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | if(pic != null){ |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | if (pic != null) { |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | anchor.setAnchorType(3); |
| | | // 插入图片 |
| | | patriarch.createPicture(anchor, wb.addPicture(pic,HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | patriarch.createPicture(anchor, wb.addPicture(pic, HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | } |
| | | |
| | | int rouNum = 26; |
| | | sheet.createRow(rouNum); |
| | | float maxStart = Float.parseFloat(data[1][0]); |
| | | float maxEnd = Float.parseFloat(data[2][0]); |
| | | int maxStartNum = 1,maxEndNum = 1; |
| | | int maxStartNum = 1, maxEndNum = 1; |
| | | for(int i=0;i<data[0].length;i++){ |
| | | if(Float.parseFloat(data[1][i])>maxStart){ |
| | | maxStart = Float.parseFloat(data[1][i]); |
| | |
| | | } |
| | | |
| | | //生成单个图片工作簿 |
| | | private void CreateTotalVolAnalyTable(HSSFWorkbook wb,String sheetName,String picstr){ |
| | | private void CreateTotalVolAnalyTable(HSSFWorkbook wb, String sheetName, String picstr) { |
| | | HSSFSheet sheet = wb.createSheet(sheetName); |
| | | sheet.setDefaultColumnWidth(9); // 设置单元格默认宽度 |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | |
| | | byte [] pic = null; |
| | | if(ServletUtils.isNotNull(picstr)){ |
| | | byte[] pic = null; |
| | | if (ServletUtils.isNotNull(picstr)) { |
| | | try { |
| | | String[] url = picstr.split(","); |
| | | pic = new BASE64Decoder().decodeBuffer(url[1]); |
| | |
| | | } |
| | | } |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | if(pic != null){ |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | if (pic != null) { |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, 25 * 0 + 1, (short) 10, 25 * (0 + 1)); |
| | | anchor.setAnchorType(3); |
| | | // 插入图片 |
| | | patriarch.createPicture(anchor, wb.addPicture(pic,HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | patriarch.createPicture(anchor, wb.addPicture(pic, HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1); |
| | | } |
| | | |
| | | } |
| | |
| | | int nowColIndex = 0; |
| | | int rowNum = 0; |
| | | for(int i =0;i<=mon_vol_list.length;i++){ |
| | | if(i%maxColCount == 0){ |
| | | if (i % maxColCount == 0) { |
| | | //创建新的工作簿 |
| | | sheet = wb.createSheet("电压数据表格"+tableCount++); |
| | | for(int k = 0;k<tabTh.size();k++){ |
| | | sheet = wb.createSheet("电压数据表格" + tableCount++); |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | for (int k = 0; k < tabTh.size(); k++) { |
| | | sheet.createRow(k); |
| | | sheet.setDefaultColumnWidth(12); // 设置单元格默认宽度 |
| | | sheet.setDefaultColumnWidth(12); // 设置单元格默认宽度 |
| | | } |
| | | } |
| | | rowNum = 0; |
| | |
| | | } else { |
| | | sheet1 = wb.createSheet("Data Summary Table"); |
| | | } |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | // HSSFRow row = sheet1.createRow(2); |
| | | HSSFPatriarch patriarch = sheet1.createDrawingPatriarch(); |
| | | int rownum = 1; |
| | |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("测试类型:" + BattTestData.battState(bmd.getSdata().getTestType())); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("测试类型:" + MessageUtils.getMessageSocket(BattTestData.battState(bmd.getSdata().getTestType()), lang)); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("测试时间:" + formartDate(bmd.getSdata().getTestStarttime(), "yyyy-MM-dd HH:mm:ss")); |
| | | //sheet1.getRow(rownum).createCell(3).setCellValue("测试电流:" + bmd.getSdata().getTestCurr() + "A"); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("测试电流:" + testCurr + "A"); |
| | |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("Test Type:" + BattTestData.battState(bmd.getSdata().getTestType())); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("Test Type:" + MessageUtils.getMessageSocket(BattTestData.battState(bmd.getSdata().getTestType()), lang)); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("Test Time:" + formartDate(bmd.getSdata().getTestStarttime(), "yyyy-MM-dd HH:mm:ss")); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("Test Curr:" + testCurr + "A"); |
| | | sheet1.getRow(rownum).createCell(4).setCellValue("Test TimeLong:" + formatTestLong(bmd.getSdata().getTestTimelong())); |
| | |
| | | } else { |
| | | sheet1 = wb.createSheet("Data Summary Table"); |
| | | } |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | // HSSFRow row = sheet1.createRow(2); |
| | | XSSFDrawing patriarch = sheet1.createDrawingPatriarch(); |
| | | int rownum = 1; |
| | |
| | | |
| | | rownum++; |
| | | sheet1.createRow(rownum); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("测试类型:" + BattTestData.battState(bmd.getSdata().getTestType())); |
| | | sheet1.getRow(rownum).createCell(1).setCellValue("测试类型:" + MessageUtils.getMessageSocket(BattTestData.battState(bmd.getSdata().getTestType()), lang)); |
| | | sheet1.getRow(rownum).createCell(2).setCellValue("测试时间:" + formartDate(bmd.getSdata().getTestStarttime(), "yyyy-MM-dd HH:mm:ss")); |
| | | //sheet1.getRow(rownum).createCell(3).setCellValue("测试电流:" + bmd.getSdata().getTestCurr() + "A"); |
| | | sheet1.getRow(rownum).createCell(3).setCellValue("测试电流:" + testCurr + "A"); |
| | |
| | | // 创建一个工作薄 |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | | HSSFSheet sheet1 = wb.createSheet("new sheet"); |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | // HSSFRow row = sheet1.createRow(2); |
| | | HSSFPatriarch patriarch = sheet1.createDrawingPatriarch(); |
| | | for (int i = 0; i < bytes.size(); i++) { |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 1, 25 * i + 1, (short) 10, 25 * (i + 1)); |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255, (short) 1, 25 * i + 1, (short) 10, 25 * (i + 1)); |
| | | anchor.setAnchorType(3); |
| | | // 插入图片 |
| | | patriarch.createPicture( |
| | |
| | | String[] url = ePriceDistributeMapPic.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | } |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | //当前日期 |
| | | String nowFormat = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); |
| | | String excelName = "电价统计分析-"+nowFormat; |
| | | String excelName = "电价统计分析-" + nowFormat; |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | | |
| | | HSSFSheet sheet = wb.createSheet("Sheet1"); |
| | | |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | |
| | |
| | | sheet = wb.createSheet("Temperature Data Table"); |
| | | } |
| | | } |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | if (datalist != null && groupinfo != null) { |
| | | /* int mon_count = mon_tmp_list.length; //总单体数量 |
| | | int total_col = mon_vol_list.length; //总记录条数*/ |
| | |
| | | sheet = wb.createSheet("Temperature Data Table"); |
| | | } |
| | | } |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | if (datalist != null && groupinfo != null) { |
| | | /* int mon_count = mon_tmp_list.length; //总单体数量 |
| | | int total_col = mon_vol_list.length; //总记录条数*/ |
| | |
| | | } |
| | | currRow += tabTh.size() + 1; |
| | | } |
| | | |
| | | //System.out.println("data.length"+datas.length+"\t datas[0].length:"+datas[0].length); |
| | | } |
| | | } |
| | | |
| | |
| | | } else { |
| | | sheet = wb.createSheet("Single unit voltage comparison table"); |
| | | } |
| | | |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); |
| | | |
| | |
| | | } else { |
| | | sheet1 = wb.createSheet("Single body temperature comparison table"); |
| | | } |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | HSSFPatriarch patriarch1 = sheet1.createDrawingPatriarch(); |
| | | |
| | |
| | | } else { |
| | | sheet = wb.createSheet("Single unit voltage comparison table"); |
| | | } |
| | | |
| | | sheet.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | XSSFDrawing patriarch = sheet.createDrawingPatriarch(); |
| | | |
| | |
| | | } else { |
| | | sheet1 = wb.createSheet("Single body temperature comparison table"); |
| | | } |
| | | sheet1.setDefaultColumnWidth(15); //设置默认列宽,实际上回多出2个字符,不知道为什么 |
| | | sheet1.setDefaultRowHeight((short) (1 * 256)); |
| | | ; //设置默认行高,表示2个字符的高度 |
| | | //图片元素 |
| | | XSSFDrawing patriarch1 = sheet1.createDrawingPatriarch(); |
| | | |