各位高手帮忙啊,导入到excel,就是,Action 发送了一个集合到了jsp页面上,这个页面上有个按钮,是导出文件就是要把这个集合写入到excel中,这怎么做

解决方案 »

  1.   

    这个可以用Javascript的,到网上找吧,挺多
      

  2.   

    不是的,就一个集合输出到了页面上,而页面上有个导出按钮,是导出excel文件集合已经发送到了页面上了,怎么导出
      

  3.   

    用  poi 组件HSSFSheet  sheet = new Sheet();
      

  4.   

    jxl或者poi
    http://www.java2000.net/search.jspLZ去搜索
      

  5.   

    呵呵,这个很简单,我也才研究完饿!把这个代码给你共享哈巴!
    将如下代码替换到某个jsp页面<body>的前面为止即可:<% 
    response.setContentType("application/msexcel");  
                                    response.setHeader("Content-disposition", 
                                                    "attachment;  filename=道路桥梁巡查情况汇总表.xls"); 
    %> 
    <html  xmlns:o="urn:schemas-microsoft-com:office:office" 
    xmlns:x="urn:schemas-microsoft-com:office:excel" 
    xmlns="http://www.w3.org/TR/REC-html40"> 
    <head> 
    <meta  http-equiv=Content-Type  content="text/html;  charset=GBK"> 
    <meta  name=ProgId  content=Excel.Sheet> 
    <meta  name=Generator  content="Microsoft  Excel  11"> 
    </head> 
    2010年7月16日15:20:04  梁玉龙