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(){ +