Excel다운로드를 ajax를 이용하여 처리하여주기 위해서…
const formData = new FormData() formData.append('file', evt.blobData, evt.filename); $.ajax({ type: "POST", enctype: 'multipart/form-data', url: "common/jsp/orgDown2Excel.jsp", data: formData, processData: false, contentType: false, cache: false, timeout: 600000, xhrFields: { responseType: "blob", }, success: function (data, message, xhr) { if (xhr.readyState == 4 && xhr.status == 200) { // 성공했을때만 파일 다운로드 처리하고 let blob = new Blob([data]); let link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = evt.filename; link.click(); }else{ //실패했을때는 alert 메시지 출력 alert("다운로드에 실패하였습니다."); } }, error: function (e) { console.log("ERROR : ", e); } });