直接通过网页jsp导出Excel文件

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013165110/article/details/77867362

<%

CookieUtil.add("downloaded","true",3600,response);

String fileName = new String("******".getBytes("GBK"),"ISO-8859-1");

response.setContentType("application/x-xls; charset=gb2312");

response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls");

%>

<html>

<head>

<style>

.xlsText{mso-number-format:"\@"}

</style>

<head>

<body>

....

猜你喜欢

转载自blog.csdn.net/u013165110/article/details/77867362