service/vendor/github.com/xuri/efp
lwl0608 9a00286db6 service 2023-12-21 22:17:40 +08:00
..
CODE_OF_CONDUCT.md service 2023-12-21 22:17:40 +08:00
LICENSE service 2023-12-21 22:17:40 +08:00
PULL_REQUEST_TEMPLATE.md service 2023-12-21 22:17:40 +08:00
README.md service 2023-12-21 22:17:40 +08:00
SECURITY.md service 2023-12-21 22:17:40 +08:00
efp.go service 2023-12-21 22:17:40 +08:00

README.md

EFP (Excel Formula Parser)

Build Status Code Coverage Go Report Card go.dev Licenses FOSSA Status

Using EFP (Excel Formula Parser) you can get an Abstract Syntax Tree (AST) from Excel formula.

Installation

go get github.com/xuri/efp

Example

package main

import "github.com/xuri/efp"

func main() {
    ps := efp.ExcelParser()
    ps.Parse("=SUM(A3+B9*2)/2")
    println(ps.PrettyPrint())
}

Get AST

SUM <Function> <Start>
    A3 <Operand> <Range>
    + <OperatorInfix> <Math>
    B9 <Operand> <Range>
    * <OperatorInfix> <Math>
    2 <Operand> <Number>
 <Function> <Stop>
/ <OperatorInfix> <Math>
2 <Operand> <Number>

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.

FOSSA Status