sql.setEntity(dao.getEntity(cpsjk.class));
dao.execute(sql);
J4EConf j4eConf = J4EConf.from(cpsjk.class);
j4eConf.setUse2007(true);
List<J4EColumn> jcols = j4eConf.getColumns();
for (J4EColumn j4eColumn : jcols)
{
j4eColumn.setIgnore(true);
if(iswc=="0")
{
if("xcpren".equals(j4eColumn.getFieldName()))
{
j4eColumn.setIgnore(false);
j4eColumn.setColumnName("参与测评人姓名");
}
}
else
{
if("bcpren".equals(j4eColumn.getFieldName()))
{
j4eColumn.setIgnore(false);
j4eColumn.setColumnName("被测评人姓名");
}
if("bcprenqx".equals(j4eColumn.getFieldName()))
{
j4eColumn.setIgnore(false);
j4eColumn.setColumnName("总分");
}
if(isbz=="0")
{
if("xcpren".equals(j4eColumn.getFieldName()))
{
j4eColumn.setIgnore(false);
j4eColumn.setColumnName("参与测评人姓名");
}
}
}
}
rs=sql.getList(cpsjk.class);
SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
String str=sdf.format(new Date());
filename=filename+str+".xlsx";
OutputStream out = response.getOutputStream();
response.setHeader("content-type", "application/shlnd.ms-excel;charset=utf-8");
response.setHeader("content-disposition", "attachment; filename=" + new String(filename.getBytes(), "ISO-8859-1"));
J4E.toExcel(out,rs , j4eConf);
在页面下载就报无法连接网站,郁闷了,请老大看看这个是什么问题。整个系统的导出EXCEL都报错,是不是改了什么依赖或服务器的环境?问题是我没有印象啊