锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV永久无码精品放毛片,亚洲黄网在线观看,国产亚洲综合网曝门系列http://www.tkk7.com/ocean07000814/category/40164.html鍏卞悓鎺㈣STRUTS#HIBERNATE#SPRING#EJB絳夋妧鏈?/description>zh-cnMon, 28 Feb 2011 22:02:16 GMTMon, 28 Feb 2011 22:02:16 GMT60RtfTemplate 璇誨彇word妯℃澘鐢熸垚鏂囦歡http://www.tkk7.com/ocean07000814/articles/345110.html闈炴床灝忕櫧鑴?/dc:creator>闈炴床灝忕櫧鑴?/author>Fri, 25 Feb 2011 03:40:00 GMThttp://www.tkk7.com/ocean07000814/articles/345110.htmlhttp://www.tkk7.com/ocean07000814/comments/345110.htmlhttp://www.tkk7.com/ocean07000814/articles/345110.html#Feedback0http://www.tkk7.com/ocean07000814/comments/commentRss/345110.htmlhttp://www.tkk7.com/ocean07000814/services/trackbacks/345110.html
try {
                response.reset();
                response.setContentType("txt/rtf; charset=GBK");
                String fileName = "XXXX.rtf";
                this.pageWrapper.response.addHeader("Content-Disposition", "attachment; filename=" + fileName);

                //鐢熸垚word
                String rtfSource =  ("D://wwww.rtf") ;
                RTFTemplateBuilder builder = RTFTemplateBuilder.newRTFTemplateBuilder()

                RTFTemplate rtfTemplate = builder.newRTFTemplate();
                rtfTemplate.setTemplate(new File(rtfSource));
                    
                // 瀵逛簬妯℃澘涓殑鍙橀噺璧嬪?br />                 rtfTemplate.put("time1","鍙橀噺1");
               
                PrintWriter writer = response.getWriter();
                rtfTemplate.merge(writer);

                writer.flush();
                writer.close();

            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }


 妯℃澘鏂囦歡錛?br />  

鏃墮棿1

$time1

鏃墮棿2

鏃墮棿3

$time3

鏃墮棿4

 

鏃墮棿5

$time5

