efp

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

efp

Project Build StatusGo Report Card

There are lot of people who use excel in their day to day operations. They are well versed with excel formulas. Having support for excel formulas in a software system would be of great value of end users. Some target groups:

  • Project Managers
  • Process Planners
  • BOM Managers
  • Finance Managers

Pre-requisites

Go version - 1.12 and above

Roadmap

  1. Drop 1:
    • Support for all Logical functions
    • Support for all text functions
  2. Drop 2:
    • Support for building a range
    • Support for Math & Trig with exception of array functions
    • Support for Date & Time functions

Excel functions supported

Text Functions

  • CONCAT
  • CONCATENATE
  • EXACT
  • FIND
  • FIXED - Todo
  • LEFT
  • LEN
  • LOWER
  • MID
  • PROPER
  • REPLACE
  • REPT
  • RIGHT
  • SEARCH
  • SUBSTITUTE
  • TRIM
  • UPPER

Approach

Use gval to implement Excel formula language

How to install

TODO

Examples

TODO - Draft only

Use-case 1

Initialize the excel formula parse

package main

include (
    praveentiru/efp
)

func main() int {
    parser := efp.CreateParser()
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exact

func Exact(a string, b string) bool

Exact implments Excel's EXACT function

func Find

func Find(f, w string, pos int) int

Find implements Excel's FIND function Deviation: pos is mandatory input

func Left

func Left(s string, l int) string

Left implements Excel's LEFT function Deviation: No default value for l unlike Excel where it is 1

func Len

func Len(s string) int

Len implements Excel's LEN function

func Lower

func Lower(s string) string

Lower implements Excel's LOWER function

func Mid

func Mid(s string, strt, num int) string

Mid implements Excel's MID function

func Parse

func Parse(r io.WriterTo) (gval.Evaluable, error)

Parse parses the excel formula provided and returns the Eval interface which can be used to evaluate formula

func Proper

func Proper(s string) string

Proper implements Excel's PROPER function

func Replace

func Replace(old string, strt, num int, newStr string) string

Replace implements Excel's REPLACE function

func Rept

func Rept(s string, r int) string

Rept implements Excel's REPT function

func Right(s string, num int) string

Right implements Excel's RIGHT function

func Search(fnd, in string, pos int) int

Search implements Excel's SEARCH function Deviation: pos parameter is mandatory in GO

func Substitute

func Substitute(src, old, new string, inst int) string

Substitute implements Excel's SUBSTITUTE function Deviation: Instance number is mandatory and if all instances need to be substituted provide 0

func Trim

func Trim(s string) string

Trim implements Excel's TRIM function

func Upper

func Upper(s string) string

Upper implements Excel's UPPER function

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL