{"id":15032148,"url":"https://github.com/omid/formula","last_synced_at":"2025-04-10T00:22:04.641Z","repository":{"id":58655196,"uuid":"527538545","full_name":"omid/formula","owner":"omid","description":"A parser and evaluator of spreadsheet-like formulas","archived":false,"fork":false,"pushed_at":"2024-10-18T09:17:55.000Z","size":69,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T11:12:17.099Z","etag":null,"topics":["excel","formula","formulas","google-sheets","googlesheets","libreoffice","libreoffice-calc","microsoft-excel","ms-excel","office365","rust","sheets","spreadsheet"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/omid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2022-08-22T11:41:13.000Z","updated_at":"2024-10-18T09:17:54.000Z","dependencies_parsed_at":"2024-11-08T23:01:24.187Z","dependency_job_id":"43107841-92b9-4ed4-867e-56ed0883a0bf","html_url":"https://github.com/omid/formula","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.24242424242424243","last_synced_commit":"801d22cb2da3e2534f9a6eabeae2dd0148951562"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omid%2Fformula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omid%2Fformula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omid%2Fformula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omid%2Fformula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omid","download_url":"https://codeload.github.com/omid/formula/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247836401,"owners_count":21004392,"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":["excel","formula","formulas","google-sheets","googlesheets","libreoffice","libreoffice-calc","microsoft-excel","ms-excel","office365","rust","sheets","spreadsheet"],"created_at":"2024-09-24T20:17:31.270Z","updated_at":"2025-04-10T00:22:04.622Z","avatar_url":"https://github.com/omid.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Crates.io](https://img.shields.io/crates/v/formula.svg?style=flat)](https://crates.io/crates/formula)\n[![npm](https://img.shields.io/npm/v/formula-wasm.svg?style=flat)](https://npmjs.com/package/formula-wasm)\n[![Workflow Status](https://github.com/omid/formula/workflows/ci/badge.svg)](https://github.com/omid/formula/actions?query=workflow%3A%22ci%22)\n\n\u003ch1 align=\"center\"\u003e\u003cem\u003eFormula\u003c/em\u003e\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n  A parser and evaluator of spreadsheet-like formulas\n\u003c/h3\u003e\n\nFormula is in its early stages and is not ready for production use.\n\nSo far we have the following features:\n\n- 18 date time functions\n- 26 text functions\n- 26 math functions\n- 7 logical functions\n- 2 web functions\n- plus all arithmetic and comparison operators\n\n#### Installation and usage\n\n##### Rust\n\nAdd this library to your project with `cargo add formula` or add `formula = \"*\"` to your `Cargo.toml` file.\n\nUse it similar to the following code:\n\n```rust\nuse formula::{Formula, Expr, Result};\n\nfn main() -\u003e Result\u003c()\u003e {\n    let formula = Formula::new(\"=UPPER(TRIM('   Hello '))\")?;\n    let value = formula.parse()?;\n    assert_eq!(value, Expr::String(\"HELLO\".to_string()));\n    Ok(())\n}\n```\n\n##### JavaScript\n\nAdd this library to your project with `npm install formula-wasm` or add `formula-wasm` to your `package.json` file.\n\nUse it similar to the following code:\n\n```js\nimport { parse } from 'formula-wasm';\n\nconst value = parse('=UPPER(TRIM(\"   Hello \"))');\nconsole.assert(value, \"HELLO\");\n```\n\n#### What we do not support, yet:\n\n- We don't support all existing functions in the world, but we would like to add more of them, like Excel functions, Google Sheets functions, and so on\n- At the moment, we don't support table data. It means you need to extract table data and pass theirs values to this library\n- We do not support simple formulas like `1+1` or as argument like `AND(1\u003e3, 1\u003c3)` or `SUM(2-1, 2)`. Instead, you can use our `F.` functions like `AND(F.GT(1, 3), F.LT(1, 3))` or `SUM(F.SUB(2, 1), 2)`\n- We still do not support parentheses to change the order of operations, but you can use our `F.` functions. So for example instead of `2*(1+1)`, you should use `F.MUL(2, F.ADD(1, 1))`\n\n#### Contributing\n\nWe would love to have your contribution! Please read our [contributing guidelines](CONTRIBUTING.md) to get started.\n\n#### Inspired by\n\n- [formulajs](https://github.com/formulajs/formulajs)\n- [hyperformula](https://github.com/handsontable/hyperformula)\n\n#### License\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE.md) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomid%2Fformula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomid%2Fformula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomid%2Fformula/lists"}