{"id":20356244,"url":"https://github.com/gyeongseokkang/exportexcel_javascript","last_synced_at":"2025-08-04T08:35:36.564Z","repository":{"id":128779010,"uuid":"345947460","full_name":"gyeongseokKang/exportExcel_javascript","owner":"gyeongseokKang","description":"Simple implement for Export to Excel in Javascript","archived":false,"fork":false,"pushed_at":"2021-03-16T16:09:50.000Z","size":1322,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T17:41:47.558Z","etag":null,"topics":["export-to-excel","html2canvas","plotlyjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gyeongseokKang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-09T09:14:00.000Z","updated_at":"2024-01-22T00:32:16.000Z","dependencies_parsed_at":"2023-05-13T07:45:47.966Z","dependency_job_id":null,"html_url":"https://github.com/gyeongseokKang/exportExcel_javascript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gyeongseokKang/exportExcel_javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyeongseokKang%2FexportExcel_javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyeongseokKang%2FexportExcel_javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyeongseokKang%2FexportExcel_javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyeongseokKang%2FexportExcel_javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gyeongseokKang","download_url":"https://codeload.github.com/gyeongseokKang/exportExcel_javascript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyeongseokKang%2FexportExcel_javascript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268671100,"owners_count":24288111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["export-to-excel","html2canvas","plotlyjs"],"created_at":"2024-11-14T23:15:40.686Z","updated_at":"2025-08-04T08:35:36.537Z","avatar_url":"https://github.com/gyeongseokKang.png","language":"JavaScript","readme":"# exportExcel_javascript\n\u003cp align='center'\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Javscript-ES6-yellow?logo=javascript\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Plotly.js-v1.58.4-blue?logo=plotly\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/excel.js-v4.2.0-green?logo=excel.js\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/html2canvas.js-v1.0.0-green?logo=html2canvas\"\u003e\n\u003c/p\u003e\n\n* 기능 목표 : 대시보드에 있는 차트와 테이블을 Excel 파일로 떨궈주세요.\n* 세부 목표 : 차트와 테이블은 이미지로 넣되, 테이블의 경우 전체 데이터를 보여주세요\n* 구현 : 목표를 달성하기 위한 기본 테스트 레포.\n* 설명글 : https://all-dev-kang.tistory.com/entry/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-image-data%EB%A5%BC-Excel%EB%A1%9C-%EB%82%B4%EB%B3%B4%EB%82%B4%EA%B8%B0-featexceljs\n\n\n\n## 전체 로직\n\n1. querySelectorAll로 차트가 그려진 div 찾기\n2. html2canvas 라이브러리를 이용하여 이미지로 뽑아오기\n3. 테이블에 입력할 데이터 넣기\n4. buffer로 보내 Blob 파일 형식으로 만들어서 다운로드하기\n\n\n## 사용 라이브러리\n\n* exceljs - 자바스크립트에서 excel export가 가능하도록 해주는 라이브러리, export 뿐만 아니라 다른 기능들도 많음.\n* html2canvas - html의 특정 영역을 canvas로 그려주는 라이브러리, excel에는 일반 img 태그가 달린 파일을 넣을 수 없어서 변환이 필요.\n* plotlyjs - 데이터 시각화를 위한 라이브러리, 사용할수록 매력적인 시각화 라이브러리로, 다양한 차트, 다양한 언어, 다양한 프레임워크를 지원.\n\n## 사용방법\n\n1. git clone 후 open live server로 확인(VSC 추천)  \n2. Download xlsx 버튼 클릭\n3. excel 파일 확인\n\n## 결과\n\n### live server  \n![image](https://user-images.githubusercontent.com/61446585/110482468-0c4f4d80-812c-11eb-8c70-895f769c3162.png)  \n\n### export excel file  \n![image](https://user-images.githubusercontent.com/61446585/110480657-140df280-812a-11eb-92b0-a1d9b971e30a.png)\n![image](https://user-images.githubusercontent.com/61446585/110480713-2556ff00-812a-11eb-94cf-1a8d4bd66d86.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgyeongseokkang%2Fexportexcel_javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgyeongseokkang%2Fexportexcel_javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgyeongseokkang%2Fexportexcel_javascript/lists"}