ReactJS 엑셀 다운로드 오류
페이지 정보
작성자 Palaoo 작성일 2023-12-21 15:46 조회 90회 댓글 0건본문
관련링크
안녕하세요 LG 에너지솔루션 스마트팩토리 Nav 포탈 운영중인 최지호 사원입니다.
0번 컬럼엔 style.button 으로 추가한 버튼이 있고,
오른쪽 동그라미는
custom Celltype으로 설정했습니다.
엑셀 다운로드시
아래는 엑셀 다운로드 소스입니다.
const downloadExcel = (spread) => {
const json = spread.current.toJSON();
console.log(json);
new ExcelIO.IO().save(
JSON.stringify(json),
(blob) => {
const excelURL = window.URL.createObjectURL(blob);
const anchorElement = document.createElement('a');
document.body.appendChild(anchorElement);
anchorElement.downlaod = '진행현황';
anchorElement.href - excelURL;
anchorElement.click();
document.body.removeChild(anchorElement);
window.URL.revokeObjectUrl(excelURL);
},
(e) => null,
{ filetype: GC.Spread.Sheets.FileType.excel }
);
};
댓글목록
등록된 댓글이 없습니다.