<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-200  評(píng)論-148  文章-15  trackbacks-0
    網(wǎng)上搜集參考
    public HSSFWorkbook getUserCardLogByCondition(List list,Integer total){
      HSSFWorkbook wb = new HSSFWorkbook();
      try{
          HSSFSheet sheet = wb.createSheet("吉林卡號(hào)數(shù)據(jù)統(tǒng)計(jì)");
          sheet.setColumnWidth((short)0, (short)4000);
          sheet.setColumnWidth((short)1, (short)4000);
                sheet.setColumnWidth((short)2, (short)4000);
                sheet.setColumnWidth((short)3, (short)4000);
                sheet.setColumnWidth((short)4, (short)4000);
                sheet.setColumnWidth((short)5, (short)4000);
                sheet.setColumnWidth((short)6, (short)5000);
                sheet.setColumnWidth((short)7, (short)5000);
                sheet.setColumnWidth((short)8, (short)5000);
              
                //格式設(shè)置
                HSSFCellStyle css = wb.createCellStyle();      
                css.setBorderBottom((short)1);          
                css.setBorderLeft((short)1);
                css.setBorderRight((short)1);
                css.setBorderTop((short)1);

                HSSFFont font = wb.createFont();  
                font.setFontHeightInPoints( (short) 24);  
                font.setFontName("宋體");  
              
                HSSFCellStyle style = wb.createCellStyle();
                style.setFont(font);
                style.setAlignment(HSSFCellStyle.ALIGN_CENTER);

          HSSFRow row = sheet.createRow((short) 0);
          row.setHeight((short)600);
        
          HSSFCell cell = row.createCell((short) 0);
          cell.setCellStyle(style);
          cell.setCellValue(new HSSFRichTextString("吉林卡號(hào)數(shù)據(jù)統(tǒng)計(jì)"));
       
          sheet.addMergedRegion(new Region(0,(short)0,0,(short)8));
        
        
          row = sheet.createRow((short) 1);
          cell = row.createCell((short) 0);
        
          sheet.addMergedRegion(new Region(1,(short)0,1,(short)8));
        
      
        
          HSSFFont endfont = wb.createFont();  
          endfont.setFontHeightInPoints( (short) 12);  
          endfont.setFontName("宋體");
         
          HSSFCellStyle headstyle = wb.createCellStyle();
          headstyle.setFont(endfont);
          row = sheet.createRow((short) 2);
        
          String[] headTitle={"序列號(hào)","卡帳號(hào)","密碼","卡類型","點(diǎn)數(shù)","卡狀態(tài)","創(chuàng)建時(shí)間","激活時(shí)間","登陸時(shí)間"};
          for(int i=0;i<headTitle.length;i++){
           cell = row.createCell((short)i);
           cell.setCellStyle(headstyle);
           cell.setCellValue(new HSSFRichTextString(headTitle[i]));
          }
          for(int i=0;i<list.size();i++){
           UserCard userCard = (UserCard)list.get(i);
           row = sheet.createRow((short)(i+3));
           cell = row.createCell((short) 0);
           cell.setCellValue(new HSSFRichTextString(userCard.getId().toString()));
           cell = row.createCell((short) 1);
           cell.setCellValue(userCard.getUserName().toString());
           cell = row.createCell((short) 2);
           cell.setCellValue(userCard.getPassword().toString());
           cell = row.createCell((short) 3);
           cell.setCellValue(userCard.getTypeDes());
           cell = row.createCell((short) 4);
           cell.setCellValue(userCard.getValue().toString());
           cell = row.createCell((short) 5);
           cell.setCellValue(userCard.getStatusDes());
           cell = row.createCell((short) 6);
           cell.setCellValue(DateUtil.Format(userCard.getCreateTime(),"yyyy-HH-dd HH:mm:ss"));
           cell = row.createCell((short) 7);
           cell.setCellValue(DateUtil.Format(userCard.getActiveTime(),"yyyy-HH-dd HH:mm:ss"));
           cell = row.createCell((short) 8);
           cell.setCellValue(DateUtil.Format(userCard.getLoginTime(),"yyyy-HH-dd HH:mm:ss"));
          }
        
          row = sheet.createRow((short) (list.size()+6));
          cell = row.createCell((short) 0);
         
             
              
          HSSFCellStyle endstyle = wb.createCellStyle();
          endstyle.setFont(endfont);
          endstyle.setAlignment(HSSFCellStyle.ALIGN_RIGHT);
               
          cell = row.createCell((short) 6);
          cell.setCellValue(new HSSFRichTextString("卡號(hào)合計(jì):"));
          cell.setCellStyle(endstyle);
          cell = row.createCell((short) 7);
          cell.setCellValue(total.toString());
          row = sheet.createRow((short) (list.size()+7));
          cell = row.createCell((short) 6);
         
          }catch(Exception ex){
           ex.printStackTrace();
         }
         return wb;
     }

    posted on 2010-06-01 10:31 無(wú)聲 閱讀(1306) 評(píng)論(0)  編輯  收藏 所屬分類: 職場(chǎng)生活
    主站蜘蛛池模板: 亚洲av一综合av一区| 国产成人免费A在线视频| 99热这里有免费国产精品| 免费人成激情视频在线观看冫| 国产免费高清69式视频在线观看| 日韩精品成人亚洲专区| 91麻豆国产免费观看| 午夜爽爽爽男女免费观看影院| 羞羞漫画在线成人漫画阅读免费| 亚洲精品宾馆在线精品酒店| 亚洲AV永久无码精品一福利| 亚洲AV无码成人精品区狼人影院 | 免费无码黄动漫在线观看| 日韩免费无码一区二区三区 | 亚洲欧洲精品成人久久曰| 中文字幕无码亚洲欧洲日韩| 亚洲欧美日韩一区二区三区在线| 亚洲av永久中文无码精品综合| 国产精品亚洲а∨无码播放不卡| 美女视频黄a视频全免费网站一区| 免费激情网站国产高清第一页| 国产V片在线播放免费无码 | 在线观看亚洲视频| 国产精品福利片免费看| 国产在线观看免费视频软件 | 一道本在线免费视频| 亚洲国产成人精品无码区花野真一 | 国产性爱在线观看亚洲黄色一级片 | 99热这里只有精品免费播放| 可以免费看黄的网站| 国产大片免费观看中文字幕| 中文字幕亚洲乱码熟女一区二区 | 国产片AV片永久免费观看| 全免费一级毛片在线播放| 亚洲国产婷婷综合在线精品| 亚洲AV午夜成人影院老师机影院| 亚洲精品福利你懂| 亚洲区视频在线观看| 亚洲成人午夜电影| 亚洲国产成人精品无码区在线秒播 | 亚洲一区二区三区播放在线|