{"id":23087309,"url":"https://github.com/n3ps/paste-from-excel","last_synced_at":"2025-08-16T06:32:43.284Z","repository":{"id":57320494,"uuid":"260812258","full_name":"n3ps/paste-from-excel","owner":"n3ps","description":"Utility to allow pasting data intact from Excel into an HTML table with editable elements","archived":false,"fork":false,"pushed_at":"2021-06-30T01:55:13.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T15:21:12.488Z","etag":null,"topics":["clipboard","copy-paste","excel","html-tables"],"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/n3ps.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}},"created_at":"2020-05-03T02:14:43.000Z","updated_at":"2024-07-20T21:36:39.000Z","dependencies_parsed_at":"2022-08-26T01:10:56.475Z","dependency_job_id":null,"html_url":"https://github.com/n3ps/paste-from-excel","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3ps%2Fpaste-from-excel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3ps%2Fpaste-from-excel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3ps%2Fpaste-from-excel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3ps%2Fpaste-from-excel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n3ps","download_url":"https://codeload.github.com/n3ps/paste-from-excel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230018913,"owners_count":18160483,"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":["clipboard","copy-paste","excel","html-tables"],"created_at":"2024-12-16T19:55:53.126Z","updated_at":"2024-12-16T19:55:53.627Z","avatar_url":"https://github.com/n3ps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paste-from-excel\n\nUtility to allow pasting data intact from Excel (or any spreadsheet) into an HTML table with editable elements.\n\nRequires a table with input elements or elements with contenteditable set to true.\n\n## Install\n```\nnpm install paste-from-excel\n```\n\n## Usage with libraries\n\n### Material UI \\\u003cTable\\\u003e\n```jsx\nimport parse from 'paste-from-excel'\n\nconst handlePaste = (e) =\u003e {\n  return parse(e)\n}\n\nreturn (\n  \u003cTableContainer onPaste={ handlePaste }\u003e\n    \u003cTable\u003e\n    /* TableCells with inputs */\n    \u003c/Table\u003e\n  \u003c/TableContainer\u003e\n)\n```\n\n### React-Table\n```jsx\nimport parse from 'paste-from-excel'\n\nconst handlePaste = (e) =\u003e {\n  const options = {\n    rowSelector: '.rt-tr-group',\n    cellSelector: '.rt-td'\n  }\n\n  return parse(e, options)\n}\n\nreturn (\n  \u003cdiv onPaste={ handlePaste }\u003e\n    \u003cReactTable\n      data={data}\n      columns={columns}\n    /\u003e\n  \u003c/div\u003e\n)\n```\n\n## Usage with plain HTML\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/n3ps/paste-from-excel/dist/paste-from-excel.min.js\"\u003e\n\n\u003ctable id=\"my-table\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cinput /\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cinput /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cscript\u003e\n  var myTable = document.querySelector('#my-table')\n  myTable.addEventListener('paste', handlePaste)\n\n  function handlePaste (e) {\n    return window.PasteFromExcel(e)\n  }\n\u003c/script\u003e\n```\n\n### Options\n\nrowSelector\n- Sets the selector to identify a \"row\". Default: `tr`\n\ncellSelector\n- Sets the selector to identify a \"cell\". Default: `td`\n\ninputSelector\n- Sets the selector for the element that act on the paste event, and to find suceeding \"editable elements\". Default: `input`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3ps%2Fpaste-from-excel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3ps%2Fpaste-from-excel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3ps%2Fpaste-from-excel/lists"}