@RequestMapping(value = "/jxls_down") public String jxls_down(Model model) throws Exception { List<Map<String, Object>> list = testListService.getList(); String fileName = "Jxls 리스트.xlsx"; String templateFileName = "excelTemplate.xlsx"; model.addAttribute("list", list); model.addAttribute("templateFileName", templateFileName); model.addAttribute("saveFileName", fileName); return "jxlsListReportView"; }
@RequestMapping(value = "/pdf_down") public String pdf_down(Model model) throws Exception { List<Map<String, Object>> list = testListService.getList(); Font pdfFont = pdfService.setKrFont(); Table pdfContentsTable = pdfService.setPdfContents(list, pdfFont); String fileName = "PDF 리스트.pdf"; model.addAttribute("pdfContentsTable", pdfContentsTable); model.addAttribute("pdfFileName", fileName); return "pdfListReportView"; }
@RequestMapping(value = "/jexcel_down") public String jexcel_down(Model model) throws Exception { List<Map<String, Object>> list = testListService.getList(); String[] headerNames = excelService.setHeaderNames(); String[] sortedKeys = excelService.setSortedKeys(); String fileName = "Jxl 리스트.xls"; model.addAttribute("list", list); model.addAttribute("headerNames", headerNames); model.addAttribute("sortedKeys", sortedKeys); model.addAttribute("excelFileName", fileName); return "jexcelListReportView"; }