El expression query out of the data, downloaded into an Excel table, very useful

Source: Internet
Author: User

<%@ 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%>" >

&LT;TITLE&GT;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>
&LT;TD height= ">${calRecordList.callnum}</td>"
&LT;TD >${calRecordList.toCallnum}</td>
<td><fmt:formatdate value= "${calrecordlist.begintime}" pattern= "yyyy year mm month DD HH:mm:ss"/></td>
&LT;TD align= "center" ><fmt:formatdate value= "${calrecordlist.endtime}" pattern= "yyyy year mm month dd HH:mm:ss"/> </td>
&LT;TD align= "center" >${calRecordList.calltype}</td>
&LT;TD align= "center" >${calRecordList.talktime}</td>
&LT;TD align= "center" >${calRecordList.billtime}</td>
&LT;TD align= "center" >${calRecordList.fee}</td>
&LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.