<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
输出EXECL文档
</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
</head>
<body><%
    umplan.exlsld exl = new umplan.exlsld();
response.reset();
    response.setContentType("application/vnd.ms-excel");
exl.foutexecl(response.getOutputStream());
    }
 
%>
bean里的OutputStream 应为JSP页面传过来的对象.</body>
</html>

解决方案 »

  1.   

    TO: WxmJun(胡扯之) 
    umplan.exlsld 是什么?
      

  2.   

    用smartupload的download的方法可以直接打开你的excel文件
      

  3.   

    ,+***+,                                     
        ,*********,  ,               ,@@,             
       .****+++****,*:               ,WW.             
      ,***:.,,,.+****+               ,WW.             
      ***.,     ,:***+               ,WW.             
     .**:        ****+               ,WW.             
     +*+,       ,.+++. :@@*,     +@@:,WW.*@*.#@:      
     **:         ,,,,,WWWWWW:  ,WWWWWWWW.#WWWWWWW,+++,
    ,**:             @WW@*WW.  WWW**WWWW.#WWW#*WW* :: 
    ,**:             WWW*,.., #WW:,,.@WW.#WW+.,+WW,. .
     +*+,            .WWWW+,  WW+,   .WW.#W@.  .WW,+# 
     .**,            ,:WWWWW:,WW:    ,WW.#W@,  .WW,@@,
     ,***,       .,   ,.:#WWW.WW*,   .WW.#W#,  .WW.#+,
      .***,     +**,  +,,,WWW:+WW.   WWW.#W#,  .WW.  ,
      ,.*****+*****.  WWWWWWW.,WWWWWWWWW.#W#,  .WW,**,
       ,.********+., :WWWWWW+, .@WWWW@WW.#W#,  .WW,** 
         ,.+++++:,   ,.:++:.,   ,:++:.++..++,  ,++,,, 
           ,,,,,       ,,,,       ,,, ,,,,,,    ,,    
    用http://bbs.soulsky.net/pub/ascii/做的。
      

  4.   

    OutputStream os = new FileOutputStream(targetfile);
          jxl.write.WritableWorkbook wwb = Workbook.createWorkbook(os);
          //创建Excel工作表
          jxl.write.WritableSheet ws = wwb.createSheet("Test Sheet 1", 0);
    //1.添加Label对象
          jxl.write.Label labelC = new jxl.write.Label(0, 0, "This is a Label cell");
          ws.addCell(labelC);      wwb.write();//关闭Excel工作薄对象
          wwb.close();这些是什么东西  搞不懂