把请求头修改为
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
例如
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
请求头改为这个,pc 浏览器表现为下载,
手机浏览器则会是预览,并且可以保存
把请求头修改为
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
例如
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
请求头改为这个,pc 浏览器表现为下载,
手机浏览器则会是预览,并且可以保存