{"id":19569192,"url":"https://github.com/d6y/s2s","last_synced_at":"2026-04-12T23:09:52.338Z","repository":{"id":136158051,"uuid":"37727372","full_name":"d6y/s2s","owner":"d6y","description":"Convert Spreadsheets to Scala Source","archived":false,"fork":false,"pushed_at":"2015-06-19T16:21:13.000Z","size":268,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T02:02:25.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d6y.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":"2015-06-19T14:48:24.000Z","updated_at":"2015-06-19T14:49:36.000Z","dependencies_parsed_at":"2023-03-13T11:04:35.671Z","dependency_job_id":null,"html_url":"https://github.com/d6y/s2s","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6y%2Fs2s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6y%2Fs2s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6y%2Fs2s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6y%2Fs2s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d6y","download_url":"https://codeload.github.com/d6y/s2s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240832495,"owners_count":19864944,"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":[],"created_at":"2024-11-11T06:08:01.482Z","updated_at":"2026-04-12T23:09:52.296Z","avatar_url":"https://github.com/d6y.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spreadsheet to Scala\n\n## Outline\n\nRead a spreadsheet, and for some specified set of cells...\n\n- convert cell formulas to functions.\n- convert cells without formulas to constants.\n- convert the current value of a formula in the spreadsheet to a unit test.\n\n### Example\n\nGiven a spreadsheet like this:\n\n```\n  +----- A ----\n1 |          11\n2 |          13\n3 | =SUM(A1,A2)\n```\n\n...it should be converted to something along the lines of this:\n\n```\nlazy val cellA1 = 11\nlazy val cellA2 = 13\ndef cellA3(x: Int, y: Int) = x + y\nasssert( cellA3(cellA1,cellA2) === 24 )\n```\n\n## Approach\n\n - Parse a formula into a tree\n - Chase references and include them\n - Generate code\n\n## Challenges\n\n- Excel formula syntax not uniform\n- Functions take values, arrays, ranges...\n- Differences between Scala and Excel formula behaviour\n- Cyclic references˜\n- Infering/converting types\n- References across worksheets\n- How does Excel treat dates and timezones?\n- What are array formula?\n- The cached value for a formula could be stale.\n- Spreadsheets other than Excel\n- ...\n\nWe'll do some simple things, and see what cases present themselves.\n\n# Current Status\n\nDoes almost nothing:\n\n```\n$ sbt run\n[info] Running s2s.Main\nFormulaCell(SUM(A1,A2),NumericCell(24.0))\nParsing SUM(A1,A2) ...\nSuccess(Func(SUM,CellRef(A1),CellRef(A2)))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd6y%2Fs2s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd6y%2Fs2s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd6y%2Fs2s/lists"}