{"id":13344155,"url":"https://github.com/hunzsig-javascript/k-excel","last_synced_at":"2025-03-12T06:31:19.462Z","repository":{"id":130218923,"uuid":"207125418","full_name":"hunzsig-javascript/k-excel","owner":"hunzsig-javascript","description":"js-excel-zip","archived":false,"fork":false,"pushed_at":"2020-01-06T04:07:54.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-24T16:51:08.728Z","etag":null,"topics":["excel","zip"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hunzsig-javascript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-09-08T14:34:29.000Z","updated_at":"2020-01-06T04:07:56.000Z","dependencies_parsed_at":"2023-03-22T15:33:21.470Z","dependency_job_id":null,"html_url":"https://github.com/hunzsig-javascript/k-excel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunzsig-javascript%2Fk-excel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunzsig-javascript%2Fk-excel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunzsig-javascript%2Fk-excel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunzsig-javascript%2Fk-excel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunzsig-javascript","download_url":"https://codeload.github.com/hunzsig-javascript/k-excel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171674,"owners_count":20247878,"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","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":["excel","zip"],"created_at":"2024-07-29T19:32:28.009Z","updated_at":"2025-03-12T06:31:19.456Z","avatar_url":"https://github.com/hunzsig-javascript.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k-excel\n\n##### 导出传参：需要导出的数据，数据长度，设置（每份表格的条数，是否压缩，表头）.\n##### 通过让客户端选择是否分表导出，自动整合数据导出.\n##### 导入传参：绑定的组件'element'如 antd 组件，导入的字段，回调函数.\n\n\u003e 依赖\n```json\n{\n    \"blob.js\": \"^1.0.1\",\n    \"file-saver\": \"^1.3.3\",\n    \"jszip\": \"^3.1.5\",\n    \"script-loader\": \"0.7.2\",\n    \"xlsx\": \"^0.11.17\"\n}\n```\n\u003e 导出参考\n```\nimport KExcel from 'k-excel';\n.\n.\n.\ncosnt data =[{employer_id: 11, employer_name: \"11\"},{employer_id: 12, employer_name: \"12\"}];\nconst page = {total: 12, end: 2}\nconst toExcel = new KExcel();\ntoExcel.excelZip(data, page,\n  {\n\tsheetLength: 3,\n\tisZip: -1,\n\tsheet: [\n\t  { key: 'employer_id', value: 'id' },\n\t  { key: 'employer_name', value: '名称' },\n\t],\n  },\n);\n```\n * 此外，若数据是对象里含有对象，即{A{B}}的形式，key需要以A.B的形式写入\n \n### 导入参考\n```\nimport KExcel from 'k-excel';\n.\n.\n.\nconst pullExcel = new KExcel();\npullExcel.excelPull(element, [\n  { key: 'salary_name' },\n  { key: 'salary_id' },\n],, then);\n\n```\n\u003e UPDATE\n * 1.1.2 修复解析字符串的问题\n * 1.1.0 增加了自定义导入方法\n * 1.0.9 support ie\n * 1.0.8 按客户端设置的分表数量导出\n * 1.0.7 修复数据为奇数时，缺条数的bug\n * 1.0.6 较为完善版本\n * send advice to 450947795@qq.com \\ ^_^ /","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunzsig-javascript%2Fk-excel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunzsig-javascript%2Fk-excel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunzsig-javascript%2Fk-excel/lists"}