1.0.1 Release of js-spreadsheet
Added 121 formulas, and fixed a few bugs, made Cells easier to handle, added support for scientific notation, clarified license, cleaned up parser a bit, added support for comma separated lists and much more.
Nearly six months ago I released a 1.0.0 version of js-spreadsheet, a javascript implementation of a spreadsheet parser and formulas. Today I’m bumping the version up to 1.0.1! Here’s a list of all the changes:
- Added 121 formulas: NA, CHOOSE, GCD, TRIM, LCM, GAMMALN, PERCENTILE, QUARTILE, PRODUCT, QUOTIENT, UPLUS, UMINUS, STDEV, STDEVA, STDEVP, STDEVPA, ISTEXT, ISLOGICAL, ISNUMBER, ISNONTEXT, MROUND, FACTDOUBLE, FREQUENCY, GROWTH, TRIMMEAN, SLOPE, LOWER, UPPER, STANDARDIZE, SMALL, LARGE, KURT, INTERCEPT, FORECAST, SYD, SLN, NPV, NPER, NOMINAL, MIRR, IRR, IPMT, FV, ISEMAIL, ISURL, POISSON, LINEST, PERCENTRANK, PERCENTRANK.INC, PERCENTRANK.EXC, NORMSINV, NORMSDIST, NORMDIST, NORMINV, NEGBINOMDIST, GEOMEAN, HARMEAN, CONFIDENCE, N, UNARY_PERCENT, MULTINOMIAL, BINOMDIST, COVAR, ISREF, ERRORTYPE, ERROR.TYPE, ISBLANK, ISERR, ISERROR, ISNA, TYPE, COLUMN, ROW, T, PPMT, WEIBULL, VARPA, VARP, VARA, VAR, PERMUT, RSQ, SKEW, STEYX, PROB, MODE, RANK, RANK.AVG, RANK.EQ, LOGNORMDIST, TDIST, TO_DATE, TO_PERCENT, TO_DOLLAR, TO_TEXT, ISFORMULA, IFERROR, ADDRESS, COLUMNS, ROWS, ROMAN, TEXT, FVSCHEDULE, PV, RATE, SUBTOTAL, HYPGEOMDIST, ZTEST, FIND, JOIN, LEN, LEFT, RIGHT, SEARCH, REPT, VALUE, CLEAN, MID, PROPER, REPLACE, and SUBSTITUTE.
- Most functions handle Cells gracefully, converting to primitives where necessary, and returning Cells where necessary.
- Numbers can now be entered in scientific-notation format.
- Pulled OpenOffice license into separate file for clarity.
- Documentation and cleanup of Parser.ts
For future releases, here’s what I have planned:
- The parser should be able to evaluate ranges/arrays non-lazily. Currently they’re captured by a regular expression, and loaded through javascript’s
eval
function, which is neither precise, nor secure. - The parser should be initialized to accept JS-style ranges (
[]
), or spreadsheet-style ranges ({}
). - Ranges and arrays should be allowed to follow commas. Currently a parser-error is thrown. For example
=SERIESSUM([1], [0], [1], [4, 5, 6])
parses, but this=SERIESSUM(1, 0, 1, [4, 5, 6])
does not. - Add the following formulas: CELL, HLOOKUP, INDEX, INDIRECT, LOOKUP, MATCH, OFFSET, VLOOKUP, COUNTBLANK, REGEXEXTRACT, REGEXMATCH, REGEXREPLACE, CRITBINOM, F.DIST.RT, LOGINV, T.INV, T.INV.2T, TINV, TTEST, LOGEST, MDETERM, MINVERSE, MMULT, TRANSPOSE, TREND, FILTER, SORT, COUPDAYBS, COUPDAYS, COUPDAYSNC, COUPNCD, COUPNUM, COUPPCD, DISC, DURATION, INTRATE, PRICE, PRICEDISC, PRICEMAT, RECEIVED, and YIELD.
- Distinguish between a vertical and horizontal range.
- CONVERT should offer more accurate conversions for units in the same system. E.g. 64 tbs to 1 qt.
To contribute or use the package:
Github: https://github.com/vogtb/spreadsheet
NPM: https://www.npmjs.com/package/js-spreadsheet
2017-12-03