轉(zhuǎn)自:https://www.cnblogs.com/songyaru/p/12894357.html 使用POI導(dǎo)出Excel時報錯: 1.前端如果用xlsx格式接收表格 后臺用XSSFWorkbook workbook = new XSSFWorkbook();創(chuàng)建工作薄 response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); 2.前端如果用xls格式接收表格 后臺 用HSSFWorkbook workbook = new HSSFWorkbook();創(chuàng)建工作薄 response.setContentType("application/vnd.ms-excel"); |
|