前端导出excel表格方法.pdfVIP

  • 14
  • 0
  • 约1.81千字
  • 约 3页
  • 2022-12-05 发布于上海
  • 举报
前端导出excel表格⽅法 在⽇常业务中,有⼀些没有规律的表格需要导出是,在后端处理会⾮常⿇烦,我们可以把数据提取到 html table标签中,然后进⾏导出 代码如下: //前端导出excel表格 function ExcelConvertor(data, FileName) { if (FileName null) { FileName = 下载⽂件; } var excelFile = html xmlns:o=urn:schemas-microsoft-com:office:office xmlns:x=urn:schemas-microsoft- com:office:excel xmlns=/TR/REC-html40; excelFile += meta http-equiv=content- type content=application/vnd.ms-excel; charset=UTF-8; excelFile += meta http-equiv=content-type content=application/vnd.ms-excel; excelFile += ; charset=UTF-8; excelFile += head; excelFile += !--[if gte mso 9]; excelF

文档评论(0)

1亿VIP精品文档

相关文档