1、前端點(diǎn)擊鏈接直接下載文件
_, excelFile := excel.BuildExcel(list)
c.Header("response-type", "blob")
data, _ := excelFile.WriteToBuffer()
c.Data(http.StatusOK, "application/vnd.ms-excel", data.Bytes())
_, excelFile := excel.BuildExcel(list)
c.Header("response-type", "blob")
data, _ := excelFile.WriteToBuffer()
c.Data(http.StatusOK, "application/vnd.ms-excel", data.Bytes())