Skip to content

4.0.0

Latest

Choose a tag to compare

@sequba sequba released this 02 Dec 11:53

Changed

  • Breaking change: Changed the license from GPLv3 to a proprietary license; see LICENSE.txt for the new terms. HyperFormula is no longer available under GPLv3, and the gpl-v3 license key is now invalid: with licenseKey: 'gpl-v3', functions return #LIC! and license-gated API methods throw a LicenseCapabilityMissingError. Use a commercial license key instead, or stay on 3.5.0: versions 3.x and earlier remain available under GPLv3. See the migration guide. #1885 #1905
  • Breaking change: Changed the TEXT function to support more advanced number formats, such as #,##0.00 and 0.00;(0.00). Some masks now return a different text or #VALUE!; see the migration guide. #1716
  • Breaking change: Changed stringifyDateTime and stringifyDuration to get the mask without its color tag, such as [Red]. See the migration guide. #1716
  • Breaking change: Added the #CALC! error, which FILTER and UNIQUE now return instead of #N/A when the result would be an empty array, SEQUENCE returns instead of #VALUE! when the number of rows or columns truncates to 0 (e.g. =SEQUENCE(0)), and TEXTJOIN returns instead of #VALUE! when the result is longer than 32,767 characters, as in Microsoft Excel. IFNA() and ISNA() no longer catch these errors; use IFERROR() or ISERROR(). A custom language pack must now translate the CALC error, or registerLanguage() throws a MissingTranslationError. See the migration guide. #1647
  • Breaking change: Changed the INDEX function to match Microsoft Excel. A row or column past the range now returns #REF! instead of #NUM!, a fractional row or column is truncated, and a row or column of 0 returns the whole column or row, which spills. Without a column number, INDEX returns #REF! for a range with more than one row and column instead of using its first column, returns the whole row of an array with more than one row and column, and counts along a one-row range. INDEX also accepts the area_num argument. See the migration guide. #1544
  • Breaking change: Changed the FILTER function to return #VALUE! for text in its include argument, including the empty text and "TRUE", and to return an error found there, as in Microsoft Excel. Before, it dropped those rows, or kept them for "TRUE". For example, a condition column of =IF(B1>0, TRUE(), "") now makes FILTER return #VALUE!; return FALSE() instead of "". See the migration guide. #1891
  • Breaking change: Changed the Polish name of PDURATION from ROCZ.PRZYCH to O.CZAS.TRWANIA and the Turkish name of VALUE from DEĞER to SAYIYAÇEVİR, as in Microsoft Excel, which uses ROCZ.PRZYCH for DURATION and DEĞER for PRICE. A Polish or Turkish formula with an old name now calls DURATION or PRICE; use the new names instead. See the migration guide. #1848
  • Breaking change: Changed getCellValue(), getSheetValues() and the other methods that export cell values to follow the evaluateNullToZero option: with the option on, they now return 0 for an empty cell instead of null, and getSheetValues() fills each row with 0 up to the sheet's width. The changes passed to the valuesUpdated event also report 0 for a cleared cell. To check whether a cell is empty, use isCellEmpty(). See the migration guide. #1738
  • Breaking change: Changed arithmetic and other numeric contexts to read the empty text ("") as text instead of as 0, as in Microsoft Excel: =""+1, and =B1*2 where B1 is =IF(A1>0, A1, ""), now return #VALUE!, and =COUNT("") returns 0 instead of 1. Return 0 instead of "", or wrap the reference in N(), as in =N(B1)*2. See the migration guide. #1768
  • Breaking change: Changed SUM, AVERAGE, MAX and the other numeric aggregations to read a cell reached through INDEX, CHOOSE, IF, IFS, SWITCH, XLOOKUP, a named expression, or parentheses, such as (A1), as they read a direct reference, as in Microsoft Excel: its text, booleans and blanks are now ignored. For example, with TRUE in B1, =SUM(IF(TRUE(), B1)) now returns 0 instead of 1. To count such a value as before, wrap it in N(). See the migration guide. #1768

