{"id":23760570,"url":"https://github.com/sqlpage/sqlpage-spreadsheet","last_synced_at":"2025-09-05T06:31:21.299Z","repository":{"id":261023314,"uuid":"851469301","full_name":"sqlpage/sqlpage-spreadsheet","owner":"sqlpage","description":"An excel-like spreadsheet component for SQLPage","archived":false,"fork":false,"pushed_at":"2025-08-04T11:24:07.000Z","size":67448,"stargazers_count":13,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T08:36:05.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sql-page.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sqlpage.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}},"created_at":"2024-09-03T06:44:45.000Z","updated_at":"2025-08-04T11:22:44.000Z","dependencies_parsed_at":"2025-05-22T23:39:36.995Z","dependency_job_id":"8db0fdcb-93d1-468d-940a-68b2f70624e8","html_url":"https://github.com/sqlpage/sqlpage-spreadsheet","commit_stats":null,"previous_names":["sqlpage/sqlpage-spreadsheet"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sqlpage/sqlpage-spreadsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlpage%2Fsqlpage-spreadsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlpage%2Fsqlpage-spreadsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlpage%2Fsqlpage-spreadsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlpage%2Fsqlpage-spreadsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqlpage","download_url":"https://codeload.github.com/sqlpage/sqlpage-spreadsheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlpage%2Fsqlpage-spreadsheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722688,"owners_count":25156300,"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-05T02:00:09.113Z","response_time":402,"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":"2024-12-31T20:31:47.437Z","updated_at":"2025-09-05T06:31:20.640Z","avatar_url":"https://github.com/sqlpage.png","language":"TypeScript","readme":"# [SQLPage](https://sql.datapage.app) Spreadsheet component\n\n\u003e [!WARNING]\n\u003e **Important legal notice** This component is not distributed under the same permissive MIT license as the rest of SQLpage, but rather under the [GNU AGPL v3 license](./LICENSE).\n\u003e This means that you can either:\n\u003e - use the component in a project that is itself open source under the AGPL license, for free, or\n\u003e - use it in a commercial, closed source, setting by **buying a 600€ yearly license** for the component from us: contact@datapage.app\n\nThe spreadsheet component generates an online editable spreadsheet similar to Google Sheets or Excel, the contents of which are loaded from the results of your SQL query.  \nIt has the ability to edit cell data by posting their contents to another SQLpage.\n\n## Example\n\nUse it with\n\n```sql\nselect 'spreadsheet' as component;\n\nselect 1 as x, id as y, my_column as value\nfrom my_table;\n```\n\n## Screenshot\n\n![screenshot](docs/screenshot.png)\n## Documentation\n### Top-level properties\n\n- **update\\_link**:  the name of another sql file, to which cell contents will be posted on update. The sql file will receive the variables:\n  - `:x` and `:y` (position of the cell that was updated),\n  - `:value` (the new textual contents of the cell), and\n  - `:id` if an id was assigned to the cell from the row-level properties.\n- **freeze\\_x**: the number of columns to freeze on the left side\n- **freeze\\_y**: the number of rows to freeze on the top side\n- **sheet\\_name**: the name of the worksheet (displayed in the bottom left corner, as the tab name)\n- **column\\_width**: the default width of the columns (in px)\n- **row\\_height**: the default height of the rows (in px)\n- **show\\_grid**: if the gridlines are shown (default: `true`)\n\n### Row-Level properties\n\n- **x** the value of the x-axis (horizontal cell number)\n- **y** the value of the y-axis (vertical cell number)\n- **value** the value of the cell\n- **id** the id of the cell (will be passed as `:id` to the update_link sql file)\n- **bold** If present, the cell text is bold\n- **italic** If present, the cell text is italic\n- **color** cell background color. Can be a [SQLPage color name](https://sql.datapage.app/colors.sql) or a hexadecimal color code like `#80cbc4`.\n- **text_align_center** If present, the cell text is centered\n- **text_align_right** If present, the cell text is right-aligned\n- **text_align_justified** If present, the cell text is justified\n- **text_align_distributed** If present, the cell text is distributed\n- **number_format** format the number according to the specified number format. Uses [excel number format codes](https://support.microsoft.com/en-us/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68).\n- **font_family** The font family for the cell text\n- **font_size** The font size for the cell text (in points)\n- **underline** If present, the cell text is underlined\n- **strikethrough** If present, the cell text has a strikethrough\n- **text_color** The color of the cell text. Can be a [SQLPage color name](https://sql.datapage.app/colors.sql) or a hexadecimal color code.\n- **vertical_align_top** If present, the cell content is aligned to the top\n- **vertical_align_middle** If present, the cell content is aligned to the middle\n- **vertical_align_bottom** If present, the cell content is aligned to the bottom\n- **wrap_strategy_overflow** If present, text overflows to the next cell if empty\n- **wrap_strategy_clip** If present, text is clipped if it exceeds cell width\n- **wrap_strategy_wrap** If present, text wraps within the cell\n- **text_direction_rtl** If present, text direction is right-to-left\n\n### Example\n\n#### `index.sql`\n```sql\nselect 'spreadsheet' as component,\n  'spreadsheet_update.sql' as update_link;\n\nselect \n  row_number() over (order by created_at) as x, -- x-axis: chronological order\n  1 as y, -- y-axis: second row\n  todo_item as value, -- cell content: todo item\n  todo_id as id -- cell id (used for update link)\n  '#80cbc4' as color -- light teal\nfrom todos\norder by created_at;\n```\n#### `spreadsheet_update.sql`\n\n```sql\nupdate todos set todo_item = :value where id = :id;\n```\n\nSee the [full example](./demo/spreadsheet.sql) in the demo folder.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlpage%2Fsqlpage-spreadsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqlpage%2Fsqlpage-spreadsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlpage%2Fsqlpage-spreadsheet/lists"}