{"_id":"@akkmoe/excel-utils","name":"@akkmoe/excel-utils","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@akkmoe/excel-utils","version":"1.0.0","type":"module","main":"dist/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/skyone-wzw/excel-utils.git"},"devDependencies":{"@types/node":"^25.0.3","typescript":"^5.9.3"},"peerDependencies":{"exceljs":"^4"},"gitHead":"3561ca88b1c1812b0182a82f47d67648d8db9d4c","types":"./dist/index.d.ts","_id":"@akkmoe/excel-utils@1.0.0","description":"A simple utility package for working with Excel files. This package provides functions to define columns, sheets, and build Excel files in a structured way.","bugs":{"url":"https://github.com/skyone-wzw/excel-utils/issues"},"homepage":"https://github.com/skyone-wzw/excel-utils#readme","_nodeVersion":"24.10.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-W33HzJ25b72PALiW1GaHzGVjqnR9Ar0t4FEumN1lW1FpVm336hWlKaWY0JJhjPLfi3gj4bThsJ+trh4bFGFe5g==","shasum":"5a6de357ae3eef2b9cd000c6990319b4d94e849e","tarball":"https://registry.npmjs.org/@akkmoe/excel-utils/-/excel-utils-1.0.0.tgz","fileCount":9,"unpackedSize":7803,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAe1omt22bPH/IPybSFhyBZCnA3YQ/hD7CTvK745DjmmAiBJ/xdla5ffJkuOUS3CXRpDdyY+eOii9wpI4/ckZnWPxA=="}]},"_npmUser":{"name":"akkmoe","email":"master@skyone.dev"},"directories":{},"maintainers":[{"name":"akkmoe","email":"master@skyone.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/excel-utils_1.0.0_1767773599642_0.7032265909066477"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T08:13:19.519Z","1.0.0":"2026-01-07T08:13:19.799Z","modified":"2026-01-07T08:13:20.095Z"},"maintainers":[{"name":"akkmoe","email":"master@skyone.dev"}],"description":"A simple utility package for working with Excel files. This package provides functions to define columns, sheets, and build Excel files in a structured way.","homepage":"https://github.com/skyone-wzw/excel-utils#readme","repository":{"type":"git","url":"git+https://github.com/skyone-wzw/excel-utils.git"},"bugs":{"url":"https://github.com/skyone-wzw/excel-utils/issues"},"readme":"## @akkmoe/excel-utils\r\n\r\nA simple utility package for working with Excel files. This package provides functions to define columns, sheets, and build Excel files in a structured way.\r\n\r\nInstallation\r\n\r\n```shell\r\nnpm install @akkmoe/excel-utils\r\n```\r\n\r\n## Example\r\n\r\n```ts\r\nimport {buildExcel, defineColumns, defineSheets, saveExcelNode} from \"@akkmoe/excel-utils\";\r\n\r\ninterface Record {\r\n    name: string;\r\n    age: number;\r\n    birthday: Date;\r\n}\r\n\r\nconst records: Record[] = [\r\n    {\r\n        name: \"Steve\",\r\n        age: 25,\r\n        birthday: new Date(2000, 0, 1),\r\n    },\r\n    {\r\n        name: \"Alex\",\r\n        age: 22,\r\n        birthday: new Date(2003, 0, 1),\r\n    },\r\n];\r\n\r\nconst columns = defineColumns<Record>([\r\n    {\r\n        header: \"ID\",\r\n        setter: (cell, _, index) => {\r\n            cell.value = index;\r\n        },\r\n    },\r\n    {\r\n        width: 10,\r\n        header: \"Name\",\r\n        setter: \"name\",\r\n    },\r\n    {\r\n        header: (cell) => {\r\n            cell.value = \"Age\";\r\n        },\r\n        setter: (cell, data) => {\r\n            cell.value = data.age;\r\n        },\r\n    },\r\n    {\r\n        width: 12,\r\n        header: \"Birthday\",\r\n        setter: (cell, data) => {\r\n            cell.value = data.birthday;\r\n            cell.style.numFmt = \"yyyy-MM-dd\";\r\n        },\r\n    },\r\n]);\r\n\r\nconst sheets = defineSheets([\r\n    {\r\n        name: \"example\",\r\n        columns: columns,\r\n    },\r\n]);\r\n\r\nconst workbook = await buildExcel({data: records, sheets});\r\n\r\nawait saveExcelNode(workbook, \"example.xlsx\");\r\n```\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n","readmeFilename":"README.md","_rev":"1-30b0e80a1529c6a32d5ae22fe8287ea7"}