Skip to content

Releases: LesterLyu/fast-formula-parser

Release 1.0.19

26 Nov 05:10
Compare
Choose a tag to compare

onVariable() hook now takes a third parameter position.

onVariable: (name, sheetName, position) => {
...
// position: {sheet: string, row: number, col: number}
}

Remove unused postfixOp in diagram.

Release 1.0.18

21 Aug 17:47
Compare
Choose a tag to compare

Fix Incorrect Function Behavior: ISBLANK

New Function Support: ENCODEURL, WEBSERVICE

  • WEBSERVICE is not implemented for Node.js due to extra dependency requires.
const FormulaParser = require('fast-formula-parser');
const {FormulaHelpers: H, Types} = FormulaParser;

// To use WEBSERVICE in Node.js, please override this function: 
new FormulaParser({
    functionsNeedContext: {
        WEBSERVICE: (context, url) => {
           const fetch = require('node-fetch');
           url = H.accept(url, Types.STRING);
           return fetch(url).then(res => res.text());
    }}
})

Release 1.0.17

18 Aug 22:08
Compare
Choose a tag to compare

New Function Support: IFS, XOR

Related Issue: #21

Fix Incorrect Function Behavior in Certain Situations: AND, OR

Release 1.0.16

14 Aug 19:56
Compare
Choose a tag to compare

Bug Fixes

  • Fix #19 Inconsistent results with parse and parseAsync.
    • Details: Promises are now resolved first before invoking ExcelRefFunction and ExcelConditionalRefFunction.
  • Fix #20 parser.supportedFunctions() does not include SUMIF and AVERAGEIF.

Internal Lexer Update

  • Merge ExcelRefFunction and ExcelConditionalRefFunction into basic Function.
  • Merge ReservedName into Name.

Coverage Increases 😃

Release 1.0.15

03 Aug 23:50
Compare
Choose a tag to compare

Related PR: #17

  • Correct error handling on both regular parser and on dependency parser.
  • DepParser now takes a third optional argument ignoreError: boolean, defaults to false.
    • ignoreError=false: the parser will throw a FormulaError when Error occurred.
    • ignoreError=true: the parser will return partial dependencies.
  • Capture lexing & parsing error to FormulaError (#ERROR!).
  • Provides detailed error in error.details if it is parsing/lexing error or other unexpected error.
    try {
         parser.parse('SUM(1))', position);
     } catch (e) {
         expect(e).to.be.instanceof(FormulaError);
         expect(e.details.errorLocation.line).to.eq(1);
         expect(e.details.errorLocation.column).to.eq(7);
         expect(e.name).to.eq('#ERROR!');
         expect(e.details.name).to.eq('NotAllInputParsedException');
     }
  • Provides error location error.details.errorLocation if it is parsing or lexing error.
      errorLocation: {line:1, column: 6}

Release 1.0.11

02 Aug 17:35
eaa3e11
Compare
Choose a tag to compare

Correct error codes:

#15 #16

Thanks to @rmdort

Release 1.0.10

31 Jul 14:16
Compare
Choose a tag to compare

Allow return null / undefined when use allowReturnArray=true.

Release 1.0.8

31 Jul 06:20
Compare
Choose a tag to compare

Bug fix: parser.parse('A1', position, true) returns #VALUE! instead of the cell value.

Release 1.0.7

28 Jul 17:04
Compare
Choose a tag to compare

Added support for custom async functions and custom (async) functions that require access to cell position.

Examples are updated:
https://github.com/LesterLyu/fast-formula-parser#examples

A formula dependency parser is added to examples as well, this is very helpful for constructing dependency graphs.

Release 1.0.5

08 Jan 01:18
Compare
Choose a tag to compare
bump version