关于Action处理导出Excel
InputStream inputStream=null;
??try {
???inputStream = new FileInputStream(filePath);
???ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); // 下面5行代码实现从输入流?FileInputStream 到 输出流 ByteArrayOutputStream 写入的过程
???byte[] buffer = new byte[inputStream.available()];
???int iLength = 0;
???while ((iLength = inputStream.read(buffer)) != -1) {
????outputStream.write(buffer, 0, iLength);
???} // 通知response的输出类型,输出方式及输出内容
???fileName=new String(fileName.getBytes("GBK"),"ISO-8859-1");
???response.addHeader("Content-Disposition",
?????"attachment; filename="+fileName+"");
???response.setContentType("application/octet-stream");
???response.setContentLength(outputStream.size());
???ServletOutputStream out = response.getOutputStream();
???outputStream.writeTo(out);
???out.flush();
???inputStream.close();
???outputStream.close();