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

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

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

    隨筆-200  評論-148  文章-15  trackbacks-0
    網上搜集參考
    public HSSFWorkbook getUserCardLogByCondition(List list,Integer total){
      HSSFWorkbook wb = new HSSFWorkbook();
      try{
          HSSFSheet sheet = wb.createSheet("吉林卡號數據統計");
          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);
              
                //格式設置
                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("吉林卡號數據統計"));
       
          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={"序列號","卡帳號","密碼","卡類型","點數","卡狀態","創建時間","激活時間","登陸時間"};
          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("卡號合計:"));
          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 無聲 閱讀(1306) 評論(0)  編輯  收藏 所屬分類: 職場生活
    主站蜘蛛池模板: 91精品全国免费观看含羞草| 亚洲乱码国产乱码精品精| 亚洲天堂视频在线观看| av片在线观看永久免费| 亚洲乱码中文字幕综合234| 鲁死你资源站亚洲av| 免费观看午夜在线欧差毛片| 亚洲AV成人精品一区二区三区| 啦啦啦高清视频在线观看免费 | 免费人妻精品一区二区三区| a级毛片免费高清毛片视频| 亚洲精品岛国片在线观看| 一级**爱片免费视频| 亚洲中文字幕在线乱码| 两个人看的www视频免费完整版| 亚洲精品高清无码视频| 久久九九AV免费精品| 亚洲一级毛片免费在线观看| 久久不见久久见中文字幕免费| 亚洲精品国产suv一区88| 亚洲?V无码乱码国产精品| 国产综合免费精品久久久| 久久综合亚洲色一区二区三区| 日本三级2019在线观看免费| 激情综合亚洲色婷婷五月| 国产精品免费视频播放器| 丰满人妻一区二区三区免费视频| 亚洲网址在线观看你懂的| 久久WWW色情成人免费观看| 在线观看亚洲专区| 国产偷v国产偷v亚洲高清| 99久久免费精品高清特色大片| 亚洲精品天堂在线观看| 亚洲国产精品成人| 久久青草91免费观看| 亚洲精品无码久久久久牙蜜区| 亚洲男人的天堂www| 91禁漫免费进入| 四虎成人精品国产永久免费无码| 亚洲成年轻人电影网站www| 日本特黄特色免费大片|