jsp页面导出保存word或Excel几种方法及个人总结

以下是本人在做EXCEL/WORLD中在网上找的方法及个人总结:

方法1:

<%@ page contentType="application/msword; charset=GBK" %>  //或者vnd.ms-word
<%@ page contentType="application/msexcel; charset=GBK" %> //或者vnd.ms-excel
通过设置可以使原来页面的内容在word或者excel中表现出来。

如果需要把word或者excel文档下载下来,只需在jsp页面上面加上如下代码:
<%
//线上浏览的方式:
response.setHeader("Content-disposition","inline; filename=test1.xls");
//下载的方式:
response.setHeader("Content-disposition","attachment; filename=test2.xls");
//以上这行设定传送到前端浏览器时的档名为test1.xls
//就是靠这一行,让前端浏览器以为接收到一个excel档
%>


方法2:
通过jxl等第三方来操作excel,这种网上资料丰富,
但这种又分两个方法:下面会介绍
1)在服务器端生成文件
String download_path = request.getSession().getServletContext().getRealPath("/") + "***.excel";
	    File file = new File(download_path);  //生成个应的文件

	    WritableWorkbook book = Workbook.createWorkbook(file);
	    WritableSheet sheet = book.createSheet("sheet", 0);
//配置第一行的头	    
  Label cardNoLabel = new Label(0, 0, "卡号");
	    Label cardTypeLabel = new Label(1, 0, "ICCID");
	    Label iccIdLabel = new Label(2, 0, "卡类型");
	    Label version = new Label(3, 0, "版本号");
	    Label m1NoLabel = new Label(4,0,"M1编号");
	    Label errorLabel = new Label(5, 0, "错误原因");
	    sheet.addCell(cardTypeLabel);
	    sheet.addCell(cardNoLabel);
	    sheet.addCell(iccIdLabel);
	    sheet.addCell(errorLabel);
	    sheet.addCell(version);
	    sheet.addCell(m1NoLabel);

//遍历生成相应数据
  for (int i = 0; i < size; i++) {
		String[] objects = cardList.get(i);
		String cardType = objects[0];
		String cardNo = objects[1].startsWith("0000") ? objects[1].substring(4) : objects[1];
		String iccId = objects[2];
		String m1No = objects[3];
		Object cardNoExists = existsQuery.setString(0, cardNo).uniqueResult();
		Object iccIdExists = iccIdQuery.setString(0, iccId).uniqueResult();
		if (cardNoExists != null) {
		    sheet.addCell(new Label(0, i - successNum + 1, cardNo));
		    sheet.addCell(new Label(1, i - successNum + 1, iccId));
		    sheet.addCell(new Label(2, i - successNum + 1, cardType));
		    sheet.addCell(new Label(3, i - successNum + 1, apVersion));
		    sheet.addCell(new Label(4, i - successNum + 1, m1No));
		    sheet.addCell(new Label(5, i - successNum + 1, "卡号已存在"));
		} else if (iccIdExists != null) {
		    sheet.addCell(new Label(0, i - successNum + 1, cardNo));
		    sheet.addCell(new Label(1, i - successNum + 1, iccId));
		    sheet.addCell(new Label(2, i - successNum + 1, cardType));
		    sheet.addCell(new Label(3, i - successNum + 1, apVersion));
		    sheet.addCell(new Label(4, i - successNum + 1, m1No));
		    sheet.addCell(new Label(5, i - successNum + 1, "iccid已存在"));
		} 
	    }
	    book.write();
	    book.close();


