{"id":40300581,"url":"https://github.com/simon5057/xlsx-preview","last_synced_at":"2026-01-20T05:37:59.917Z","repository":{"id":57401714,"uuid":"417450166","full_name":"simon5057/xlsx-preview","owner":"simon5057","description":"Preview the .xlsx in the browser, convert to HTML with styles.","archived":false,"fork":false,"pushed_at":"2022-11-17T08:30:24.000Z","size":1414,"stargazers_count":28,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-27T05:53:03.316Z","etag":null,"topics":["html","preview","xlsx","xlsx-preview"],"latest_commit_sha":null,"homepage":"https://simon5057.github.io/xlsx-preview/","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/simon5057.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}},"created_at":"2021-10-15T09:55:13.000Z","updated_at":"2025-09-01T07:37:50.000Z","dependencies_parsed_at":"2023-01-23T09:30:15.730Z","dependency_job_id":null,"html_url":"https://github.com/simon5057/xlsx-preview","commit_stats":null,"previous_names":["nslyc/xlsx-preview"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/simon5057/xlsx-preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon5057%2Fxlsx-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon5057%2Fxlsx-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon5057%2Fxlsx-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon5057%2Fxlsx-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon5057","download_url":"https://codeload.github.com/simon5057/xlsx-preview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon5057%2Fxlsx-preview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28596578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: 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":["html","preview","xlsx","xlsx-preview"],"created_at":"2026-01-20T05:37:59.778Z","updated_at":"2026-01-20T05:37:59.889Z","avatar_url":"https://github.com/simon5057.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## XlsxPreview\n\nPreview the .xlsx in the browser, convert to HTML with styles.\nThe dependencies of this package is [exceljs](https://github.com/exceljs/exceljs), it build the pretty preview by exceljs.\nAnd it can run in a Worker.\n\n### Demo\n\nJump to the [demo page](./demo.html)\n\n### Installation\n\n```\n  npm install xlsx-preview\n```\nor\n```\n  yarn add xlsx-preview\n```\n\n### Importing\n\n#### CommonJS\n``` js\n  const xlsxPreview = require('xlsx-preview');\n```\n#### ESModule\n``` js\n  import xlsxPreview from 'xlsx-preview';\n```\n#### Browserify\nBefore import xlsxPreview.js on browser, you need import excel.js first.\n``` html\n  \u003cscript src=\"exceljs.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"xlsxPreview.js\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\n``` js\n  // ...\n  const result = await xlsxPreview.xlsx2Html(data, options);\n```\nSee [data](#data)\nSee [options](#options)\n#### data\nThe `data` can be one of the types, ArrayBuffer, Blob, or File.\n#### options\nThe `options` is optional.\n``` ts\n  export interface XlsxOptions {\n    output?: \"string\" | \"arrayBuffer\";\n    separateSheets: boolean;\n    minimumRows: number;\n    minimumCols: number;\n  }\n```\n- `options.output`: default `\"string\"`, set the output format, string or ArrayBuffer.\n- `separateSheets`: default `false`, whether the worksheets needs to be separated.\n  - If `separateSheets: true`, the `result` will be an Array.\n- `minimumRows`: default `20`, Regardless of whether the worksheet has enough rows, the minimum number of rows generated.\n-  `minimumCols`: default `16`, Regardless of whether the worksheet has enough cols, the minimum number of cols generated.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon5057%2Fxlsx-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon5057%2Fxlsx-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon5057%2Fxlsx-preview/lists"}