{"id":24203320,"url":"https://github.com/constantoduol/sprd","last_synced_at":"2025-09-22T01:32:20.168Z","repository":{"id":57367968,"uuid":"96768296","full_name":"constantoduol/Sprd","owner":"constantoduol","description":"A spreadsheet from the future","archived":false,"fork":false,"pushed_at":"2018-06-26T06:56:55.000Z","size":904,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-16T00:19:54.117Z","etag":null,"topics":["excel","javascript","reactjs","spreadsheet"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/constantoduol.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":"2017-07-10T11:07:38.000Z","updated_at":"2018-06-26T06:56:56.000Z","dependencies_parsed_at":"2022-08-23T20:11:02.545Z","dependency_job_id":null,"html_url":"https://github.com/constantoduol/Sprd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/constantoduol/Sprd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constantoduol%2FSprd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constantoduol%2FSprd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constantoduol%2FSprd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constantoduol%2FSprd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/constantoduol","download_url":"https://codeload.github.com/constantoduol/Sprd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constantoduol%2FSprd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276333902,"owners_count":25624046,"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-21T02:00:07.055Z","response_time":72,"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":["excel","javascript","reactjs","spreadsheet"],"created_at":"2025-01-13T22:21:50.906Z","updated_at":"2025-09-22T01:32:19.782Z","avatar_url":"https://github.com/constantoduol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\n`npm install sprd`\n\n## How it looks\n\n![Alt text](images/sprd.gif?raw=true \"Sprd in Action\")\n\nor \n\n[Demo Video](https://www.useloom.com/share/1106217b86584231b2bcdb583384fd5f)\n\n## Available features\n\n1. Keyboard navigation using arrow keys or page up and page down\n2. Copy and Paste\n3. Infinite scrolling vertically and horizontally\n4. Custom cell formatting\n5. Drag highlighting\n\n## Loading inital data\n\n```javascript\nimport {SprdContainer} from 'sprd';\n\nlet data = [\n  ['Name', 'Age'], \n  ['sam', 20], \n  ['Mike', 30], \n  ['Greg', 40], \n  ['Monroe', 50],\n  ['sam', 20], \n  ['Mike', 30], \n  ['Greg', 40], \n  ['Monroe', 50],\n  ['sam', 20], \n  ['Mike', 30], \n];\n\n\u003cSprdContainer \n  width={800}\n  height={600}\n  data={data}/\u003e\n\n```\n\n## Listening to events\n\n```javascript\nimport {SprdContainer} from 'sprd';\n\n\u003cSprdContainer \n  width={800}\n  height={600}\n  onEvent={(eventType, range, data) =\u003e {\n     console.log(eventType, range, data) \n     if(range) console.log(range.getAddress())\n  }}\n  data={data}/\u003e\n\n```\n\n## Overriding the cells with custom ones\n\n```javascript\n\nimport {SprdContainer} from 'sprd';\n\n\u003cSprdContainer \n  width={800}\n  height={600}\n  cellOverride={(cellInfo, innerCell, outerCell) =\u003e {\n    if(cellInfo.row === 0){\n      innerCell = (\n        \u003cselect {...innerCell.props} style={{padding: 3}} ref={innerCell.ref}\u003e\n          \u003coption\u003eHello\u003c/option\u003e\n          \u003coption\u003eWorld\u003c/option\u003e\n        \u003c/select\u003e\n      )\n    }\n    if(cellInfo.row === 0){\n      outerCell = \u003cspan {...outerCell.props} style={{fontWeight: 'bold'}}/\u003e\n    }\n\n    if(cellInfo.row \u003e 5 \u0026\u0026 cellInfo.row \u003c 10){\n      outerCell = \u003cspan {...outerCell.props} style={{color: 'green'}}/\u003e\n    }\n\n    if(cellInfo.dataType === \"number\"){\n      outerCell = \u003cspan {...outerCell.props} style={{color: 'blue', fontSize: 11}} key={outerCell.key}/\u003e\n    }\n    return {innerCell, outerCell}}\n  }\n  data={data}/\u003e\n\n```\n\n## Getting all data currently in the spreadsheet\n\n```javascript\nimport {Store} from 'sprd';\n\nconsole.log(Store.getData());\n\n```\nThis will return a json object with the top level keys corresponding to the row indices\nand the keys in the nested json objects corresponding to column indices\ne.g\n\n```javascript\n{\n  0:{0: \"Name\", 1: \"Age\"},\n  1:{0: \"sam\", 1: 20},\n  2:{0: \"Mike\", 1: 30},\n  3:{0: \"Greg\", 1: 40}\n}\n```\nNB: Any cells without data are not captured\n\n## Props and meaning\n\n1. `showHeaderLetters` - whether to show the excel like header letters at the top of columns, default is true\n2. `showFooter` - whether to show the footer that displays the cell address, default is true\n3. `infiniteScroll` - whether to scroll infinitely both vertically and horizontally, default is true\n4. `width` - the width in pixels of the grid, default is 1000\n5. `height` - the height in pixels of the grid, default is 800\n6. `onEvent` - javascript function to listen to events in the spreadsheet\n7. `columnDataTypes` - an array containing the list of column data types\n8. `cellOverride` - a callback to override default cells with your own custom cells\n9. `data` - an array of arrays containing the default data\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstantoduol%2Fsprd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconstantoduol%2Fsprd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstantoduol%2Fsprd/lists"}