{"id":20556255,"url":"https://github.com/teoneag/table-editor","last_synced_at":"2025-03-06T06:43:38.035Z","repository":{"id":239776929,"uuid":"800495881","full_name":"Teoneag/Table-Editor","owner":"Teoneag","description":"A simple table editor with formula support build in Java \u0026 Swing","archived":false,"fork":false,"pushed_at":"2024-05-26T10:04:54.000Z","size":1164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T18:05:57.866Z","etag":null,"topics":["formulaparser","java","swing","tableeditor"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Teoneag.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}},"created_at":"2024-05-14T12:51:20.000Z","updated_at":"2024-05-26T10:04:57.000Z","dependencies_parsed_at":"2025-01-16T18:00:31.019Z","dependency_job_id":"4e80375e-31db-40c0-a885-8216f95f1f6e","html_url":"https://github.com/Teoneag/Table-Editor","commit_stats":null,"previous_names":["teoneag/table-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teoneag%2FTable-Editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teoneag%2FTable-Editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teoneag%2FTable-Editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teoneag%2FTable-Editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Teoneag","download_url":"https://codeload.github.com/Teoneag/Table-Editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242163851,"owners_count":20082224,"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":["formulaparser","java","swing","tableeditor"],"created_at":"2024-11-16T03:26:11.805Z","updated_at":"2025-03-06T06:43:38.013Z","avatar_url":"https://github.com/Teoneag.png","language":"Java","readme":"\u003cdiv align=\"center\"\u003e\n\u003cpre\u003e\n████████╗ █████╗ ██████╗ ██╗     ███████╗    ███████╗██████╗ ██╗████████╗ ██████╗ ██████╗ \n╚══██╔══╝██╔══██╗██╔══██╗██║     ██╔════╝    ██╔════╝██╔══██╗██║╚══██╔══╝██╔═══██╗██╔══██╗\n   ██║   ███████║██████╔╝██║     █████╗      █████╗  ██║  ██║██║   ██║   ██║   ██║██████╔╝\n   ██║   ██╔══██║██╔══██╗██║     ██╔══╝      ██╔══╝  ██║  ██║██║   ██║   ██║   ██║██╔══██╗\n   ██║   ██║  ██║██████╔╝███████╗███████╗    ███████╗██████╔╝██║   ██║   ╚██████╔╝██║  ██║\n   ╚═╝   ╚═╝  ╚═╝╚═════╝ ╚══════╝╚══════╝    ╚══════╝╚═════╝ ╚═╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝\n\u003c/pre\u003e\n\u003cdiv align=\"right\"\u003e\n\nA simple table editor with formula support build in Java \u0026 Swing\n\nBy [Teodor Neagoe](https://github.com/Teoneag)\n\n\u003c/div\u003e\n\u003cimg src=\"gifs/Table-Editor Preview.gif\" alt=\"Table-Editor\"/\u003e\n\u003c/div\u003e\n\n## Getting Started\n\n### 0. Prerequisites\n\n- Java 21 or higher\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/Teoneag/Table-Editor\n```\n\n### 2. Build \u0026 run\n\nYou can run it directly from gradle\n```bash\n./gradlew run\n```\n\nOr alternatively, first build it\n\n```bash\n./gradlew build\n```\n\nAnd then run it\n\n```bash\njava -jar app/build/libs/app.jar\n```\n\nOr you can use IntelliJ IDEA to run it. (open the project and run the App class)\n\n### 3. Enjoy!\n\n**⚠️ Don't forget to add \u003ccode\u003e=\u003c/code\u003e before the formula in the cell, just like in Excel! ⚠️**\n\n## Features\n\n### File management\n\n- create new table with custom size\n- save table as CSV\n- open table from CSV\n\n### Table\n\n- cells can hold\n  - normal text\n  - formulas\n    - the result of the formula is displayed\n    - just double click it to edit it and you can see the formula\n- move, resize columns\n\n### Formulas\n\n- Parentheses: ()\n- Binary operators: +, -, *, /, %, ^\n- Unary operators: - (negation)\n- Named functions with variable nr of args: pow, sqrt, abs, log, log10, exp, sin, cos, tan, min, max, sum, avg\n- References to table cells: A1, ZZ3\n  - live formula update (when you change a cell, all cells that depend on it are updated)\n- the design is very modular, so it's easy to add new functions or operators\n\n## Design choices\n\n- Save data: CSV\n- UI\n  - AppBar\n    - File\n      - New\n        - Select rows and columns\n      - Open\n      - Save\n      - Save As\n      - Exit\n    - Edit\n      - Undo\n      - Redo\n      - Cut\n      - Copy\n      - Paste\n    - Table\n      - Insert Row\n      - Insert Column\n      - Delete Row\n      - Delete Column\n    - Help\n      - About\n  - Table\n    - Show all saved ros and columns\n    - Before any row, column: \"-\" button to delete\n    - Between any row, column: \"+\" button to insert\n    - See the result of any cell, when selected show the formula\n    - If it's between \"\" it's text, otherwise it's a formula\n    - If the formula is invalid, show an error message as a pop-up\n- For decimal numbers use comma: 1,5\n- calculating equation\n  - tokenizer\n  - parser AST\n  - evaluator\n\n## Task\n\nWrite a table editor with formula support.\n\n- Language: Java\n- UI framework: Swing\n- Requirements\n    - edit a cell directly in the cell itself (not like Excel where you have a separate input field)\n    - optional: select/edit multiple cells at once\n- Formulas (write parser myself)\n  - parentheses\n  - binary operators\n  - unary operators\n  - named functions\n- references to table cells\n\nExample:\n```\npow(-2, A1 - 3) * (42 + B2)\n```\n- My choice: set of supported operators, functions names\n\n## Grading\n\n- the completeness of the implementation (the application should behave correctly with\n  any user actions and any user input in the table cells)\n- code quality (assume we will have to develop and maintain this project for a long time)\n- simple, tidy interface (not expected a particularly beautiful UI)\n\n## Plan -\u003e Actual: 6:24h\n\nChronological order. Planned time -\u003e actual time\n- read + make initial plan: 30m -\u003e 34m\n- swing example from GeeksForGeeks: 20m -\u003e 5m\n- read similar projects: 20m -\u003e 21m\n  - https://github.com/japplis/Joeffice\n- Sketch UI: 10m -\u003e 11m\n- UI in Swing: 30m -\u003e 2:30h\n- Formula parser \u0026 evaluator: 3h -\u003e 5h\n  - https://en.wikipedia.org/wiki/Shunting_yard_algorithm\n  - fix comma in cell: 10m -\u003e 20m\n  - https://www.geeksforgeeks.org/expression-evaluation/\n- test, fix \u0026 write tests: 3h -\u003e 2h:38m\n  - allow strings in cells, fix empty cell: 13m\n  - make formulas auto update: 20m\n  - not happened: fix infinite recursion if happens (a=b, b=a)\n  - make table full screen: 1m\n  - show row numbers: 20m\n    - https://stackoverflow.com/questions/64867515/how-to-add-row-header-in-table\n  - make open file work: 1:10h\n  - refactor: 34m\n  - fix create a new table pop up: if you change a value, and the other one is wrong, when u are asked again for the values, the good one is lost\n  - refactor table: 1h\n- documentation \u0026 push: 30m -\u003e 30m\n\n## ToDo\n\n- bonus: multiple cells: 1h\n- style: 1h\n- final testing + fix todos: 1h\n- when editing a cell, if you click on another cell, add that string to the current cell\n- if trying to open invalide file, show its contents and suggest fix\n- resize (add, remove cols)\n- icon\n- shortcuts (pressing esc on a cell should cancel the edit)\n- implement the following\n  - Comparison (==, !=, \u003c, \u003e, \u003c=, \u003e=)\n  - Logical AND (\u0026\u0026)\n  - Logical OR (||) \n  - Logical NOT (!)\n  - if(condition, value_if_true, value_if_false) - Returns one of two values depending on the condition.\n  - concat(string1, string2, ...)\n- select column when clicking on the name\n- theme changing\n- import, export to excel\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteoneag%2Ftable-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteoneag%2Ftable-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteoneag%2Ftable-editor/lists"}