Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuri/efp
Go Language Microsoft Excel™ Formula Parser
https://github.com/xuri/efp
ast efp excel excelize formula formula-parser go golang parser spreadsheet xlsx
Last synced: 15 days ago
JSON representation
Go Language Microsoft Excel™ Formula Parser
- Host: GitHub
- URL: https://github.com/xuri/efp
- Owner: xuri
- License: bsd-3-clause
- Created: 2017-07-08T12:42:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T16:23:01.000Z (7 months ago)
- Last Synced: 2024-06-18T13:50:38.931Z (5 months ago)
- Topics: ast, efp, excel, excelize, formula, formula-parser, go, golang, parser, spreadsheet, xlsx
- Language: Go
- Homepage: https://xuri.me/excelize
- Size: 40 KB
- Stars: 112
- Watchers: 14
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# EFP (Excel Formula Parser)
[![Build Status](https://github.com/xuri/efp/workflows/Go/badge.svg)](https://github.com/xuri/efp/actions?workflow=Go)
[![Code Coverage](https://codecov.io/gh/xuri/efp/branch/master/graph/badge.svg)](https://codecov.io/gh/xuri/efp)
[![Go Report Card](https://goreportcard.com/badge/github.com/xuri/efp)](https://goreportcard.com/report/github.com/xuri/efp)
[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/xuri/efp)
[![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fxuri%2Fefp.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fxuri%2Fefp?ref=badge_shield)Using EFP (Excel Formula Parser) you can get an Abstract Syntax Tree (AST) from Excel formula.
## Installation
```bash
go get github.com/xuri/efp
```## Example
```go
package mainimport "github.com/xuri/efp"
func main() {
ps := efp.ExcelParser()
ps.Parse("=SUM(A3+B9*2)/2")
println(ps.PrettyPrint())
}
```Get AST
```text
SUM
A3
+
B9
*
2
/
2
```## Contributing
Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.
## Credits
EFP (Excel Formula Parser) is a Go language port of E. W. Bachtal's Excel formula parser.
## Licenses
This program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause).
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fxuri%2Fefp.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fxuri%2Fefp?ref=badge_large)