예제 #1
0
  @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";
  }
예제 #2
0
  @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";
  }
예제 #3
0
  @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";
  }