<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%>
<%@ page contenttype= "application/vnd.ms-excel; CHARSET=GBK "%>
<% @page import= "Java.text.SimpleDateFormat"%>
<%@ taglib uri= "http://java.sun.com/jsp/jstl/fmt" prefix= "FMT"%>
<%
String path = Request.getcontextpath ();
String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";
SimpleDateFormat SF = new SimpleDateFormat ("Yyyymmddkkmmsssss");
string filename = new String (("File name-" +sf.format (New Date ())). GetBytes ("GBK"), "iso-8859-1");
Response.AddHeader ("Content-disposition", "filename=" + filename + ". xls");
%>
<%@ page iselignored= "false"%>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<base href= "<%=basePath%>" >
<TITLE>XX Information </title>
<link href= "<%=basepath%>pages/packageinfo/css/table.css" rel= "stylesheet" type= "Text/css"/>
<body>
<div class= "BODERBG" >
<table id= "hacker" width= "98%" border= "0" cellspacing= "1" cellpadding= "0" class= "dataTable" >
<thead><tr>
<th width= "11%" height= "All" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "10%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
<th width= "11%" align= "center" >XX</th>
</tr>
</thead>
<c:foreach var= "calrecordlist" items= "${calrecordlist}" >
<tr>
<TD height= ">${calRecordList.callnum}</td>"
<TD >${calRecordList.toCallnum}</td>
<td><fmt:formatdate value= "${calrecordlist.begintime}" pattern= "yyyy year mm month DD HH:mm:ss"/></td>
<TD align= "center" ><fmt:formatdate value= "${calrecordlist.endtime}" pattern= "yyyy year mm month dd HH:mm:ss"/> </td>
<TD align= "center" >${calRecordList.calltype}</td>
<TD align= "center" >${calRecordList.talktime}</td>
<TD align= "center" >${calRecordList.billtime}</td>
<TD align= "center" >${calRecordList.fee}</td>
<TD align= "center" >${calRecordList.groupid}</td>
</tr>
</c:forEach>
</table>
</div>
</body>
El expression query out of the data, downloaded into an Excel table, very useful