Added

  • Added LINEST for simple and multiple linear regression, with optional intercept and regression statistics. The stats argument must be constant because result dimensions are determined before evaluation. #1769
  • Added the CONCAT function, which joins text from values, ranges, and arrays, and returns #CALC! when the result is longer than 32,767 characters, and the VALUETOTEXT function, which returns a value as text in a concise or a strict format. #1816
  • Added the AVERAGEIFS function. #1732
  • Added the maxParserCacheSize configuration option, which limits the number of cached formulas, so the parser cache no longer grows without limit in long-running instances that process many distinct formulas. #1635
  • Added the TYPE and ERROR.TYPE information functions: TYPE returns the code of a value's type (number, text, boolean, error, array), and ERROR.TYPE returns the code of an error, or #N/A for any other value. #1813
  • Added the emptyAsAbsent argument-validation option for custom functions, which passes an empty slot of an optional argument to the function as undefined instead of the zero value for its type. #1739
  • Added the GESTEP function, which returns 1 when a number is greater than or equal to a step (0 by default) and 0 otherwise. #1788
  • Added the CHOOSECOLS dynamic-array function. #1734
  • Added the CHOOSEROWS dynamic-array function. #1827
  • Added the ACCRINTM, DISC, INTRATE, PRICEDISC, RECEIVED and YIELDDISC functions, which return the accrued interest, discount rate, interest rate, price, amount received and yield of discounted securities and securities that pay interest at maturity. #1799
  • Added the TAKE dynamic-array function. #1722
  • Added the regression functions FORECAST.LINEAR (also available as FORECAST), INTERCEPT, TREND, GROWTH, and LOGEST. LOGEST, like LINEST, requires a constant stats argument. #1802
  • Added the RANK.EQ function and its alias RANK, which return the rank of a number among the numbers of a range, tied numbers sharing the top rank. #1786
  • Added the COUPDAYBS, COUPDAYS, COUPDAYSNC, COUPNCD, COUPNUM and COUPPCD functions, which return the coupon dates of a security, the number of coupons until maturity and the days in and around the coupon period. #1804
  • Added the PRICE and DURATION functions, which return the price per 100 face value and the Macaulay duration of a security that pays periodic interest. #1848
  • Added the ACCRINT function, which returns the accrued interest of a security that pays periodic interest. #1812
  • Added the ODDFPRICE and ODDLPRICE functions, which return the price per 100 face value of a security with an odd first or last coupon period. #1850
  • Added the YIELD, ODDFYIELD and ODDLYIELD functions, which return the yield of a security that pays periodic interest, with a regular, an odd first or an odd last coupon period. #1851
  • Added the MDURATION function, which returns the modified duration of a security that pays periodic interest. #1849
  • Added the DROP dynamic-array function. #1796
  • Added the TRIMRANGE dynamic-array function. #1842
  • Added the WRAPROWS, WRAPCOLS and EXPAND dynamic-array functions. #1830
  • Added the PERCENTRANK.INC (with its PERCENTRANK alias), MODE.MULT, FREQUENCY and PROB statistical functions. #1818
  • Added the statistical functions KURT, MODE.SNGL (with the MODE alias), PERCENTRANK.EXC and TRIMMEAN. #1800
  • Added the PRICEMAT and YIELDMAT functions, which return the price and the yield of securities that pay interest at maturity. #1811

Fixed

  • Fixed the EDATE function returning the 28th of February instead of the 29th when the shifted date falls in February of a leap year (e.g. =EDATE(DATE(2028, 1, 31), 1) now returns 2028-02-29 instead of 2028-02-28). #1781
  • Fixed the TEXT function mishandling masks with thousands grouping (#,##0) or with positive, negative and zero sections: =TEXT(-1.5, "0.00;(0.00)") now returns (1.50) instead of -1.50;(0.00). #1145
  • Fixed approximate XLOOKUP ignoring values of a different type in some search modes, and approximate MATCH, VLOOKUP, and HLOOKUP taking such values into account for non-range arrays, single-cell ranges, and binary search over sorted cell ranges; both now behave the same in linear and binary search, consistent with Microsoft Excel. #1755
  • Fixed formulas with consecutive percent operators failing to parse: each % now divides by 100, so =5%% returns 0.0005, as in Excel. #1773
  • Fixed setCellContents returning a #ERROR! parsing error instead of #SPILL! for an array formula whose whole-column or whole-row result cannot fit, such as =SORT(A:A) entered below the first row. The result now matches the one for the same formula loaded with buildFromSheets. #1797
  • Fixed number literals with an uppercase exponent marker, which the lowercase form already accepted: =1E5 now returns 100000 instead of #ERROR!, a parse error. #1835
  • Fixed array formulas over a whole column or row (e.g. =SORT(A:A), =UNIQUE(A:A), =FILTER(A:A, A:A>0)) throwing an uncaught Resizing to smaller array error, and leaving the old values in the spill, when their result grew larger than it was when first calculated, for example because the source grew or more values matched the FILTER condition. They now return the #SPILL! error. #1825
  • Fixed functions such as MATCH, INDEX and COUNTIF throwing an uncaught Unknown array error when they read a range that exactly matches the area of an array formula returning an error, for example =MATCH(2, B1:B3, 0) next to =SORT(A1:A3) whose source contains #DIV/0!. They now read the range cell by cell. #1876
  • Fixed array formulas spilling past the maxRows and maxColumns limits: they now return #SPILL! when their result extends beyond the sheet edge. #1774
  • Fixed the ADDRESS function adding the sheet separator (!) when the sheetName argument is an empty argument slot (e.g. =ADDRESS(2,3,1,FALSE(),) now returns R2C3 instead of !R2C3), while an explicit "" still adds it. #1641
  • Fixed IMSUM, IMPRODUCT and TEXTJOIN throwing an uncaught RangeError for very large ranges, such as =IMSUM(A1:D40000), which stopped the recalculation; they now return a result or an error value in the cell. #1901
  • Fixed AVEDEV, DEVSQ, GCD, GEOMEAN, HARMEAN, LCM, MEDIAN, NPV, SKEW and SKEW.P stopping the engine from building on a range of about 125,000 cells or more. #1800