毕设有用。。麻烦给位大虾了··
点击类表任意一行,打开指定位置的Excel文件,并在另一个页面显示或在在列表下方显示。
这就是大致要求。。麻烦不要写的太复杂,我怕看不懂··麻烦了··

解决方案 »

  1.   

    你应该问的是 jsp 下载文件 并  打开
      

  2.   

    百度:jsp 下载文件 ,把文件下载下来,本机有装Excel就可以自动打开.
    如果要在WEB里打开,一)自主开发:开发量大.
                      二)用商业控件,找找也还是有的
      

  3.   

    这个不麻烦用POI来解析EXCEL
    HSSFWorkbook wb6=new HSSFWorkbook();
    FileInputStream fileInput=new FileInputStream("/opt/uploads/test.xls");
    String strName="";
    try{
    HSSFWorkbook wb8=new HSSFWorkbook(fileInput);
    HSSFSheet childSheet8=wb8.getSheetAt(0);
    strName=wb8.getSheetName(0); //取得表名
    }catch(Exception e){
    }
    复杂点的就得自己查POI的操作文章
      

  4.   

    我看你是毕设,没必要搞那么麻烦,下载就可以了
    给个小例子你吧.看看思路,慢慢就知道要怎么写了
    =========================================================<%@ page contentType="text/html; charset=utf-8"%>
    <%
    String filePath=request.getParameter("path");
    System.out.println("arc:"+filePath);
    filePath=new String(filePath.getBytes("iso8859-1"),"GBK");
    /// filePath=new String(filePath.getBytes("GBK");
    System.out.println("arc:"+filePath);
    String fileName="";
    if(filePath.lastIndexOf("/")>-1)
    {
    fileName=filePath.substring(filePath.lastIndexOf("/")+1);
    }
    else
    {
    fileName="文件";
    }
    fileName = new String(fileName.getBytes("GBK"), "ISO8859-1");
    response.reset();
    //response.setContentType("APPLICATION/OCTET-STREAM");
    //response.setContentType("application/x-download");    
    response.setContentType("application/force-download");
    response.setHeader("Content-Disposition","attachment;filename=\""+fileName+"\"");

    java.io.FileInputStream fis=new java.io.FileInputStream(application.getRealPath(filePath));
    java.io.BufferedInputStream bis=new java.io.BufferedInputStream(fis);

    java.io.OutputStream ops=response.getOutputStream(); byte[] b = new byte[1024];
     int i =-1;
     try
     {
    while((i = bis.read(b)) !=-1){
    ops.write(b,0,i);
      
    out.flush();
    }
     }
     catch(Exception e)
     {
     e.printStackTrace();
     }bis.close(); 
    fis.close();
    ops.flush();
    ops.close();
    %>
      

  5.   

    在网页上显示吗.
    通过poi读取excel数据,然后传到页面上