最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
vue+springmvc导出excel数据的实现代码
时间:2022-06-25 15:57:35 编辑:袖梨 来源:一聚教程网
vue端处理
this.$http.get(this.service + '/user/excel',{responseType: 'blob'}).then(({data})=> { console.info(typeof data) var a = document.createElement('a'); var url = window.URL.createObjectURL(data); a.href = url; a.download = '用户统计信息.xls'; a.click(); window.URL.revokeObjectURL(url); })
web端处理
int total=userBsService.getCount(null); Listlist=userBsService.getList(null, 1, total); String fileName = new Date().getTime() + ""; XSSFWorkbook wb=new XSSFWorkbook(); Sheet sheet=wb.createSheet(); Row row0=sheet.createRow(0); String titleName[] = {"用户账号", "充值总金额", "邀请总人数", "社群组"};//列名 for(int i=0;i
相关文章
- 剑星拾荒者的生活支线怎么做 05-04
- 庄园领主重型犁怎么用 05-04
- 剑星禁忌支线怎么完成 05-04
- 《无悔华夏》2022年6月17日渔樵问答答案分享 05-04
- 庄园领主怎么生产瓦片 05-04
- 剑星不明礼物支线密码是什么 05-04