UNPKG

@jspreadsheet/formula-pro

Version:

Jspreadsheet formula pro is a JavaScript software to parse spreadsheet-like formulas.

85 lines (60 loc) 2.86 kB
# 6.0.0 ## Breaking Changes - **JSpreadsheet Compatibility**: Requires JSpreadsheet v12 or later - **Caching Option Removed**: Caching is now always enabled - **Custom Functions Format**: Changed from `{ MY: { FUNC: fn } }` to `{ 'MY.FUNC': fn }` - **Unary Plus Operator**: Using "+" with a reference now returns the value instead of the reference (e.g., `=COLUMN(+A1)` returns #N/A error instead of 1) ## New Features - **Enhanced Reference Returns**: Functions like INDIRECT and DROP can now return references (similar to OFFSET) - **Range Operator**: Added ":" operator for range references - **String Scientific Notation**: Strings with scientific notation are now converted in operations and functions - **Leading Decimal**: Expressions like `.5` are now parsed as `0.5` - **Maximum References**: Column ZZZ and row 1048576 ## Functions Added - **RANK**: Alias for RANK.EQ ## Functions Removed - TABLE - VAL - THISROWCELL - NULL ## Improvements - Improved performance for cell and range value access - Better error handling and validation - Reference errors like "SHEET1!#REF!" are now properly detected ## Behavior Changes - **Comparison Operators**: `>`, `>=`, `<`, `<=` now perform case-insensitive text comparisons - **Percentage Strings**: Strings like "5%" are now converted in function arguments (not just operations) - **Date/Time Strings**: Converted to serial numbers in arithmetic operations - **Date Format**: Only accepts `yyyy-mm-dd hh:mm:ss` or locale-specific format - **FALSE/TRUE Functions**: `=FALSE(5)` now returns #N/A error (was ERROR) # 5.10.0 - Added event, triggered when a formula evaluation fails: `onerror(error: object, expression: object, variables: object, x: number, y: number, worksheet: object) => void` # 5.9.0 - Fixed CEILING function bug. - Added argument validation for FORECAST. - Added argument validation for INTERCEPT. - Reviewed and added argument validation for LINEST. - Reviewed and added argument validation for LOGEST. - Reviewed and added argument validation for TREND. - Implemented operations to handle omitted arguments and accept boolean types. - Updated ^ and & operations to properly handle numeric values and return correct errors. # 5.4.3 - Cleaned up *formula names* that are not present in *Excel* or *Google Sheets*; - Updated `REGEXEXTRACT`, `REGEXREPLACE`, and `REGEXMATCH` functions; - Improved `ISERR` and `ISERROR` to catch errors caused by incorrect *function names*; - The adjust precision feature has been improved; # 5.4.0 - REVIEW MATCH and other database functions - ISBLANK & OFFSET - REFERENCE SY TYPE # 5.3.1 - DAYS360 fix # 5.3.0 - VLOOKUP updates - Caching adjustments - TEXT # 5.1.0 - VLOOKUP: performance updates; - OFFSET: create dynamic chains; # 5.0.3 - AVERAGEIF: fix