{"id":21546619,"url":"https://github.com/danielmlc/js-excel-export","last_synced_at":"2025-03-18T01:00:19.043Z","repository":{"id":177543793,"uuid":"213615985","full_name":"danielmlc/js-excel-export","owner":"danielmlc","description":null,"archived":false,"fork":false,"pushed_at":"2019-10-16T11:24:05.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T09:12:43.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danielmlc.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":"2019-10-08T10:42:30.000Z","updated_at":"2021-08-19T13:21:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a9aabf1-9bb5-42ce-9f86-50917d84ffc9","html_url":"https://github.com/danielmlc/js-excel-export","commit_stats":null,"previous_names":["danielmlc/js-excel-export"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmlc%2Fjs-excel-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmlc%2Fjs-excel-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmlc%2Fjs-excel-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmlc%2Fjs-excel-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmlc","download_url":"https://codeload.github.com/danielmlc/js-excel-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135891,"owners_count":20403797,"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":[],"created_at":"2024-11-24T06:12:50.251Z","updated_at":"2025-03-18T01:00:19.016Z","avatar_url":"https://github.com/danielmlc.png","language":"JavaScript","readme":"\u003c!--\n * @Description: 未描述\n * @Author: danielmlc\n * @Date: 2019-10-08 18:43:51\n * @LastEditTime: 2019-10-16 10:44:41\n --\u003e\n# excel导入导出\n\n\u003e 基于`exceljs`实现\n\n\n\nworksheet配置项：\n\n```js\n{\n    workbook:{\n        creator: 'yearrow',\n        lastModifiedBy: 'yearrow',\n        created: new Date(),\n        modified: new Date(),\n        lastPrinted: new Date(),\n        views:[\n            {\n              x: 0,\n              y: 0,\n              width: 10,\n              height: 10,\n              firstSheet: 0, // 指定第一个sheet\n              activeTab: 0, // 打开的第一个工作表\n              showRuler: false,\n              visibility: \"visible\"\n            }\n        ]\n    },\n    worksheet:{\n        properties: {\n            // 工作表属性\n        },\n        pageSetup: {\n            //工作表打印的属性\n            showGridLines: false,\n            paperSize: 9,\n            orientation: \"portrait\",\n            fitToPage: true,\n            fitToHeight:1,\n            fitToWidth: 1,\n            margins: {\n                left: 0.7,\n                right: 0.7,\n                top: 0.75,\n                bottom: 0.75,\n                header: 0.3,\n                footer: 0.3\n            }\n        },\n        headerFooter:{\n            oddFooter:\"第 \u0026P 页，共 \u0026N 页\"\n        },\n         // 导出默认样式\n        selfOptions:{\n            headConf:{\n                cell:{\n                    font:{\n                        name: '微软雅黑',\n                        color: { argb: 'FFFFFFFF' },\n                        family: 4,\n                        size: 10,\n                        underline: false,\n                        bold: true\n                    },\n                    alignment:{\n                        vertical: 'middle', \n                        horizontal: 'center'\n                    },\n                    border:{\n                        top: {style:'thin'},\n                        left: {style:'thin'},\n                        bottom: {style:'thin'},\n                        right: {style:'thin'}\n                    },\n                    fill:{\n                        type: 'pattern',\n                        pattern:'solid',\n                        fgColor:{argb:'FF2E4053'},\n                        bgColor:{argb:'FF2E4053'}\n                    }\n                }\n            },\n            bodyConf:{\n                cell:{\n                    font:{\n                        name: '微软雅黑',\n                        color: { argb: 'FF000000' },\n                        family: 4,\n                        size: 10,\n                        underline: false,\n                        bold: false\n                    },\n                    alignment:{\n                        vertical: 'middle', \n                        horizontal: 'left'\n                    },\n                    border:{\n                        top: {style:'thin'},\n                        left: {style:'thin'},\n                        bottom: {style:'thin'},\n                        right: {style:'thin'}\n                    },\n                    fill:{\n                        type: 'pattern',\n                        pattern:'solid',\n                        fgColor:{argb:'F9F9F9'},\n                        bgColor:{argb:'F9F9F9'}\n                    }\n                }\n            }\n        }\n    }\n}\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmlc%2Fjs-excel-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmlc%2Fjs-excel-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmlc%2Fjs-excel-export/lists"}