2)服务端不生成文件
 // 1.设定好response的相关属性:
	    response.setContentType("application/vnd.ms-excel");
	    // URLEncoder.encode(qList.get("FUNCTION_NAME").toString(), "gbk")
	    String downloadFileName = new String(qList.get("FUNCTION_NAME").toString().getBytes("GBK"), "ISO-8859-1");
	    response.setHeader("Content-Disposition", "attachment;   filename=\"" + downloadFileName + ".xls" + "\"");

	    // 2.取到response的OutputStream实例,并用这个实例化一个WritableWorkbook对象
	    OutputStream os = response.getOutputStream();
	    WritableWorkbook wwb = Workbook.createWorkbook(os);

	    int ncout = resultList.size();
	    int maxnum = 50000; // 一次最多写入量
	    int times = (ncout + maxnum - 1) / maxnum;

	    // 大循环
	    for (int t = 0; t < times; t++) {

		// 新建一张表
		WritableSheet wsheet = wwb.createSheet("members_" + (t + 1), t);
		// 设置表头
		Map<String, Object> tableNameMap = null;
		Label label;
		for (int i = 0; i < tableNameList.size(); i++) {
		    tableNameMap = tableNameList.get(i);
		    label = new Label(i, 0, tableNameMap.get("COLUMN_CHIN").toString());
		    wsheet.addCell(label);
		}

		// 读出数据,往表里加数据行
		int base = (t * maxnum);
		for (int i = 0; i < ncout; i++) {
		    if (i == base + maxnum)
			break;
		    Map<String, Object> resultMap = resultList.get(base + i);
		    int size = 0;
		    Iterator it = resultMap.entrySet().iterator();
		    while (it.hasNext()) {
			Map.Entry entry = (Map.Entry) it.next();
			String value;
			value = entry.getValue() == null ? "" : entry.getValue().toString();
			label = new Label(size, (i + 1), value);
			wsheet.addCell(label);
			size++;
			if (size == tableNameList.size())
			    break;
		    }
		}

	    }// 结束大循环

	    wwb.write();
	    wwb.close();
	    os.close();
	    // 把生成的excel数据输出到response的OutputStream
	    response.flushBuffer();


方法3:

1.用word编辑一个模板,然后另存为HTML
2.在java类里面写velocity 语言代码
String path =getRequest().getSession().getServletContext().getRealPath("/");
	
		String filePath = path+"interview/management/exambatch/";
		VelocityEngine ve = getVelocityEngine(filePath);		//文件模板的路径
		VelocityContext context = new VelocityContext();		
		context.put("list", examineeGroupInfoList);					//把数据加到入context中.这数据可以是list,可以是map,也可以是别的数据类型
		context.put("eximineeGroupInfoCount", eximineeGroupInfoCount);
		int size = examineeGroupInfoList.size();
		context.put("size", size);
		String srcFilename = "examineeGroupInfo_toWord.htm";		//模板文件
		String destFilename = "examineeGroupInfo_toWord.doc";		//通过模板,生成的doc文件名
		Template template;
		try {
			Velocity.init();
			template = ve.getTemplate(srcFilename, "GBK");		
			BufferedWriter writer =
				new BufferedWriter(new FileWriter(filePath+destFilename));	//把生成的文件写到路径中去
			template.merge(context, writer);
			writer.flush();
			writer.close();	
			System.out.println("finish!!");
		} catch (ResourceNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ParseErrorException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}


