formulas: An Excel formulas interpreter in Python.¶
- release:
1.3.1
- date:
2025-09-15 20:30:00
- repository:
- pypi-repo:
- docs:
- wiki:
- download:
- donate:
- keywords:
excel, formulas, interpreter, compiler, dispatch
- developers:
Vincenzo Arcidiacono <vinci1it2000@gmail.com>
- license:
What is formulas?¶
formulas implements an interpreter for Excel formulas, which parses and compile Excel formulas expressions.
Moreover, it compiles Excel workbooks to python and executes without using the Excel COM server. Hence, Excel is not needed.
Installation¶
To install it use (with root privileges):
$ pip install formulas
Or download the last git version and use (with root privileges):
$ python setup.py install
Install extras¶
Some additional functionality is enabled installing the following extras:
excel: enables to compile Excel workbooks to python and execute using:
ExcelModel.plot: enables to plot the formula ast and the Excel model.
To install formulas and all extras, do:
$ pip install formulas[all]
Development version¶
To help with the testing and the development of formulas, you can install the development version:
$ pip install https://github.com/vinci1it2000/formulas/archive/dev.zip
Table of Contents
- 1. What is formulas?
- 2. Installation
- 3. Basic Examples
- 4. Next moves
- 5. Contributing to formulas
- 6. Donate
- 7. Supported by
- 8. API Reference
- 8.1. parser
- 8.2. builder
- 8.3. errors
- 8.4. tokens
- 8.4.1. function
- 8.4.2. operand
- 8.4.2.1. fast_range2parts
- 8.4.2.2. fast_range2parts_v1
- 8.4.2.3. fast_range2parts_v2
- 8.4.2.4. fast_range2parts_v3
- 8.4.2.5. fast_range2parts_v4
- 8.4.2.6. fast_range2parts_v5
- 8.4.2.7. range2parts
- 8.4.2.8. Empty
- 8.4.2.9. Error
- 8.4.2.10. Number
- 8.4.2.11. Operand
- 8.4.2.12. Range
- 8.4.2.13. String
- 8.4.2.14. XlError
- 8.4.3. operator
- 8.4.4. parenthesis
- 8.4.5. Token
- 8.5. functions
- 8.5.1. comp
- 8.5.2. date
- 8.5.3. eng
- 8.5.3.1. hex2dec2bin2oct
- 8.5.3.2. xbesseli
- 8.5.3.3. xbesselj
- 8.5.3.4. xbesselk
- 8.5.3.5. xbessely
- 8.5.3.6. xbitand
- 8.5.3.7. xbitlshift
- 8.5.3.8. xbitor
- 8.5.3.9. xbitrshift
- 8.5.3.10. xbitxor
- 8.5.3.11. xcomplex
- 8.5.3.12. xconvert
- 8.5.3.13. xdelta
- 8.5.3.14. xerf
- 8.5.3.15. xerf_precise
- 8.5.3.16. xgestep
- 8.5.3.17. ximargument
- 8.5.3.18. ximpower
- 8.5.4. financial
- 8.5.5. google
- 8.5.6. info
- 8.5.7. logic
- 8.5.8. look
- 8.5.8.1. args_parser_hlookup
- 8.5.8.2. args_parser_lookup_array
- 8.5.8.3. args_parser_match_array
- 8.5.8.4. args_parser_typed_array
- 8.5.8.5. args_parser_xlookup_array
- 8.5.8.6. args_parser_xmatch_array
- 8.5.8.7. input_parser_xlookup
- 8.5.8.8. input_parser_xmatch
- 8.5.8.9. map_multiindex_take_last_if_tuple
- 8.5.8.10. return_trimrange_func
- 8.5.8.11. return_unique_func
- 8.5.8.12. to_python
- 8.5.8.13. xaddress
- 8.5.8.14. xareas
- 8.5.8.15. xchoosecols
- 8.5.8.16. xcolumn
- 8.5.8.17. xcolumns
- 8.5.8.18. xdrop
- 8.5.8.19. xexpand
- 8.5.8.20. xfilter
- 8.5.8.21. xgroupby
- 8.5.8.22. xhstack
- 8.5.8.23. xindex
- 8.5.8.24. xlookup
- 8.5.8.25. xmatch
- 8.5.8.26. xrow
- 8.5.8.27. xsingle
- 8.5.8.28. xsort
- 8.5.8.29. xsortby
- 8.5.8.30. xtake
- 8.5.8.31. xtocol
- 8.5.8.32. xtranspose
- 8.5.8.33. xtrimrange
- 8.5.8.34. xunique
- 8.5.8.35. xvstack
- 8.5.8.36. xwrapcols
- 8.5.8.37. xxlookup
- 8.5.8.38. xxmatch
- 8.5.9. math
- 8.5.9.1. return_func
- 8.5.9.2. round_up
- 8.5.9.3. xarabic
- 8.5.9.4. xarctan2
- 8.5.9.5. xceiling
- 8.5.9.6. xceiling_math
- 8.5.9.7. xcot
- 8.5.9.8. xdecimal
- 8.5.9.9. xeven
- 8.5.9.10. xfact
- 8.5.9.11. xfactdouble
- 8.5.9.12. xgcd
- 8.5.9.13. xlcm
- 8.5.9.14. xmdeterm
- 8.5.9.15. xmmult
- 8.5.9.16. xmod
- 8.5.9.17. xmround
- 8.5.9.18. xmunit
- 8.5.9.19. xodd
- 8.5.9.20. xpercentof
- 8.5.9.21. xpower
- 8.5.9.22. xrandbetween
- 8.5.9.23. xroman
- 8.5.9.24. xround
- 8.5.9.25. xsrqtpi
- 8.5.9.26. xsum
- 8.5.9.27. xsumproduct
- 8.5.9.28. xtrunc
- 8.5.10. operators
- 8.5.11. stat
- 8.5.11.1. xbetadist
- 8.5.11.2. xbetainv
- 8.5.11.3. xbinomdist
- 8.5.11.4. xbinomdistrange
- 8.5.11.5. xbinominv
- 8.5.11.6. xchisqdist
- 8.5.11.7. xchisqdistrt
- 8.5.11.8. xchisqinv
- 8.5.11.9. xchisqinvrt
- 8.5.11.10. xchisqtest
- 8.5.11.11. xconfidence_norm
- 8.5.11.12. xconfidence_t
- 8.5.11.13. xcorrel
- 8.5.11.14. xcovariance_p
- 8.5.11.15. xcovariance_s
- 8.5.11.16. xexpon_dist
- 8.5.11.17. xfdist
- 8.5.11.18. xfdistrt
- 8.5.11.19. xfinv
- 8.5.11.20. xfinvrt
- 8.5.11.21. xfisher
- 8.5.11.22. xfisherinv
- 8.5.11.23. xforecast
- 8.5.11.24. xforecast_ets
- 8.5.11.25. xforecast_ets_confint
- 8.5.11.26. xforecast_ets_seasonality
- 8.5.11.27. xforecast_ets_stat
- 8.5.11.28. xfrequency
- 8.5.11.29. xftest
- 8.5.11.30. xfunc
- 8.5.11.31. xgamma
- 8.5.11.32. xgamma_dist
- 8.5.11.33. xgamma_inv
- 8.5.11.34. xgammaln
- 8.5.11.35. xgauss
- 8.5.11.36. xgrowth
- 8.5.11.37. xhypergeom_dist
- 8.5.11.38. xintercept
- 8.5.11.39. xlinest
- 8.5.11.40. xlogest
- 8.5.11.41. xlognormdist
- 8.5.11.42. xlognorminv
- 8.5.11.43. xnegbinomdist
- 8.5.11.44. xnormdist
- 8.5.11.45. xnorminv
- 8.5.11.46. xpearson
- 8.5.11.47. xpercentile
- 8.5.11.48. xpercentrank
- 8.5.11.49. xpermut
- 8.5.11.50. xpermutationa
- 8.5.11.51. xphi
- 8.5.11.52. xpoisson_dist
- 8.5.11.53. xprob
- 8.5.11.54. xquartile
- 8.5.11.55. xrank
- 8.5.11.56. xrsq
- 8.5.11.57. xslope
- 8.5.11.58. xsort
- 8.5.11.59. xstandardize
- 8.5.11.60. xstdev
- 8.5.11.61. xsteyx
- 8.5.11.62. xt_dist
- 8.5.11.63. xt_dist2t
- 8.5.11.64. xt_distrt
- 8.5.11.65. xt_inv
- 8.5.11.66. xt_inv2t
- 8.5.11.67. xt_test
- 8.5.11.68. xtrend
- 8.5.11.69. xtrimmean
- 8.5.11.70. xweibulldist
- 8.5.11.71. xz_test
- 8.5.12. text
- 8.5.12.1. xarraytotext
- 8.5.12.2. xasc
- 8.5.12.3. xbahttext
- 8.5.12.4. xchar
- 8.5.12.5. xclean
- 8.5.12.6. xcode
- 8.5.12.7. xconcat
- 8.5.12.8. xexact
- 8.5.12.9. xfind
- 8.5.12.10. xfixed
- 8.5.12.11. xleft
- 8.5.12.12. xmid
- 8.5.12.13. xnumbervalue
- 8.5.12.14. xregexextract
- 8.5.12.15. xregexreplace
- 8.5.12.16. xregextest
- 8.5.12.17. xreplace
- 8.5.12.18. xrept
- 8.5.12.19. xright
- 8.5.12.20. xsearch
- 8.5.12.21. xsubstitute
- 8.5.12.22. xt
- 8.5.12.23. xtext
- 8.5.12.24. xtextafterbefore
- 8.5.12.25. xtextjoin
- 8.5.12.26. xtextsplit
- 8.5.12.27. xunichar
- 8.5.12.28. xunicode
- 8.5.12.29. xvalue
- 8.5.12.30. xvaluetotext
- 8.5.13. args2list
- 8.5.14. args2vals
- 8.5.15. clean_values
- 8.5.16. convert2float
- 8.5.17. convert_nan
- 8.5.18. convert_noshp
- 8.5.19. flatten
- 8.5.20. get_error
- 8.5.21. get_functions
- 8.5.22. get_shape
- 8.5.23. is_complex
- 8.5.24. is_not_empty
- 8.5.25. is_number
- 8.5.26. not_implemented
- 8.5.27. parse_ranges
- 8.5.28. raise_errors
- 8.5.29. replace_empty
- 8.5.30. return_2d_func
- 8.5.31. str2complex
- 8.5.32. text2num
- 8.5.33. to_number
- 8.5.34. wrap_func
- 8.5.35. wrap_impure_func
- 8.5.36. wrap_ranges_func
- 8.5.37. wrap_ufunc
- 8.5.38. xfilter
- 8.5.39. xfilters
- 8.5.40. Array
Array- 8.5.40.1. __init__
- 8.5.40.2. all
- 8.5.40.3. any
- 8.5.40.4. argmax
- 8.5.40.5. argmin
- 8.5.40.6. argpartition
- 8.5.40.7. argsort
- 8.5.40.8. astype
- 8.5.40.9. byteswap
- 8.5.40.10. choose
- 8.5.40.11. clip
- 8.5.40.12. collapse
- 8.5.40.13. compress
- 8.5.40.14. conj
- 8.5.40.15. conjugate
- 8.5.40.16. copy
- 8.5.40.17. cumprod
- 8.5.40.18. cumsum
- 8.5.40.19. diagonal
- 8.5.40.20. dot
- 8.5.40.21. dump
- 8.5.40.22. dumps
- 8.5.40.23. fill
- 8.5.40.24. flatten
- 8.5.40.25. getfield
- 8.5.40.26. item
- 8.5.40.27. max
- 8.5.40.28. mean
- 8.5.40.29. min
- 8.5.40.30. nonzero
- 8.5.40.31. partition
- 8.5.40.32. prod
- 8.5.40.33. put
- 8.5.40.34. ravel
- 8.5.40.35. repeat
- 8.5.40.36. reshape
- 8.5.40.37. resize
- 8.5.40.38. round
- 8.5.40.39. searchsorted
- 8.5.40.40. setfield
- 8.5.40.41. setflags
- 8.5.40.42. sort
- 8.5.40.43. squeeze
- 8.5.40.44. std
- 8.5.40.45. sum
- 8.5.40.46. swapaxes
- 8.5.40.47. take
- 8.5.40.48. to_device
- 8.5.40.49. tobytes
- 8.5.40.50. tofile
- 8.5.40.51. tolist
- 8.5.40.52. trace
- 8.5.40.53. transpose
- 8.5.40.54. var
- 8.5.40.55. view
- 8.5.40.56. T
- 8.5.40.57. base
- 8.5.40.58. ctypes
- 8.5.40.59. data
- 8.5.40.60. device
- 8.5.40.61. dtype
- 8.5.40.62. flags
- 8.5.40.63. flat
- 8.5.40.64. imag
- 8.5.40.65. itemset
- 8.5.40.66. itemsize
- 8.5.40.67. mT
- 8.5.40.68. nbytes
- 8.5.40.69. ndim
- 8.5.40.70. newbyteorder
- 8.5.40.71. ptp
- 8.5.40.72. real
- 8.5.40.73. shape
- 8.5.40.74. size
- 8.5.40.75. strides
- 8.6. ranges
- 8.7. cell
- 8.8. excel
- 8.8.1. cycle
- 8.8.2. xlreader
- 8.8.3. escape_char
- 8.8.4. ExcelModel
ExcelModel- 8.8.4.1. __init__
- 8.8.4.2. add_anchor
- 8.8.4.3. add_book
- 8.8.4.4. add_cell
- 8.8.4.5. add_references
- 8.8.4.6. add_sheet
- 8.8.4.7. anchors
- 8.8.4.8. assemble
- 8.8.4.9. calculate
- 8.8.4.10. compare
- 8.8.4.11. compile
- 8.8.4.12. compile_cell
- 8.8.4.13. complete
- 8.8.4.14. external_links
- 8.8.4.15. finish
- 8.8.4.16. formula_ranges
- 8.8.4.17. formula_references
- 8.8.4.18. from_dict
- 8.8.4.19. from_ranges
- 8.8.4.20. inverse_references
- 8.8.4.21. load
- 8.8.4.22. loads
- 8.8.4.23. push
- 8.8.4.24. pushes
- 8.8.4.25. solve_circular
- 8.8.4.26. to_dict
- 8.8.4.27. write
- 8.8.4.28. references
- 8.8.5. XlCircular
XlCircular- 8.8.5.1. __init__
- 8.8.5.2. capitalize
- 8.8.5.3. casefold
- 8.8.5.4. center
- 8.8.5.5. count
- 8.8.5.6. encode
- 8.8.5.7. endswith
- 8.8.5.8. expandtabs
- 8.8.5.9. find
- 8.8.5.10. format
- 8.8.5.11. format_map
- 8.8.5.12. index
- 8.8.5.13. isalnum
- 8.8.5.14. isalpha
- 8.8.5.15. isascii
- 8.8.5.16. isdecimal
- 8.8.5.17. isdigit
- 8.8.5.18. isidentifier
- 8.8.5.19. islower
- 8.8.5.20. isnumeric
- 8.8.5.21. isprintable
- 8.8.5.22. isspace
- 8.8.5.23. istitle
- 8.8.5.24. isupper
- 8.8.5.25. join
- 8.8.5.26. ljust
- 8.8.5.27. lower
- 8.8.5.28. lstrip
- 8.8.5.29. maketrans
- 8.8.5.30. partition
- 8.8.5.31. removeprefix
- 8.8.5.32. removesuffix
- 8.8.5.33. replace
- 8.8.5.34. rfind
- 8.8.5.35. rindex
- 8.8.5.36. rjust
- 8.8.5.37. rpartition
- 8.8.5.38. rsplit
- 8.8.5.39. rstrip
- 8.8.5.40. split
- 8.8.5.41. splitlines
- 8.8.5.42. startswith
- 8.8.5.43. strip
- 8.8.5.44. swapcase
- 8.8.5.45. title
- 8.8.5.46. translate
- 8.8.5.47. upper
- 8.8.5.48. zfill
- 9. Changelog
- 9.1. v1.3.1 (2025-09-15)
- 9.2. v1.3.0 (2025-08-20)
- 9.3. v1.2.11 (2025-07-28)
- 9.4. v1.2.10 (2025-05-21)
- 9.5. v1.2.9 (2025-04-05)
- 9.6. v1.2.8 (2024-07-16)
- 9.7. v1.2.7 (2023-11-14)
- 9.8. v1.2.6 (2022-12-13)
- 9.9. v1.2.5 (2022-11-07)
- 9.10. v1.2.4 (2022-07-02)
- 9.11. v1.2.3 (2022-05-10)
- 9.12. v1.2.2 (2022-01-22)
- 9.13. v1.2.1 (2022-01-21)
- 9.14. v1.2.0 (2021-12-23)
- 9.15. v1.1.1 (2021-10-13)
- 9.16. v1.1.0 (2021-02-16)
- 9.17. v1.0.0 (2020-03-12)
- 9.18. v0.4.0 (2019-08-31)
- 9.19. v0.3.0 (2019-04-24)
- 9.20. v0.2.0 (2018-12-11)
- 9.21. v0.1.4 (2018-10-19)
- 9.22. v0.1.3 (2018-10-09)
- 9.23. v0.1.2 (2018-09-12)
- 9.24. v0.1.1 (2018-09-11)
- 9.25. v0.1.0 (2018-07-20)
- 9.26. v0.0.10 (2018-06-05)
- 9.27. v0.0.9 (2018-05-28)
- 9.28. v0.0.8 (2018-05-23)
- 9.29. v0.0.7 (2017-07-20)
- 9.30. v0.0.6 (2017-05-31)
- 9.31. v0.0.5 (2017-05-04)
- 9.32. v0.0.4 (2017-02-10)
- 9.33. v0.0.3 (2017-02-09)
- 9.34. v0.0.2 (2017-02-08)