鏃墮棿6



]]>
POI閫氳繃璇誨彇Excel妯℃澘鐢熸垚Excel鏂囦歡http://www.tkk7.com/ocean07000814/articles/344865.html闈炴床灝忕櫧鑴?/dc:creator>闈炴床灝忕櫧鑴?/author>Tue, 22 Feb 2011 09:48:00 GMThttp://www.tkk7.com/ocean07000814/articles/344865.htmlhttp://www.tkk7.com/ocean07000814/comments/344865.htmlhttp://www.tkk7.com/ocean07000814/articles/344865.html#Feedback0http://www.tkk7.com/ocean07000814/comments/commentRss/344865.htmlhttp://www.tkk7.com/ocean07000814/services/trackbacks/344865.html/**  
  •      * 瀵煎嚭  
  •      * @param mapping  
  •      * @param form  
  •      * @param request  
  •      * @param response  
  •      * @return  
  •      */  
  •     public ActionForward export(ActionMapping mapping, ActionForm form,   
  •             HttpServletRequest request, HttpServletResponse response) {   
  •            
  •         String checkBoxValueList = request.getParameter("ckv");   
  •         if(!CommonUtil.isNotNullorEmtry(checkBoxValueList)) {   
  •             this.saveMessages(request, "export.fail");   
  •             return mapping.findForward("export.fail");   
  •         }   
  •         List<Order> listOrder = orderService.exportOrderList(checkBoxValueList);   
  •            
  •         try {   
  • //          SimpleDateFormat sf = new SimpleDateFormat("yyyyMMddhhmm");   
  • //          Calendar calendar = Calendar.getInstance();   
  •                
  •             ServletOutputStream os = response.getOutputStream(); //鑾峰緱杈撳嚭嫻?  
  •             response.reset();   //娓呯┖杈撳嚭嫻?  
  •             String fileName = new String("璁㈠崟鍒楄〃".getBytes("gb2312"), "ISO8859-1") +".xls";   
  •             response.setHeader("Content-disposition""attachment; filename="+ fileName); //璁懼畾杈撳嚭鏂囦歡澶?  
  •             response.setContentType("application/msexcel"); //瀹氫箟杈撳嚭綾誨瀷   
  •   
  •             String filePath = request.getSession().getServletContext().getRealPath("/excel/model/order.xls");   
  •   
  •             HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(filePath));    //璇誨彇excel妯℃澘   
  •             try {   
  •                 HSSFSheet sheet = workbook.getSheetAt(0);   //璇誨彇絎竴涓伐浣滅翱   
  •                 HSSFRow row;   
  •                 HSSFCell cell = null;   
  •                 int rownum = 3//娣誨姞鐨勮搗濮嬭   
  •                 HSSFCellStyle style = this.getStyle(workbook);   
  •                 Iterator<Order> it = listOrder.iterator();   
  •                 Order order = null;   
  •                                    
  •                 while(it.hasNext()) {   
  •                     order = new Order();   
  •                     order = it.next();   
  •                        
  •                     row = sheet.createRow(rownum);   
  •                        
  •                     myCreateCell(1, String.valueOf(rownum-2), row, cell, style);    //鍒?   
  •                     myCreateCell(2, order.getAdName(), row, cell, style);   //鍒?   
  •                     myCreateCell(3, order.getSmallAreaName(), row, cell, style);    //鍒?       
  •                                            
  •                     rownum++;   
  •                 }   
  •                                    
  •                 workbook.write(os);   
  •                 os.flush();   
  •                 os.close();   
  •             } catch (Exception e) {   
  •                 e.printStackTrace();   
  •             }   
  •         } catch (IOException e) {   
  •             e.printStackTrace();   
  •         }   
  •         return null;   
  •     }   
  •        
  •     private void myCreateCell(int cellnum, String value, HSSFRow row, HSSFCell cell, HSSFCellStyle style) {   
  •         cell = row.createCell((short) cellnum);   
  •         cell.setCellValue(new HSSFRichTextString(value));   
  •         cell.setCellStyle(style);   
  •     }   
  •        
  •     public HSSFCellStyle getStyle(HSSFWorkbook workbook) {   
  •         //璁劇疆瀛椾綋;   
  •         HSSFFont font = workbook.createFont();   
  •         //璁劇疆瀛椾綋澶у皬;   
  •         font.setFontHeightInPoints((short10);   
  •         //璁劇疆瀛椾綋鍚嶅瓧;   
  •         font.setFontName("瀹嬩綋");   
  •         //font.setItalic(true);   
  •         //font.setStrikeout(true);   
  •         //璁劇疆鏍峰紡;   
  •         HSSFCellStyle style = workbook.createCellStyle();   
  •         //璁劇疆搴曡竟妗?   
  •         style.setBorderBottom(HSSFCellStyle.BORDER_THIN);   
  •         //璁劇疆搴曡竟妗嗛鑹?   
  •         style.setBottomBorderColor(HSSFColor.BLACK.index);   
  •         //璁劇疆宸﹁竟妗?   
  •         style.setBorderLeft(HSSFCellStyle.BORDER_THIN);   
  •         //璁劇疆宸﹁竟妗嗛鑹?   
  •         style.setLeftBorderColor(HSSFColor.BLACK.index);   
  •         //璁劇疆鍙寵竟妗?   
  •         style.setBorderRight(HSSFCellStyle.BORDER_THIN);   
  •         //璁劇疆鍙寵竟妗嗛鑹?   
  •         style.setRightBorderColor(HSSFColor.BLACK.index);   
  •         //璁劇疆欏惰竟妗?   
  •         style.setBorderTop(HSSFCellStyle.BORDER_THIN);   
  •         //璁劇疆欏惰竟妗嗛鑹?   
  •         style.setTopBorderColor(HSSFColor.BLACK.index);   
  •         //鍦ㄦ牱寮忕敤搴旂敤璁劇疆鐨勫瓧浣?   
  •         style.setFont(font);   
  •         //璁劇疆鑷姩鎹㈣;   
  •         style.setWrapText(false);   
  •         //璁劇疆姘村鉤瀵歸綈鐨勬牱寮忎負灞呬腑瀵歸綈;   
  •         style.setAlignment(HSSFCellStyle.ALIGN_CENTER);   
  •         //璁劇疆鍨傜洿瀵歸綈鐨勬牱寮忎負灞呬腑瀵歸綈;   
  •         style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);   
  •         return style;   
  •     } 

  • EXCEL妯℃澘鍔犺澆鍑洪敊鐨勯棶棰橈細
    鍙兘鏄洜涓烘ā鏉夸腑鏌愪簺鏍煎紡瀛樺湪闂錛屾垨鑰呮ā鏉夸腑瀛樺湪EXCEL鐨勬煇浜涢珮綰у姛鑳斤紝銆怭OI銆戞棤娉曞姞杞藉鑷村嚭閿欍?br /> 瑙e喅鍔炴硶錛氳嚜宸變竴姝ユ浠庢渶綆鍗曠殑excel鏂囦歡寮濮嬶紝緇樺埗妯℃澘銆?/p>

    ]]>
    主站蜘蛛池模板: 国产成人精品久久亚洲| 91嫩草私人成人亚洲影院| A毛片毛片看免费| 久久精品亚洲精品国产色婷| 在线观看特色大片免费视频| 亚洲国产成人AV网站| 色噜噜AV亚洲色一区二区| 久久成人国产精品免费软件| 亚洲AV女人18毛片水真多| 亚洲精品无码专区久久同性男| 国内少妇偷人精品视频免费| 亚洲国产av高清无码| 国产精品久免费的黄网站| 日本免费高清视频| 亚洲码和欧洲码一码二码三码| 亚洲第一黄片大全| 免费在线看v网址| 国产精品免费αv视频| 亚洲香蕉久久一区二区| 亚洲精品国产精品乱码不卡√| 女人被弄到高潮的免费视频| a毛片免费全部播放完整成| 久久国产亚洲精品| 久久国产亚洲电影天堂| 在线观着免费观看国产黄| 野花香在线视频免费观看大全| 国产成人+综合亚洲+天堂| 亚洲精品美女在线观看播放| 亚洲第一页日韩专区| 真人做A免费观看| 丝袜足液精子免费视频| 亚洲欧洲无卡二区视頻| 亚洲老熟女@TubeumTV| 亚洲综合色视频在线观看| 特级做A爰片毛片免费69| 久久午夜伦鲁片免费无码| 一级做a爰片久久毛片免费看| 亚洲日韩国产AV无码无码精品| 337p日本欧洲亚洲大胆精品555588| 亚洲中文字幕无码一区二区三区 | 亚洲人成免费电影|