%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" import="java.util.*,cpc.app.util.*,java.io.*" %>
<%
String sessWONUM = (String) session.getAttribute("WONUM");
String paraWONUM = request.getParameter("WONUM");
paraWONUM = StringUtil.unicode2String(StringUtil.decode(paraWONUM));
String msg = "";
ExpWOTmp expWO = new ExpWOTmp();
File sampleExcel = expWO.getTmpFile();
if (sampleExcel == null) {
msg = "無此範本";
} else {
expWO = new ExpWOTmp(sampleExcel.getAbsolutePath());
//expWO.writeToExcel( sessWONUM );
expWO.writeToExcel(paraWONUM);
String outputFileName = expWO.getOutputFileName();
out.clear();
response.reset();
response.setContentType("application/ms-excel; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment; filename=" + outputFileName);
expWO.saveExcelFile(response.getOutputStream());
}
%>