{"id":31112093,"url":"https://github.com/yowainwright/xldx","last_synced_at":"2025-09-17T08:55:30.153Z","repository":{"id":313625457,"uuid":"1051915568","full_name":"yowainwright/xldx","owner":"yowainwright","description":"wip: another js, excel utility with dx on the brain","archived":false,"fork":false,"pushed_at":"2025-09-07T11:19:49.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-07T12:27:33.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jeffry.in/xldx/","language":"TypeScript","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/yowainwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-07T01:56:37.000Z","updated_at":"2025-09-07T11:21:57.000Z","dependencies_parsed_at":"2025-09-07T12:27:38.106Z","dependency_job_id":"d72863f2-1bf9-4c13-bd8e-aecda2d7d25b","html_url":"https://github.com/yowainwright/xldx","commit_stats":null,"previous_names":["yowainwright/xldx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yowainwright/xldx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fxldx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fxldx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fxldx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fxldx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yowainwright","download_url":"https://codeload.github.com/yowainwright/xldx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fxldx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275563941,"owners_count":25487544,"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-09-17T02:00:09.119Z","response_time":84,"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":[],"created_at":"2025-09-17T08:55:25.845Z","updated_at":"2025-09-17T08:55:30.147Z","avatar_url":"https://github.com/yowainwright.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xldx\n\nJS Excel file builder with zero dependencies.\n\n## Installation\n\n```bash\nnpm install xldx\n# or\nbun add xldx\n```\n\n## Features\n\n- **Zero dependencies**\n- Pattern-based styling and theming\n- Multi-sheet support\n- Full type safety\n- Works in browsers and node, bun, or deno\n- \u003c 17KB minified\n\n## Quick Start\n\n```typescript\nimport { Xldx } from 'xldx';\n\n// Sample data\nconst data = [\n  { id: 1, name: 'John', age: 30, status: 'active' },\n  { id: 2, name: 'Jane', age: 25, status: 'inactive' },\n  { id: 3, name: 'Bob', age: 35, status: 'active' }\n];\n\n// Create Excel builder\nconst xlsx = new Xldx(data);\n\n// Create a sheet with columns\nxlsx.createSheet(\n  { name: 'Users' },\n  { key: 'id', header: 'ID', width: 10 },\n  { key: 'name', header: 'Name', width: 20 },\n  { key: 'age', header: 'Age', width: 10 },\n  { key: 'status', header: 'Status', width: 15 }\n);\n\n// node, bun, or deno - write to file\nawait xlsx.write('users.xlsx');\n\n// Browser - trigger download\nawait xlsx.download('users.xlsx');\n\n// Get raw data\nconst buffer = await xlsx.toBuffer(); // Buffer\nconst uint8Array = await xlsx.toUint8Array(); // Uint8Array\nconst blob = await xlsx.toBlob(); // Browser Blob\n```\n\n## Advanced Usage\n\n### Themes\n\n```typescript\nimport { Xldx, themes } from 'xldx';\n\nconst xlsx = new Xldx(data);\nxlsx.setTheme(themes.dark);\n```\n\n### Pattern-Based Styling\n\n```typescript\nxlsx.createSheet(\n  { name: 'StyledSheet' },\n  {\n    key: 'status',\n    header: 'Status',\n    patterns: {\n      bgColorPattern: (context) =\u003e {\n        if (context.value === 'active') {\n          return { fill: { type: 'pattern', pattern: 'solid', fgColor: '90EE90FF' } };\n        }\n        return null;\n      }\n    }\n  }\n);\n```\n\n### Zebra Striping\n\n```typescript\nxlsx.createSheet(\n  { name: 'ZebraSheet' },\n  {\n    key: 'data',\n    patterns: {\n      bgColorPattern: 'zebra' // Built-in zebra pattern\n    }\n  }\n);\n```\n\n## API\n\n### Constructor\n\n```typescript\nnew Xldx(data: DataRow[] | SheetsData, options?: XldxOptions)\n```\n\n### Methods\n\n- `setTheme(theme: ColorTheme): this` - Set the color theme\n- `createSheet(options: SheetOptions, ...columns: ColumnDefinition[]): this` - Create a new worksheet\n- `createSheets(sheets: Array\u003c{options: SheetOptions; columns: ColumnDefinition[]}\u003e): this` - Create multiple worksheets\n- `toBuffer(): Promise\u003cBuffer\u003e` - Generate Excel file as Buffer (node, bun, or deno)\n- `toUint8Array(): Promise\u003cUint8Array\u003e` - Generate Excel file as Uint8Array\n- `toBlob(): Promise\u003cBlob\u003e` - Generate Excel file as Blob (Browser)\n- `download(filename?: string): Promise\u003cvoid\u003e` - Trigger file download (Browser only)\n- `write(filePath: string): Promise\u003cvoid\u003e` - Write Excel file to disk (node, bun, or deno only)\n- `toJSON(): any` - Export workbook structure as JSON\n- `static fromJSON(json: any): Xldx` - Create from JSON structure\n- `static read(data: Uint8Array | Buffer): Promise\u003cany\u003e` - Read XLSX file\n\n## Development\n\n```bash\n# Install dependencies\nbun install\n\n# Run tests\nbun test\n\n# Build\nbun run build\n\n# Lint\nbun run lint\n\n# Type check\nbun run typecheck\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fxldx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyowainwright%2Fxldx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fxldx/lists"}