3.在模板上编辑context中的数据,以下内容主要是velocity语言的for及el表达式来取值的
<!--=================================================================================================-->
<%@ page contentType="application/msword; charset=gb2312" %>
<%@include file="/sys/common/taglibs.jsp"%>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv="Content-Type" content="application/msword; charset=gb2312" />
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="examineeGroupInfo_toWord.files/filelist.xml">
<title>考生分组情况</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>wsb</o:Author>
  <o:LastAuthor>wsb</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>13</o:TotalTime>
  <o:Created>2009-09-07T06:45:00Z</o:Created>
  <o:LastSaved>2009-09-07T06:45:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>19</o:Words>
  <o:Characters>112</o:Characters>
  <o:Company>www.wsb.com</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>130</o:CharactersWithSpaces>
  <o:Version>11.9999</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:PunctuationKerning/>
  <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:SpaceForUL/>
   <w:BalanceSingleByteDoubleByteWidth/>
   <w:DoNotLeaveBackslashAlone/>
   <w:ULTrailSpace/>
   <w:DoNotExpandShiftReturn/>
   <w:AdjustLineHeightInTable/>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	mso-pagination:none;
	font-size:10.5pt;
	mso-bidi-font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:宋体;
	mso-font-kerning:1.0pt;}
 /* Page Definitions */
 @page
	{mso-page-border-surround-header:no;
	mso-page-border-surround-footer:no;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;
	layout-grid:15.6pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:普通表格;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN style='tab-interval:21.0pt;text-justify-trim:punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"'>考生分组情况</span></p>

<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<div align=center>
<!-- 定义一个变量 -->
#set( $task =1 )
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width=660
 style='width:495.0pt;margin-left:-39.6pt;border-collapse:collapse;border:none;
 mso-border-alt:solid windowtext .5pt;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:25.1pt'>
  <td width=180 valign=top style='width:135.0pt;border:solid windowtext 1.0pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>批次名称:</span></b></p>
  </td>
  <td width=480 colspan=3 valign=top style='width:360.0pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal><span style='font-family:宋体;mso-ascii-font-family:"Times New Roman";
  mso-hansi-font-family:"Times New Roman"'>
 #set( $task =1 )
  #foreach ($list2 in $list ) 
  #foreach ($list3 in $list2 ) 
  	#if($task==1)
  	$list3.BATCH_NAME 
  	#end
  	#set( $task =$task+1 )
  #end
  #end
  </span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1;height:25.1pt'>
  <td width=180 valign=top style='width:135.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>面试开始时间:</span></b></p>
  </td>
  <td width=480 colspan=3 valign=top style='width:360.0pt;border-top:none;
  border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal><span lang=EN-US> 
  #set( $task =1 )
  #foreach ($list2 in $list ) 
  #foreach ($list3 in $list2 ) 
  	#if($task==1)
  		#if ($list3.START_TIME ) <!-- 判断是否为空 -->
  			$list3.START_TIME 
  		#end
  	#end
  	#set( $task =$task+1 )
  #end 
  #end</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:2;height:25.1pt'>
  <td width=180 valign=top style='width:135.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>批次说明:</span></b></p>
  </td>
  <td width=480 colspan=3 valign=top style='width:360.0pt;border-top:none;
  border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal><span style='font-family:宋体;mso-ascii-font-family:"Times New Roman";
  mso-hansi-font-family:"Times New Roman"'>
  #set( $task =1 )
  #foreach ($list2 in $list ) 
  #foreach ($list3 in $list2 ) 
  	#if($task==1)
  		#if ($list3.REMARK) 
  			$list3.REMARK
  		#end
  	#end
  	#set( $task =$task+1 )
  #end
  #end</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes;height:25.15pt'>
  <td width=180 valign=top style='width:135.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>小组数量:</span></b></p>
  </td>
  <td width=168 valign=top style='width:126.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal><span lang=EN-US>$size</span></p>
  </td>
  <td width=84 valign=top style='width:63.0pt;border-top:none;border-left:none;
  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>总人数:</span></b></p>
  </td>
  <td width=228 valign=top style='width:171.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal><span lang=EN-US>$eximineeGroupInfoCount</span></p>
  </td>
 </tr>
</table>

</div>

<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<div align=center>
 #foreach ($list2 in $list ) 
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width=660
 style='width:495.0pt;margin-left:-39.6pt;border-collapse:collapse;border:none;
 mso-border-alt:solid windowtext .5pt;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:25.1pt'>
  <td width=120 valign=top style='width:90.0pt;border:solid windowtext 1.0pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>小组名称:</span></b></p>
  </td>
  <td width=540 colspan=4 valign=top style='width:405.0pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal><span lang=EN-US>
  #foreach ($list3 in $list2 ) 
  	${list3.GROUP_NAME}
  #end
 </span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1;height:25.1pt'>
  <td width=120 valign=top style='width:90.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>姓名</span></b></p>
  </td>
  <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>报考单位部门</span></b></p>
  </td>
  <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>报考单位部门代码</span></b></p>
  </td>
  <td width=120 valign=top style='width:90.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>报考职务</span></b></p>
  </td>
  <td width=108 valign=top style='width:81.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>报考职务代码</span></b></p>
  </td>
 </tr>
 <%--==========================内循坏=============================--%>
 #set($popleNumber = 0)
 #foreach ($list3 in $list2 ) 
 <tr style='mso-yfti-irow:2;height:25.1pt'>
  <td width=120 valign=top style='width:90.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><span
  style='font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
  "Times New Roman"'>${list3.EXAMINEE_NAME}</span></p>
  </td>
  <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>${list3.SIGNCOMPANY}</span></p>
  </td>
  <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>${list3.SIGNCOMPANY_CODE}</span></p>
  </td>
  <td width=120 valign=top style='width:90.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>${list3.SIGNPOSITION}</span></p>
  </td>
  <td width=108 valign=top style='width:81.0pt;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.1pt'>
  <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>${list3.SIGNPOSITION_CODE}</span></p>
  </td>
 </tr>
 #set($popleNumber = $popleNumber+1)
 #end
 <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes;height:25.15pt'>
  <td width=120 valign=top style='width:90.0pt;border:solid windowtext 1.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:10.0pt;font-family:宋体;mso-ascii-font-family:Arial;
  mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#555555'>人数:</span></b></p>
  </td>
  <td width=540 colspan=4 valign=top style='width:405.0pt;border-top:none;
  border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:25.15pt'>
  <p class=MsoNormal><span lang=EN-US>$popleNumber</span></p>
  </td>
 </tr>
</table>
<br>
#end
</div>

<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>
<!--=================================================================================================-->


如有不对的地方,请指出。

你可能感兴趣的:(jsp,面试,velocity,Excel,OS)