<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% response.setContentType("application/vnd.ms-excel;charset=UTF-8"); %> <%@page import="com.wat.component.excel.*" %> <%@page import="java.util.Map" %> <%@page import="java.net.URLEncoder" %> <% String excelid = request.getParameter("id"); Map data = WatExcelDataContainer.getInstance().getReportData(excelid); if(data==null || data.size()==0)return; //* response.setHeader("Content-Disposition", "attachment; filename=\"" + new String((data.get("name")+".xls").getBytes(),"iso-8859-1") + "\""); if(data.get("excel") != null){ byte[] bs = (byte[])data.get("excel"); out.clear(); response.getOutputStream().write(bs); //response.getOutputStream().close(); return; } //*/ /* response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(data.get("name")+".xls", System.getProperty("file.encoding")) + "\""); //*/ %> <%=data.get("data")%>