{"id":40747039,"url":"https://github.com/jackfiszr/pl2xl","last_synced_at":"2026-01-21T15:36:47.379Z","repository":{"id":259620073,"uuid":"877399962","full_name":"jackfiszr/pl2xl","owner":"jackfiszr","description":"Nodejs-polars wrapper with `readExcel` and `writeExcel` methods.","archived":false,"fork":false,"pushed_at":"2025-08-31T10:29:03.000Z","size":82,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T12:22:39.610Z","etag":null,"topics":["data-analysis","data-science","deno","excel","excel-reader","excel-writer","nodejs","polars"],"latest_commit_sha":null,"homepage":"https://jsr.io/@jackfiszr/pl2xl","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackfiszr.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-23T15:27:03.000Z","updated_at":"2025-08-31T10:29:06.000Z","dependencies_parsed_at":"2024-10-26T23:24:05.613Z","dependency_job_id":"63da6d05-ab6f-4be2-b30e-332c9b909107","html_url":"https://github.com/jackfiszr/pl2xl","commit_stats":null,"previous_names":["jackfiszr/pl2xl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackfiszr/pl2xl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfiszr%2Fpl2xl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfiszr%2Fpl2xl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfiszr%2Fpl2xl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfiszr%2Fpl2xl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackfiszr","download_url":"https://codeload.github.com/jackfiszr/pl2xl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackfiszr%2Fpl2xl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-analysis","data-science","deno","excel","excel-reader","excel-writer","nodejs","polars"],"created_at":"2026-01-21T15:36:47.308Z","updated_at":"2026-01-21T15:36:47.373Z","avatar_url":"https://github.com/jackfiszr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pl2xl \u003csmall\u003eExtended Polars Library with Excel Support\u003c/small\u003e\n\n[![JSR](https://jsr.io/badges/@jackfiszr/pl2xl)](https://jsr.io/@jackfiszr/pl2xl)\n[![JSR Score](https://jsr.io/badges/@jackfiszr/pl2xl/score)](https://jsr.io/@jackfiszr/pl2xl)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jackfiszr/pl2xl)](https://github.com/jackfiszr/pl2xl/pulse)\n[![GitHub last commit](https://img.shields.io/github/last-commit/jackfiszr/pl2xl)](https://github.com/jackfiszr/pl2xl/commits/main)\n[![GitHub](https://img.shields.io/github/license/jackfiszr/pl2xl)](https://github.com/jackfiszr/pl2xl/blob/main/LICENSE)\n\nThis is a wrapper library around the\n[nodejs-polars](https://pola-rs.github.io/nodejs-polars/index.html) package that\nadds convenient `readExcel` and `writeExcel` methods for working with Excel\nfiles.\n\nFor Excel operations, this library uses\n[ExcelJS](https://github.com/exceljs/exceljs).\n\n## `pl.readExcel`\n\n```typescript\npl.readExcel(\n    filePath: string,\n    options?: {\n        sheetName?: string | null,\n        inferSchemaLength?: number,\n    },\n) → ExtendedDataFrame\n```\n\nReads an Excel file and converts the specified worksheet into an\n`ExtendedDataFrame` (a `DataFrame` that has the `writeExcel` method).\n\n### Parameters\n\n- **filePath** (string):\\\n  The path to the Excel file to be read.\n\n- **options** (object, optional):\\\n  A dictionary containing additional options:\n  - **sheetName** (string | null, optional):\\\n    The name of the worksheet to read. Defaults to the first worksheet if not\n    specified.\n  - **inferSchemaLength** (number, optional):\\\n    The number of rows to infer the schema from. Defaults to 100.\n\n### Returns\n\n- **ExtendedDataFrame**:\\\n  A DataFrame containing the data from the specified worksheet.\n\n### Example\n\n```typescript\nimport pl from \"jsr:@jackfiszr/pl2xl@0.1.4\";\n\nconst df = await pl.readExcel(\"data.xlsx\", { sheetName: \"Sheet1\" });\nconsole.log(df.toString());\n```\n\n---\n\n## `pl.DataFrame.writeExcel`\n\n```typescript\npl.DataFrame.writeExcel(\n    filePath: string,\n    options?: {\n        sheetName?: string | string[],\n        includeHeader?: boolean,\n        autofitColumns?: boolean,\n        tableStyle?: string,\n        header?: string,\n        footer?: string,\n        withWorkbook?: (workbook: ExcelJS.Workbook) =\u003e void,\n    },\n) → Promise\u003cvoid\u003e\n```\n\nWrites the dataframe to an Excel `xlsx` file.\n\n### Parameters\n\n- **filePath** (string):\\\n  The path where the Excel file will be saved.\n\n- **options** (object, optional):\\\n  A dictionary containing additional options:\n  - **sheetName** (string | string[], optional):\\\n    Name(s) of the worksheet(s). Defaults to `Sheet1`, `Sheet2`, etc.\n  - **includeHeader** (boolean, optional):\\\n    Whether to include column headers in the Excel file. Defaults to `true`.\n  - **autofitColumns** (boolean, optional):\\\n    Whether to auto-fit the columns based on content. Defaults to `true`.\n  - **tableStyle** (string, optional):\\\n    The style to apply to the table(s) in the Excel file.\n  - **header** (string, optional):\\\n    The header text to add at the top of each worksheet.\n  - **footer** (string, optional):\\\n    The footer text to add at the bottom of each worksheet.\n  - **withWorkbook** (function, optional):\\\n    A callback function that receives the `ExcelJS.Workbook` instance for\n    additional customization.\n\n### Returns\n\n- **Promise\u003cvoid\u003e**:\\\n  A promise that resolves when the Excel file has been written.\n\n### Example\n\n```typescript\nimport pl from \"jsr:@jackfiszr/pl2xl@0.1.4\";\n\nconst df = pl.DataFrame({\n  Name: [\"Alice\", \"Bob\"],\n  Age: [25, 30],\n});\n\nawait df.writeExcel(\"output.xlsx\", {\n  sheetName: \"People\",\n  includeHeader: true,\n  autofitColumns: true,\n});\n```\n\n## `pl.writeExcel` \u003csmall\u003e(for writing multiple dataframes to separate worksheets)\u003c/small\u003e\n\n```typescript\npl.writeExcel(\n    df: ExtendedDataFrame | ExtendedDataFrame[],\n    filePath: string,\n    options?: {\n        sheetName?: string | string[],\n        includeHeader?: boolean,\n        autofitColumns?: boolean,\n        tableStyle?: string,\n        header?: string,\n        footer?: string,\n        withWorkbook?: (workbook: ExcelJS.Workbook) =\u003e void,\n    },\n) → Promise\u003cvoid\u003e\n```\n\nWrites one or more Polars `ExtendedDataFrame` objects to an Excel file.\n\n### Parameters\n\nHas one additional parameter that is the first parameter:\n\n- **df** (ExtendedDataFrame | ExtendedDataFrame[]):\\\n  The DataFrame(s) to write to the Excel file.\n\n### Returns\n\n- **Promise\u003cvoid\u003e**:\\\n  A promise that resolves when the Excel file has been written.\n\n### Example\n\n```typescript\nimport pl from \"jsr:@jackfiszr/pl2xl@0.1.4\";\n\nconst df1 = pl.DataFrame({\n  Name: [\"Alice\", \"Bob\"],\n  Age: [25, 30],\n});\n\nconst df2 = pl.DataFrame({\n  Name: [\"Cat\", \"Dog\"],\n  Age: [14, 10],\n});\n\nawait pl.writeExcel([df1, df2], \"output.xlsx\", {\n  sheetName: [\"People\", \"Animals\"],\n});\n```\n\n---\n\n## nodejs-polars\n\nFor the core functionality of the library, please refer to the official\n[nodejs-polars](https://pola-rs.github.io/nodejs-polars/index.html)\ndocumentation.\n\n## License\n\nThis library is open-source and distributed under the GNU GENERAL PUBLIC LICENSE\n3.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackfiszr%2Fpl2xl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackfiszr%2Fpl2xl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackfiszr%2Fpl2xl/lists"}