话不多说,上代码
File file = new File(物理路径);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-disposition","attachment;filename=\""+new String(filename.getBytes("gb2312"), "iso8859-1") + "\""); //fileName文件名
InputStream is = new FileInputStream(file);
FileCopyUtils.copy(is, response.getOutputStream());