Examples of JSP export Excel tables and jsp export excel tables
The java background returns a ModelAndView object, and then adds the two rows of settings.
Response. setContentType ("application/vnd. ms-excel "); response. setHeader ("Content-disposition", "attachment; filename =" + URLEncoder. encode ("member ).xls", "UTF-8 "));
You can also put the two rows in JSP.
The jsp code is as follows:
<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %> <% @ taglib prefix = "c" uri =" http://java.sun.com/jsp/jstl/core "%> <% Response. setContentType ("application/vnd. ms-excel "); response. setHeader ("Content-disposition", "attachment; filename =" + java.net. URLEncoder. encode ("member ).xls", "UTF-8"); %> <! DOCTYPE html>
The above JSP export Excel table example is all the content shared by the editor. I hope you can give us a reference and support the help house.