From 3664ac0ac1d0418c1fe2e735930e17bef3d65658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 25 Mar 2022 10:32:53 +0900 Subject: [PATCH] IdcDepositListExcel.jsp change... --- .../WebContent/jsp/deposit/IdcDepositListExcel.jsp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/idcproject/WebContent/jsp/deposit/IdcDepositListExcel.jsp b/idcproject/WebContent/jsp/deposit/IdcDepositListExcel.jsp index c6adf65..c56c8e8 100644 --- a/idcproject/WebContent/jsp/deposit/IdcDepositListExcel.jsp +++ b/idcproject/WebContent/jsp/deposit/IdcDepositListExcel.jsp @@ -8,10 +8,13 @@ var tableToExcel = (function(){ , template = '{table}
' , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } - return function(table, name) { + return function(table, name, filename) { if (!table.nodeType) table = document.getElementById(table) var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML} - window.location.href = uri + base64(format(template, ctx)) + //window.location.href = uri + base64(format(template, ctx)) + document.getElementById("dlink").href = uri + base64(format(template, ctx)); + document.getElementById("dlink").download = filename; + document.getElementById("dlink").click(); } })(); @@ -40,7 +43,7 @@ function validateTest(){
- 엑셀 출력 + 엑셀 출력
@@ -48,6 +51,7 @@ function validateTest(){ +