From 3878e325f16752927ed87745a49672da14b8e27f Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Sat, 26 Mar 2022 19:46:26 +0100 Subject: [PATCH 1/2] Experiment to replace the large "unstructured" array of Excel function signature definitions with a structured collection of Value Objects to see what affect it has on memory usage and speed. This isn't a perfect implementation yet: but it's enough to take a look at the memory usage and speed. --- .php-cs-fixer.dist.php | 2 +- .phpcs.xml.dist | 4 + bin/generate-locales | 5 +- infra/LocaleGenerator.php | 8 +- phpstan-baseline.neon | 5 - .../Calculation/Calculation.php | 2527 +---------------- .../Calculation/Engine/ExcelFunctions.php | 674 +++++ .../Calculation/Engine/Functions/XlAbs.php | 33 + .../Engine/Functions/XlAccrint.php | 33 + .../Engine/Functions/XlAccrintm.php | 33 + .../Calculation/Engine/Functions/XlAcos.php | 33 + .../Calculation/Engine/Functions/XlAcosh.php | 33 + .../Calculation/Engine/Functions/XlAcot.php | 33 + .../Calculation/Engine/Functions/XlAcoth.php | 33 + .../Engine/Functions/XlAddress.php | 33 + .../Engine/Functions/XlAggregate.php | 33 + .../Engine/Functions/XlAmordegrc.php | 33 + .../Engine/Functions/XlAmorlinc.php | 33 + .../Calculation/Engine/Functions/XlAnd.php | 33 + .../Calculation/Engine/Functions/XlArabic.php | 33 + .../Calculation/Engine/Functions/XlAreas.php | 33 + .../Engine/Functions/XlArraytotext.php | 33 + .../Calculation/Engine/Functions/XlAsc.php | 33 + .../Calculation/Engine/Functions/XlAsin.php | 33 + .../Calculation/Engine/Functions/XlAsinh.php | 33 + .../Calculation/Engine/Functions/XlAtan.php | 33 + .../Calculation/Engine/Functions/XlAtan2.php | 33 + .../Calculation/Engine/Functions/XlAtanh.php | 33 + .../Calculation/Engine/Functions/XlAvedev.php | 33 + .../Engine/Functions/XlAverage.php | 33 + .../Engine/Functions/XlAveragea.php | 33 + .../Engine/Functions/XlAverageif.php | 33 + .../Engine/Functions/XlAverageifs.php | 33 + .../Engine/Functions/XlBahttext.php | 33 + .../Calculation/Engine/Functions/XlBase.php | 33 + .../Engine/Functions/XlBesseli.php | 33 + .../Engine/Functions/XlBesselj.php | 33 + .../Engine/Functions/XlBesselk.php | 33 + .../Engine/Functions/XlBessely.php | 33 + .../Engine/Functions/XlBeta_dist.php | 33 + .../Engine/Functions/XlBeta_inv.php | 33 + .../Engine/Functions/XlBetadist.php | 33 + .../Engine/Functions/XlBetainv.php | 33 + .../Engine/Functions/XlBin2dec.php | 33 + .../Engine/Functions/XlBin2hex.php | 33 + .../Engine/Functions/XlBin2oct.php | 33 + .../Engine/Functions/XlBinom_dist.php | 33 + .../Engine/Functions/XlBinom_dist_range.php | 33 + .../Engine/Functions/XlBinom_inv.php | 33 + .../Engine/Functions/XlBinomdist.php | 33 + .../Calculation/Engine/Functions/XlBitand.php | 33 + .../Engine/Functions/XlBitlshift.php | 33 + .../Calculation/Engine/Functions/XlBitor.php | 33 + .../Engine/Functions/XlBitrshift.php | 33 + .../Calculation/Engine/Functions/XlBitxor.php | 33 + .../Engine/Functions/XlCeiling.php | 33 + .../Engine/Functions/XlCeiling_math.php | 33 + .../Engine/Functions/XlCeiling_precise.php | 33 + .../Calculation/Engine/Functions/XlCell.php | 33 + .../Calculation/Engine/Functions/XlChar.php | 33 + .../Engine/Functions/XlChidist.php | 33 + .../Calculation/Engine/Functions/XlChiinv.php | 33 + .../Engine/Functions/XlChisq_dist.php | 33 + .../Engine/Functions/XlChisq_dist_rt.php | 33 + .../Engine/Functions/XlChisq_inv.php | 33 + .../Engine/Functions/XlChisq_inv_rt.php | 33 + .../Engine/Functions/XlChisq_test.php | 33 + .../Engine/Functions/XlChitest.php | 33 + .../Calculation/Engine/Functions/XlChoose.php | 33 + .../Calculation/Engine/Functions/XlClean.php | 33 + .../Calculation/Engine/Functions/XlCode.php | 33 + .../Calculation/Engine/Functions/XlColumn.php | 38 + .../Engine/Functions/XlColumns.php | 33 + .../Calculation/Engine/Functions/XlCombin.php | 33 + .../Engine/Functions/XlCombina.php | 33 + .../Engine/Functions/XlComplex.php | 33 + .../Calculation/Engine/Functions/XlConcat.php | 33 + .../Engine/Functions/XlConcatenate.php | 33 + .../Engine/Functions/XlConfidence.php | 33 + .../Engine/Functions/XlConfidence_norm.php | 33 + .../Engine/Functions/XlConfidence_t.php | 33 + .../Engine/Functions/XlConvert.php | 33 + .../Calculation/Engine/Functions/XlCorrel.php | 33 + .../Calculation/Engine/Functions/XlCos.php | 33 + .../Calculation/Engine/Functions/XlCosh.php | 33 + .../Calculation/Engine/Functions/XlCot.php | 33 + .../Calculation/Engine/Functions/XlCoth.php | 33 + .../Calculation/Engine/Functions/XlCount.php | 33 + .../Calculation/Engine/Functions/XlCounta.php | 33 + .../Engine/Functions/XlCountblank.php | 33 + .../Engine/Functions/XlCountif.php | 33 + .../Engine/Functions/XlCountifs.php | 33 + .../Engine/Functions/XlCoupdaybs.php | 33 + .../Engine/Functions/XlCoupdays.php | 33 + .../Engine/Functions/XlCoupdaysnc.php | 33 + .../Engine/Functions/XlCoupncd.php | 33 + .../Engine/Functions/XlCoupnum.php | 33 + .../Engine/Functions/XlCouppcd.php | 33 + .../Calculation/Engine/Functions/XlCovar.php | 33 + .../Engine/Functions/XlCovariance_p.php | 33 + .../Engine/Functions/XlCovariance_s.php | 33 + .../Engine/Functions/XlCritbinom.php | 33 + .../Calculation/Engine/Functions/XlCsc.php | 33 + .../Calculation/Engine/Functions/XlCsch.php | 33 + .../Engine/Functions/XlCubekpimember.php | 33 + .../Engine/Functions/XlCubemember.php | 33 + .../Engine/Functions/XlCubememberproperty.php | 33 + .../Engine/Functions/XlCuberankedmember.php | 33 + .../Engine/Functions/XlCubeset.php | 33 + .../Engine/Functions/XlCubesetcount.php | 33 + .../Engine/Functions/XlCubevalue.php | 33 + .../Engine/Functions/XlCumipmt.php | 33 + .../Engine/Functions/XlCumprinc.php | 33 + .../Calculation/Engine/Functions/XlDate.php | 33 + .../Engine/Functions/XlDatedif.php | 33 + .../Engine/Functions/XlDatestring.php | 33 + .../Engine/Functions/XlDatevalue.php | 33 + .../Engine/Functions/XlDaverage.php | 33 + .../Calculation/Engine/Functions/XlDay.php | 33 + .../Calculation/Engine/Functions/XlDays.php | 33 + .../Engine/Functions/XlDays360.php | 33 + .../Calculation/Engine/Functions/XlDb.php | 33 + .../Calculation/Engine/Functions/XlDbcs.php | 33 + .../Calculation/Engine/Functions/XlDcount.php | 33 + .../Engine/Functions/XlDcounta.php | 33 + .../Calculation/Engine/Functions/XlDdb.php | 33 + .../Engine/Functions/XlDec2bin.php | 33 + .../Engine/Functions/XlDec2hex.php | 33 + .../Engine/Functions/XlDec2oct.php | 33 + .../Engine/Functions/XlDecimal.php | 33 + .../Engine/Functions/XlDegrees.php | 33 + .../Calculation/Engine/Functions/XlDelta.php | 33 + .../Calculation/Engine/Functions/XlDevsq.php | 33 + .../Calculation/Engine/Functions/XlDget.php | 33 + .../Calculation/Engine/Functions/XlDisc.php | 33 + .../Calculation/Engine/Functions/XlDmax.php | 33 + .../Calculation/Engine/Functions/XlDmin.php | 33 + .../Calculation/Engine/Functions/XlDollar.php | 33 + .../Engine/Functions/XlDollarde.php | 33 + .../Engine/Functions/XlDollarfr.php | 33 + .../Engine/Functions/XlDproduct.php | 33 + .../Calculation/Engine/Functions/XlDstdev.php | 33 + .../Engine/Functions/XlDstdevp.php | 33 + .../Calculation/Engine/Functions/XlDsum.php | 33 + .../Engine/Functions/XlDuration.php | 33 + .../Calculation/Engine/Functions/XlDvar.php | 33 + .../Calculation/Engine/Functions/XlDvarp.php | 33 + .../Engine/Functions/XlEcma_ceiling.php | 33 + .../Calculation/Engine/Functions/XlEdate.php | 33 + .../Calculation/Engine/Functions/XlEffect.php | 33 + .../Engine/Functions/XlEncodeurl.php | 33 + .../Engine/Functions/XlEomonth.php | 33 + .../Calculation/Engine/Functions/XlErf.php | 33 + .../Engine/Functions/XlErf_precise.php | 33 + .../Calculation/Engine/Functions/XlErfc.php | 33 + .../Engine/Functions/XlErfc_precise.php | 33 + .../Engine/Functions/XlError_type.php | 33 + .../Calculation/Engine/Functions/XlEven.php | 33 + .../Calculation/Engine/Functions/XlExact.php | 33 + .../Calculation/Engine/Functions/XlExp.php | 33 + .../Engine/Functions/XlExpon_dist.php | 33 + .../Engine/Functions/XlExpondist.php | 33 + .../Calculation/Engine/Functions/XlF_dist.php | 33 + .../Engine/Functions/XlF_dist_rt.php | 33 + .../Calculation/Engine/Functions/XlF_inv.php | 33 + .../Engine/Functions/XlF_inv_rt.php | 33 + .../Calculation/Engine/Functions/XlF_test.php | 33 + .../Calculation/Engine/Functions/XlFact.php | 33 + .../Engine/Functions/XlFactdouble.php | 33 + .../Calculation/Engine/Functions/XlFalse.php | 33 + .../Calculation/Engine/Functions/XlFdist.php | 33 + .../Calculation/Engine/Functions/XlFilter.php | 33 + .../Engine/Functions/XlFilterxml.php | 33 + .../Calculation/Engine/Functions/XlFind.php | 33 + .../Calculation/Engine/Functions/XlFindb.php | 33 + .../Calculation/Engine/Functions/XlFinv.php | 33 + .../Calculation/Engine/Functions/XlFisher.php | 33 + .../Engine/Functions/XlFisherinv.php | 33 + .../Calculation/Engine/Functions/XlFixed.php | 33 + .../Calculation/Engine/Functions/XlFloor.php | 33 + .../Engine/Functions/XlFloor_math.php | 33 + .../Engine/Functions/XlFloor_precise.php | 33 + .../Engine/Functions/XlForecast.php | 33 + .../Engine/Functions/XlForecast_ets.php | 33 + .../Functions/XlForecast_ets_confint.php | 33 + .../Functions/XlForecast_ets_seasonality.php | 33 + .../Engine/Functions/XlForecast_ets_stat.php | 33 + .../Engine/Functions/XlForecast_linear.php | 33 + .../Engine/Functions/XlFormulatext.php | 38 + .../Engine/Functions/XlFrequency.php | 33 + .../Calculation/Engine/Functions/XlFtest.php | 33 + .../Calculation/Engine/Functions/XlFv.php | 33 + .../Engine/Functions/XlFvschedule.php | 33 + .../Calculation/Engine/Functions/XlGamma.php | 33 + .../Engine/Functions/XlGamma_dist.php | 33 + .../Engine/Functions/XlGamma_inv.php | 33 + .../Engine/Functions/XlGammadist.php | 33 + .../Engine/Functions/XlGammainv.php | 33 + .../Engine/Functions/XlGammaln.php | 33 + .../Engine/Functions/XlGammaln_precise.php | 33 + .../Calculation/Engine/Functions/XlGauss.php | 33 + .../Calculation/Engine/Functions/XlGcd.php | 33 + .../Engine/Functions/XlGeomean.php | 33 + .../Calculation/Engine/Functions/XlGestep.php | 33 + .../Engine/Functions/XlGetpivotdata.php | 33 + .../Calculation/Engine/Functions/XlGrowth.php | 33 + .../Engine/Functions/XlHarmean.php | 33 + .../Engine/Functions/XlHex2bin.php | 33 + .../Engine/Functions/XlHex2dec.php | 33 + .../Engine/Functions/XlHex2oct.php | 33 + .../Engine/Functions/XlHlookup.php | 33 + .../Calculation/Engine/Functions/XlHour.php | 33 + .../Engine/Functions/XlHyperlink.php | 36 + .../Engine/Functions/XlHypgeom_dist.php | 33 + .../Engine/Functions/XlHypgeomdist.php | 33 + .../Calculation/Engine/Functions/XlIf.php | 33 + .../Engine/Functions/XlIferror.php | 33 + .../Calculation/Engine/Functions/XlIfna.php | 33 + .../Calculation/Engine/Functions/XlIfs.php | 33 + .../Calculation/Engine/Functions/XlImabs.php | 33 + .../Engine/Functions/XlImaginary.php | 33 + .../Engine/Functions/XlImargument.php | 33 + .../Engine/Functions/XlImconjugate.php | 33 + .../Calculation/Engine/Functions/XlImcos.php | 33 + .../Calculation/Engine/Functions/XlImcosh.php | 33 + .../Calculation/Engine/Functions/XlImcot.php | 33 + .../Calculation/Engine/Functions/XlImcsc.php | 33 + .../Calculation/Engine/Functions/XlImcsch.php | 33 + .../Calculation/Engine/Functions/XlImdiv.php | 33 + .../Calculation/Engine/Functions/XlImexp.php | 33 + .../Calculation/Engine/Functions/XlImln.php | 33 + .../Engine/Functions/XlImlog10.php | 33 + .../Calculation/Engine/Functions/XlImlog2.php | 33 + .../Engine/Functions/XlImpower.php | 33 + .../Engine/Functions/XlImproduct.php | 33 + .../Calculation/Engine/Functions/XlImreal.php | 33 + .../Calculation/Engine/Functions/XlImsec.php | 33 + .../Calculation/Engine/Functions/XlImsech.php | 33 + .../Calculation/Engine/Functions/XlImsin.php | 33 + .../Calculation/Engine/Functions/XlImsinh.php | 33 + .../Calculation/Engine/Functions/XlImsqrt.php | 33 + .../Calculation/Engine/Functions/XlImsub.php | 33 + .../Calculation/Engine/Functions/XlImsum.php | 33 + .../Calculation/Engine/Functions/XlImtan.php | 33 + .../Calculation/Engine/Functions/XlIndex.php | 33 + .../Engine/Functions/XlIndirect.php | 36 + .../Calculation/Engine/Functions/XlInfo.php | 33 + .../Calculation/Engine/Functions/XlInt.php | 33 + .../Engine/Functions/XlIntercept.php | 33 + .../Engine/Functions/XlIntrate.php | 33 + .../Calculation/Engine/Functions/XlIpmt.php | 33 + .../Calculation/Engine/Functions/XlIrr.php | 33 + .../Engine/Functions/XlIsblank.php | 33 + .../Calculation/Engine/Functions/XlIserr.php | 33 + .../Engine/Functions/XlIserror.php | 33 + .../Calculation/Engine/Functions/XlIseven.php | 33 + .../Engine/Functions/XlIsformula.php | 38 + .../Engine/Functions/XlIslogical.php | 33 + .../Calculation/Engine/Functions/XlIsna.php | 33 + .../Engine/Functions/XlIsnontext.php | 33 + .../Engine/Functions/XlIsnumber.php | 33 + .../Engine/Functions/XlIso_ceiling.php | 33 + .../Calculation/Engine/Functions/XlIsodd.php | 33 + .../Engine/Functions/XlIsoweeknum.php | 33 + .../Calculation/Engine/Functions/XlIspmt.php | 33 + .../Calculation/Engine/Functions/XlIsref.php | 38 + .../Calculation/Engine/Functions/XlIstext.php | 33 + .../Engine/Functions/XlIsthaidigit.php | 33 + .../Calculation/Engine/Functions/XlJis.php | 33 + .../Calculation/Engine/Functions/XlKurt.php | 33 + .../Calculation/Engine/Functions/XlLarge.php | 33 + .../Calculation/Engine/Functions/XlLcm.php | 33 + .../Calculation/Engine/Functions/XlLeft.php | 33 + .../Calculation/Engine/Functions/XlLeftb.php | 33 + .../Calculation/Engine/Functions/XlLen.php | 33 + .../Calculation/Engine/Functions/XlLenb.php | 33 + .../Calculation/Engine/Functions/XlLinest.php | 33 + .../Calculation/Engine/Functions/XlLn.php | 33 + .../Calculation/Engine/Functions/XlLog.php | 33 + .../Calculation/Engine/Functions/XlLog10.php | 33 + .../Calculation/Engine/Functions/XlLogest.php | 33 + .../Calculation/Engine/Functions/XlLoginv.php | 33 + .../Engine/Functions/XlLognorm_dist.php | 33 + .../Engine/Functions/XlLognorm_inv.php | 33 + .../Engine/Functions/XlLognormdist.php | 33 + .../Calculation/Engine/Functions/XlLookup.php | 33 + .../Calculation/Engine/Functions/XlLower.php | 33 + .../Calculation/Engine/Functions/XlMatch.php | 33 + .../Calculation/Engine/Functions/XlMax.php | 33 + .../Calculation/Engine/Functions/XlMaxa.php | 33 + .../Calculation/Engine/Functions/XlMaxifs.php | 33 + .../Engine/Functions/XlMdeterm.php | 33 + .../Engine/Functions/XlMduration.php | 33 + .../Calculation/Engine/Functions/XlMedian.php | 33 + .../Engine/Functions/XlMedianif.php | 33 + .../Calculation/Engine/Functions/XlMid.php | 33 + .../Calculation/Engine/Functions/XlMidb.php | 33 + .../Calculation/Engine/Functions/XlMin.php | 33 + .../Calculation/Engine/Functions/XlMina.php | 33 + .../Calculation/Engine/Functions/XlMinifs.php | 33 + .../Calculation/Engine/Functions/XlMinute.php | 33 + .../Engine/Functions/XlMinverse.php | 33 + .../Calculation/Engine/Functions/XlMirr.php | 33 + .../Calculation/Engine/Functions/XlMmult.php | 33 + .../Calculation/Engine/Functions/XlMod.php | 33 + .../Calculation/Engine/Functions/XlMode.php | 33 + .../Engine/Functions/XlMode_mult.php | 33 + .../Engine/Functions/XlMode_sngl.php | 33 + .../Calculation/Engine/Functions/XlMonth.php | 33 + .../Calculation/Engine/Functions/XlMround.php | 33 + .../Engine/Functions/XlMultinomial.php | 33 + .../Calculation/Engine/Functions/XlMunit.php | 33 + .../Calculation/Engine/Functions/XlN.php | 33 + .../Calculation/Engine/Functions/XlNa.php | 33 + .../Engine/Functions/XlNegbinom_dist.php | 33 + .../Engine/Functions/XlNegbinomdist.php | 33 + .../Engine/Functions/XlNetworkdays.php | 33 + .../Engine/Functions/XlNetworkdays_intl.php | 33 + .../Engine/Functions/XlNominal.php | 33 + .../Engine/Functions/XlNorm_dist.php | 33 + .../Engine/Functions/XlNorm_inv.php | 33 + .../Engine/Functions/XlNorm_s_dist.php | 33 + .../Engine/Functions/XlNorm_s_inv.php | 33 + .../Engine/Functions/XlNormdist.php | 33 + .../Engine/Functions/XlNorminv.php | 33 + .../Engine/Functions/XlNormsdist.php | 33 + .../Engine/Functions/XlNormsinv.php | 33 + .../Calculation/Engine/Functions/XlNot.php | 33 + .../Calculation/Engine/Functions/XlNow.php | 33 + .../Calculation/Engine/Functions/XlNper.php | 33 + .../Calculation/Engine/Functions/XlNpv.php | 33 + .../Engine/Functions/XlNumberstring.php | 33 + .../Engine/Functions/XlNumbervalue.php | 33 + .../Engine/Functions/XlOct2bin.php | 33 + .../Engine/Functions/XlOct2dec.php | 33 + .../Engine/Functions/XlOct2hex.php | 33 + .../Calculation/Engine/Functions/XlOdd.php | 33 + .../Engine/Functions/XlOddfprice.php | 33 + .../Engine/Functions/XlOddfyield.php | 33 + .../Engine/Functions/XlOddlprice.php | 33 + .../Engine/Functions/XlOddlyield.php | 33 + .../Calculation/Engine/Functions/XlOffset.php | 38 + .../Calculation/Engine/Functions/XlOr.php | 33 + .../Engine/Functions/XlPduration.php | 33 + .../Engine/Functions/XlPearson.php | 33 + .../Engine/Functions/XlPercentile.php | 33 + .../Engine/Functions/XlPercentile_exc.php | 33 + .../Engine/Functions/XlPercentile_inc.php | 33 + .../Engine/Functions/XlPercentrank.php | 33 + .../Engine/Functions/XlPercentrank_exc.php | 33 + .../Engine/Functions/XlPercentrank_inc.php | 33 + .../Calculation/Engine/Functions/XlPermut.php | 33 + .../Engine/Functions/XlPermutationa.php | 33 + .../Calculation/Engine/Functions/XlPhi.php | 33 + .../Engine/Functions/XlPhonetic.php | 33 + .../Calculation/Engine/Functions/XlPi.php | 33 + .../Calculation/Engine/Functions/XlPmt.php | 33 + .../Engine/Functions/XlPoisson.php | 33 + .../Engine/Functions/XlPoisson_dist.php | 33 + .../Calculation/Engine/Functions/XlPower.php | 33 + .../Calculation/Engine/Functions/XlPpmt.php | 33 + .../Calculation/Engine/Functions/XlPrice.php | 33 + .../Engine/Functions/XlPricedisc.php | 33 + .../Engine/Functions/XlPricemat.php | 33 + .../Calculation/Engine/Functions/XlProb.php | 33 + .../Engine/Functions/XlProduct.php | 33 + .../Calculation/Engine/Functions/XlProper.php | 33 + .../Calculation/Engine/Functions/XlPv.php | 33 + .../Engine/Functions/XlQuartile.php | 33 + .../Engine/Functions/XlQuartile_exc.php | 33 + .../Engine/Functions/XlQuartile_inc.php | 33 + .../Engine/Functions/XlQuotient.php | 33 + .../Engine/Functions/XlRadians.php | 33 + .../Calculation/Engine/Functions/XlRand.php | 33 + .../Engine/Functions/XlRandarray.php | 33 + .../Engine/Functions/XlRandbetween.php | 33 + .../Calculation/Engine/Functions/XlRank.php | 33 + .../Engine/Functions/XlRank_avg.php | 33 + .../Engine/Functions/XlRank_eq.php | 33 + .../Calculation/Engine/Functions/XlRate.php | 33 + .../Engine/Functions/XlReceived.php | 33 + .../Engine/Functions/XlReplace.php | 33 + .../Engine/Functions/XlReplaceb.php | 33 + .../Calculation/Engine/Functions/XlRept.php | 33 + .../Calculation/Engine/Functions/XlRight.php | 33 + .../Calculation/Engine/Functions/XlRightb.php | 33 + .../Calculation/Engine/Functions/XlRoman.php | 33 + .../Calculation/Engine/Functions/XlRound.php | 33 + .../Engine/Functions/XlRoundbahtdown.php | 33 + .../Engine/Functions/XlRoundbahtup.php | 33 + .../Engine/Functions/XlRounddown.php | 33 + .../Engine/Functions/XlRoundup.php | 33 + .../Calculation/Engine/Functions/XlRow.php | 38 + .../Calculation/Engine/Functions/XlRows.php | 33 + .../Calculation/Engine/Functions/XlRri.php | 33 + .../Calculation/Engine/Functions/XlRsq.php | 33 + .../Calculation/Engine/Functions/XlRtd.php | 33 + .../Calculation/Engine/Functions/XlSearch.php | 33 + .../Engine/Functions/XlSearchb.php | 33 + .../Calculation/Engine/Functions/XlSec.php | 33 + .../Calculation/Engine/Functions/XlSech.php | 33 + .../Calculation/Engine/Functions/XlSecond.php | 33 + .../Engine/Functions/XlSequence.php | 33 + .../Engine/Functions/XlSeriessum.php | 33 + .../Calculation/Engine/Functions/XlSheet.php | 33 + .../Calculation/Engine/Functions/XlSheets.php | 33 + .../Calculation/Engine/Functions/XlSign.php | 33 + .../Calculation/Engine/Functions/XlSin.php | 33 + .../Calculation/Engine/Functions/XlSinh.php | 33 + .../Calculation/Engine/Functions/XlSkew.php | 33 + .../Calculation/Engine/Functions/XlSkew_p.php | 33 + .../Calculation/Engine/Functions/XlSln.php | 33 + .../Calculation/Engine/Functions/XlSlope.php | 33 + .../Calculation/Engine/Functions/XlSmall.php | 33 + .../Calculation/Engine/Functions/XlSort.php | 33 + .../Calculation/Engine/Functions/XlSortby.php | 33 + .../Calculation/Engine/Functions/XlSqrt.php | 33 + .../Calculation/Engine/Functions/XlSqrtpi.php | 33 + .../Engine/Functions/XlStandardize.php | 33 + .../Calculation/Engine/Functions/XlStdev.php | 33 + .../Engine/Functions/XlStdev_p.php | 33 + .../Engine/Functions/XlStdev_s.php | 33 + .../Calculation/Engine/Functions/XlStdeva.php | 33 + .../Calculation/Engine/Functions/XlStdevp.php | 33 + .../Engine/Functions/XlStdevpa.php | 33 + .../Calculation/Engine/Functions/XlSteyx.php | 33 + .../Engine/Functions/XlSubstitute.php | 33 + .../Engine/Functions/XlSubtotal.php | 36 + .../Calculation/Engine/Functions/XlSum.php | 33 + .../Calculation/Engine/Functions/XlSumif.php | 33 + .../Calculation/Engine/Functions/XlSumifs.php | 33 + .../Engine/Functions/XlSumproduct.php | 33 + .../Calculation/Engine/Functions/XlSumsq.php | 33 + .../Engine/Functions/XlSumx2my2.php | 33 + .../Engine/Functions/XlSumx2py2.php | 33 + .../Engine/Functions/XlSumxmy2.php | 33 + .../Calculation/Engine/Functions/XlSwitch.php | 33 + .../Calculation/Engine/Functions/XlSyd.php | 33 + .../Calculation/Engine/Functions/XlT.php | 33 + .../Calculation/Engine/Functions/XlT_dist.php | 33 + .../Engine/Functions/XlT_dist_2t.php | 33 + .../Engine/Functions/XlT_dist_rt.php | 33 + .../Calculation/Engine/Functions/XlT_inv.php | 33 + .../Engine/Functions/XlT_inv_2t.php | 33 + .../Calculation/Engine/Functions/XlT_test.php | 33 + .../Calculation/Engine/Functions/XlTan.php | 33 + .../Calculation/Engine/Functions/XlTanh.php | 33 + .../Engine/Functions/XlTbilleq.php | 33 + .../Engine/Functions/XlTbillprice.php | 33 + .../Engine/Functions/XlTbillyield.php | 33 + .../Calculation/Engine/Functions/XlTdist.php | 33 + .../Calculation/Engine/Functions/XlText.php | 33 + .../Engine/Functions/XlTextjoin.php | 33 + .../Engine/Functions/XlThaidayofweek.php | 33 + .../Engine/Functions/XlThaidigit.php | 33 + .../Engine/Functions/XlThaimonthofyear.php | 33 + .../Engine/Functions/XlThainumsound.php | 33 + .../Engine/Functions/XlThainumstring.php | 33 + .../Engine/Functions/XlThaistringlength.php | 33 + .../Engine/Functions/XlThaiyear.php | 33 + .../Calculation/Engine/Functions/XlTime.php | 33 + .../Engine/Functions/XlTimevalue.php | 33 + .../Calculation/Engine/Functions/XlTinv.php | 33 + .../Calculation/Engine/Functions/XlToday.php | 33 + .../Engine/Functions/XlTranspose.php | 33 + .../Calculation/Engine/Functions/XlTrend.php | 33 + .../Calculation/Engine/Functions/XlTrim.php | 33 + .../Engine/Functions/XlTrimmean.php | 33 + .../Calculation/Engine/Functions/XlTrue.php | 33 + .../Calculation/Engine/Functions/XlTrunc.php | 33 + .../Calculation/Engine/Functions/XlTtest.php | 33 + .../Calculation/Engine/Functions/XlType.php | 33 + .../Engine/Functions/XlUnichar.php | 33 + .../Engine/Functions/XlUnicode.php | 33 + .../Calculation/Engine/Functions/XlUnique.php | 33 + .../Calculation/Engine/Functions/XlUpper.php | 33 + .../Engine/Functions/XlUsdollar.php | 33 + .../Calculation/Engine/Functions/XlValue.php | 33 + .../Engine/Functions/XlValuetotext.php | 33 + .../Calculation/Engine/Functions/XlVar.php | 33 + .../Calculation/Engine/Functions/XlVar_p.php | 33 + .../Calculation/Engine/Functions/XlVar_s.php | 33 + .../Calculation/Engine/Functions/XlVara.php | 33 + .../Calculation/Engine/Functions/XlVarp.php | 33 + .../Calculation/Engine/Functions/XlVarpa.php | 33 + .../Calculation/Engine/Functions/XlVdb.php | 33 + .../Engine/Functions/XlVlookup.php | 33 + .../Engine/Functions/XlWebservice.php | 33 + .../Engine/Functions/XlWeekday.php | 33 + .../Engine/Functions/XlWeeknum.php | 33 + .../Engine/Functions/XlWeibull.php | 33 + .../Engine/Functions/XlWeibull_dist.php | 33 + .../Engine/Functions/XlWorkday.php | 33 + .../Engine/Functions/XlWorkday_intl.php | 33 + .../Calculation/Engine/Functions/XlXirr.php | 33 + .../Engine/Functions/XlXlookup.php | 33 + .../Calculation/Engine/Functions/XlXmatch.php | 33 + .../Calculation/Engine/Functions/XlXnpv.php | 33 + .../Calculation/Engine/Functions/XlXor.php | 33 + .../Calculation/Engine/Functions/XlYear.php | 33 + .../Engine/Functions/XlYearfrac.php | 33 + .../Calculation/Engine/Functions/XlYield.php | 33 + .../Engine/Functions/XlYielddisc.php | 33 + .../Engine/Functions/XlYieldmat.php | 33 + .../Calculation/Engine/Functions/XlZ_test.php | 33 + .../Calculation/Engine/Functions/XlZtest.php | 33 + .../Calculation/Engine/XlFunctionAbstract.php | 80 + .../Calculation/Engine/XlPassByReference.php | 14 + .../Engine/XlPassCellReference.php | 14 + .../Calculation/MathTrig/Pi.php | 11 + .../CalculationFunctionListTest.php | 20 +- .../Engine/ExcelFunctionsCollectionTest.php | 72 + .../Engine/XlFunctionSignatureTest.php | 69 + .../Calculation/Functions/MathTrig/PiTest.php | 13 + .../Reader/Csv/CsvIssue2232Test.php | 5 +- 515 files changed, 17488 insertions(+), 2541 deletions(-) create mode 100644 src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAbs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAccrint.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAccrintm.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAcos.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAcosh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAcot.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAcoth.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAddress.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAggregate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAmordegrc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAmorlinc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAnd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlArabic.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAreas.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlArraytotext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAsc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAsin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAsinh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAtan.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAtan2.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAtanh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAvedev.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAverage.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAveragea.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAverageif.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlAverageifs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBahttext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBase.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBesseli.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBesselj.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBesselk.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBessely.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBeta_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBeta_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBetadist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBetainv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBin2dec.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBin2hex.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBin2oct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBinom_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBinom_dist_range.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBinom_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBinomdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBitand.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBitlshift.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBitor.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBitrshift.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlBitxor.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCeiling.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCeiling_math.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCeiling_precise.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCell.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChidist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChiinv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChisq_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChisq_dist_rt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChisq_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChisq_inv_rt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChisq_test.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChitest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChoose.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlClean.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCode.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlColumn.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlColumns.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCombin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCombina.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlComplex.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConcat.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConcatenate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConfidence.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConfidence_norm.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConfidence_t.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlConvert.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCorrel.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCos.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCosh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCot.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoth.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCount.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCounta.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCountblank.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCountif.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCountifs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoupdaybs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoupdays.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoupdaysnc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoupncd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCoupnum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCouppcd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCovar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCovariance_p.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCovariance_s.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCritbinom.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCsc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCsch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubekpimember.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubemember.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubememberproperty.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCuberankedmember.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubeset.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubesetcount.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCubevalue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCumipmt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlCumprinc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDatedif.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDatestring.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDatevalue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDaverage.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDay.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDays.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDays360.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDbcs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDcount.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDcounta.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDdb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDec2bin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDec2hex.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDec2oct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDecimal.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDegrees.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDelta.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDevsq.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDget.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDisc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDmax.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDmin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDollar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDollarde.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDollarfr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDproduct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDstdev.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDstdevp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDsum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDuration.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDvar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDvarp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEcma_ceiling.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEdate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEffect.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEncodeurl.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEomonth.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlErf.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlErf_precise.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlErfc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlErfc_precise.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlError_type.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlEven.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlExact.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlExp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlExpon_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlExpondist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlF_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlF_dist_rt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlF_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlF_inv_rt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlF_test.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFact.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFactdouble.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFalse.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFilter.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFilterxml.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFind.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFindb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFinv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFisher.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFisherinv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFixed.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFloor.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFloor_math.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFloor_precise.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast_ets.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast_ets_confint.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast_ets_seasonality.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast_ets_stat.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlForecast_linear.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFormulatext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFrequency.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFtest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlFvschedule.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGamma.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGamma_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGamma_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGammadist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGammainv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGammaln.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGammaln_precise.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGauss.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGcd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGeomean.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGestep.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGetpivotdata.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlGrowth.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHarmean.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHex2bin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHex2dec.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHex2oct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHlookup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHour.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHyperlink.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHypgeom_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHypgeomdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIf.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIferror.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIfna.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIfs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImabs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImaginary.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImargument.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImconjugate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImcos.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImcosh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImcot.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImcsc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImcsch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImdiv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImexp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImln.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImlog10.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImlog2.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImpower.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImproduct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImreal.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsec.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsech.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsinh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsqrt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsub.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImsum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlImtan.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIndex.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIndirect.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlInfo.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlInt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIntercept.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIntrate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIpmt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIrr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsblank.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIserr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIserror.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIseven.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsformula.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIslogical.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsna.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsnontext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsnumber.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIso_ceiling.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsodd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsoweeknum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIspmt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsref.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIstext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlIsthaidigit.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlJis.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlKurt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLarge.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLcm.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLeft.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLeftb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLen.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLenb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLinest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLn.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLog.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLog10.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLogest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLoginv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLognorm_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLognorm_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLognormdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLookup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlLower.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMatch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMax.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMaxa.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMaxifs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMdeterm.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMduration.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMedian.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMedianif.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMid.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMidb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMina.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMinifs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMinute.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMinverse.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMirr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMmult.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMod.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMode.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMode_mult.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMode_sngl.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMonth.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMround.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMultinomial.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlMunit.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlN.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNa.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNegbinom_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNegbinomdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNetworkdays.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNetworkdays_intl.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNominal.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNorm_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNorm_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNorm_s_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNorm_s_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNormdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNorminv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNormsdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNormsinv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNot.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNow.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNper.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNpv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNumberstring.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlNumbervalue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOct2bin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOct2dec.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOct2hex.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOdd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOddfprice.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOddfyield.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOddlprice.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOddlyield.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOffset.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlOr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPduration.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPearson.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentile.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentile_exc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentile_inc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentrank.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentrank_exc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPercentrank_inc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPermut.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPermutationa.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPhi.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPhonetic.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPi.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPmt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPoisson.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPoisson_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPower.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPpmt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPrice.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPricedisc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPricemat.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlProb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlProduct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlProper.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlPv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlQuartile.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlQuartile_exc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlQuartile_inc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlQuotient.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRadians.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRand.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRandarray.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRandbetween.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRank.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRank_avg.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRank_eq.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRate.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlReceived.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlReplace.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlReplaceb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRept.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRight.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRightb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRoman.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRound.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRoundbahtdown.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRoundbahtup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRounddown.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRoundup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRow.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRows.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRri.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRsq.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlRtd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSearch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSearchb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSec.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSech.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSecond.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSequence.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSeriessum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSheet.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSheets.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSign.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSinh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSkew.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSkew_p.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSln.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSlope.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSmall.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSort.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSortby.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSqrt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSqrtpi.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStandardize.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdev.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdev_p.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdev_s.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdeva.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdevp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlStdevpa.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSteyx.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSubstitute.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSubtotal.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumif.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumifs.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumproduct.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumsq.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumx2my2.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumx2py2.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSumxmy2.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSwitch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlSyd.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_dist_2t.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_dist_rt.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_inv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_inv_2t.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlT_test.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTan.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTanh.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTbilleq.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTbillprice.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTbillyield.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTdist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlText.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTextjoin.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThaidayofweek.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThaidigit.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThaimonthofyear.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThainumsound.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThainumstring.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThaistringlength.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlThaiyear.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTime.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTimevalue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTinv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlToday.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTranspose.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTrend.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTrim.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTrimmean.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTrue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTrunc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTtest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlType.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlUnichar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlUnicode.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlUnique.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlUpper.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlUsdollar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlValue.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlValuetotext.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVar.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVar_p.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVar_s.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVara.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVarp.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVarpa.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVdb.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVlookup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWebservice.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWeekday.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWeeknum.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWeibull.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWeibull_dist.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWorkday.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWorkday_intl.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlXirr.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlXlookup.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlXmatch.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlXnpv.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlXor.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlYear.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlYearfrac.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlYield.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlYielddisc.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlYieldmat.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlZ_test.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlZtest.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/XlFunctionAbstract.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/XlPassByReference.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/XlPassCellReference.php create mode 100644 src/PhpSpreadsheet/Calculation/MathTrig/Pi.php create mode 100644 tests/PhpSpreadsheetTests/Calculation/Engine/ExcelFunctionsCollectionTest.php create mode 100644 tests/PhpSpreadsheetTests/Calculation/Engine/XlFunctionSignatureTest.php create mode 100644 tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 8a8886c21e..1a1603e8e9 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -121,7 +121,7 @@ 'no_unneeded_final_method' => true, 'no_unreachable_default_argument_value' => true, 'no_unset_cast' => true, - 'no_unset_on_property' => true, + 'no_unset_on_property' => false, 'no_unused_imports' => true, 'no_useless_else' => true, 'no_useless_return' => true, diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 3eafb6ca19..de61507dfa 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -19,4 +19,8 @@ + + + */src/PhpSpreadsheet/Calculation/Engine/Functions/* + diff --git a/bin/generate-locales b/bin/generate-locales index 30b9c55657..0258f002c4 100644 --- a/bin/generate-locales +++ b/bin/generate-locales @@ -7,10 +7,7 @@ use PhpOffice\PhpSpreadsheetInfra\LocaleGenerator; require_once 'vendor/autoload.php'; try { - $phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class)) - ->getProperty('phpSpreadsheetFunctions'); - $phpSpreadsheetFunctionsProperty->setAccessible(true); - $phpSpreadsheetFunctions = $phpSpreadsheetFunctionsProperty->getValue(); + $phpSpreadsheetFunctions = Calculation::getInstance()->getFunctions(); $localeGenerator = new LocaleGenerator( realpath(__DIR__ . '/../src/PhpSpreadsheet/Calculation/locale/'), diff --git a/infra/LocaleGenerator.php b/infra/LocaleGenerator.php index bb97754d7e..c47cd9a527 100644 --- a/infra/LocaleGenerator.php +++ b/infra/LocaleGenerator.php @@ -3,6 +3,7 @@ namespace PhpOffice\PhpSpreadsheetInfra; use Exception; +use PhpOffice\PhpSpreadsheet\Calculation\Engine\ExcelFunctions; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; @@ -37,6 +38,9 @@ class LocaleGenerator */ protected $translationBaseFolder; + /** + * @var ExcelFunctions + */ protected $phpSpreadsheetFunctions; /** @@ -67,7 +71,7 @@ class LocaleGenerator public function __construct( string $translationBaseFolder, string $translationSpreadsheetName, - array $phpSpreadsheetFunctions, + ExcelFunctions $phpSpreadsheetFunctions, bool $verbose = false ) { $this->translationBaseFolder = $translationBaseFolder; @@ -146,7 +150,7 @@ protected function buildFunctionsFileForLocale($column, $locale): void $translationValue = $translationCell->getValue(); if ($this->isFunctionCategoryEntry($translationCell)) { $this->writeFileSectionHeader($functionFile, "{$translationValue} ({$functionName})"); - } elseif (!array_key_exists($functionName, $this->phpSpreadsheetFunctions)) { + } elseif (!$this->phpSpreadsheetFunctions->isRecognisedExcelFunction($functionName)) { $this->log("Function {$functionName} is not defined in PhpSpreadsheet"); } elseif (!empty($translationValue)) { $functionTranslation = "{$functionName} = {$translationValue}" . self::EOL; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9ecc0f0163..1d5bfc351e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -215,11 +215,6 @@ parameters: count: 1 path: src/PhpSpreadsheet/Calculation/Calculation.php - - - message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$phpSpreadsheetFunctions has no type specified\\.$#" - count: 1 - path: src/PhpSpreadsheet/Calculation/Calculation.php - - message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$returnArrayAsType has no type specified\\.$#" count: 1 diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index b336920cae..33ec62aafe 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -4,6 +4,7 @@ use PhpOffice\PhpSpreadsheet\Calculation\Engine\BranchPruner; use PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack; +use PhpOffice\PhpSpreadsheet\Calculation\Engine\ExcelFunctions; use PhpOffice\PhpSpreadsheet\Calculation\Engine\Logger; use PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; @@ -229,2519 +230,12 @@ class Calculation 'NULL' => null, ]; - // PhpSpreadsheet functions - private static $phpSpreadsheetFunctions = [ - 'ABS' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Absolute::class, 'evaluate'], - 'argumentCount' => '1', - ], - 'ACCRINT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\AccruedInterest::class, 'periodic'], - 'argumentCount' => '4-8', - ], - 'ACCRINTM' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\AccruedInterest::class, 'atMaturity'], - 'argumentCount' => '3-5', - ], - 'ACOS' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosine::class, 'acos'], - 'argumentCount' => '1', - ], - 'ACOSH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosine::class, 'acosh'], - 'argumentCount' => '1', - ], - 'ACOT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cotangent::class, 'acot'], - 'argumentCount' => '1', - ], - 'ACOTH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cotangent::class, 'acoth'], - 'argumentCount' => '1', - ], - 'ADDRESS' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Address::class, 'cell'], - 'argumentCount' => '2-5', - ], - 'AGGREGATE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3+', - ], - 'AMORDEGRC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Amortization::class, 'AMORDEGRC'], - 'argumentCount' => '6,7', - ], - 'AMORLINC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Amortization::class, 'AMORLINC'], - 'argumentCount' => '6,7', - ], - 'AND' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Operations::class, 'logicalAnd'], - 'argumentCount' => '1+', - ], - 'ARABIC' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Arabic::class, 'evaluate'], - 'argumentCount' => '1', - ], - 'AREAS' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'ARRAYTOTEXT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'ASC' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'ASIN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Sine::class, 'asin'], - 'argumentCount' => '1', - ], - 'ASINH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Sine::class, 'asinh'], - 'argumentCount' => '1', - ], - 'ATAN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Tangent::class, 'atan'], - 'argumentCount' => '1', - ], - 'ATAN2' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Tangent::class, 'atan2'], - 'argumentCount' => '2', - ], - 'ATANH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Tangent::class, 'atanh'], - 'argumentCount' => '1', - ], - 'AVEDEV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'averageDeviations'], - 'argumentCount' => '1+', - ], - 'AVERAGE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'average'], - 'argumentCount' => '1+', - ], - 'AVERAGEA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'averageA'], - 'argumentCount' => '1+', - ], - 'AVERAGEIF' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'AVERAGEIF'], - 'argumentCount' => '2,3', - ], - 'AVERAGEIFS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'AVERAGEIFS'], - 'argumentCount' => '3+', - ], - 'BAHTTEXT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'BASE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Base::class, 'evaluate'], - 'argumentCount' => '2,3', - ], - 'BESSELI' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BesselI::class, 'BESSELI'], - 'argumentCount' => '2', - ], - 'BESSELJ' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BesselJ::class, 'BESSELJ'], - 'argumentCount' => '2', - ], - 'BESSELK' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BesselK::class, 'BESSELK'], - 'argumentCount' => '2', - ], - 'BESSELY' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BesselY::class, 'BESSELY'], - 'argumentCount' => '2', - ], - 'BETADIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Beta::class, 'distribution'], - 'argumentCount' => '3-5', - ], - 'BETA.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '4-6', - ], - 'BETAINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Beta::class, 'inverse'], - 'argumentCount' => '3-5', - ], - 'BETA.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Beta::class, 'inverse'], - 'argumentCount' => '3-5', - ], - 'BIN2DEC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertBinary::class, 'toDecimal'], - 'argumentCount' => '1', - ], - 'BIN2HEX' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertBinary::class, 'toHex'], - 'argumentCount' => '1,2', - ], - 'BIN2OCT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertBinary::class, 'toOctal'], - 'argumentCount' => '1,2', - ], - 'BINOMDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'distribution'], - 'argumentCount' => '4', - ], - 'BINOM.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'distribution'], - 'argumentCount' => '4', - ], - 'BINOM.DIST.RANGE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'range'], - 'argumentCount' => '3,4', - ], - 'BINOM.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'inverse'], - 'argumentCount' => '3', - ], - 'BITAND' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BitWise::class, 'BITAND'], - 'argumentCount' => '2', - ], - 'BITOR' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BitWise::class, 'BITOR'], - 'argumentCount' => '2', - ], - 'BITXOR' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BitWise::class, 'BITXOR'], - 'argumentCount' => '2', - ], - 'BITLSHIFT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BitWise::class, 'BITLSHIFT'], - 'argumentCount' => '2', - ], - 'BITRSHIFT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\BitWise::class, 'BITRSHIFT'], - 'argumentCount' => '2', - ], - 'CEILING' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Ceiling::class, 'ceiling'], - 'argumentCount' => '1-2', // 2 for Excel, 1-2 for Ods/Gnumeric - ], - 'CEILING.MATH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Ceiling::class, 'math'], - 'argumentCount' => '1-3', - ], - 'CEILING.PRECISE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Ceiling::class, 'precise'], - 'argumentCount' => '1,2', - ], - 'CELL' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1,2', - ], - 'CHAR' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CharacterConvert::class, 'character'], - 'argumentCount' => '1', - ], - 'CHIDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionRightTail'], - 'argumentCount' => '2', - ], - 'CHISQ.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionLeftTail'], - 'argumentCount' => '3', - ], - 'CHISQ.DIST.RT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionRightTail'], - 'argumentCount' => '2', - ], - 'CHIINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseRightTail'], - 'argumentCount' => '2', - ], - 'CHISQ.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseLeftTail'], - 'argumentCount' => '2', - ], - 'CHISQ.INV.RT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseRightTail'], - 'argumentCount' => '2', - ], - 'CHITEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'test'], - 'argumentCount' => '2', - ], - 'CHISQ.TEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'test'], - 'argumentCount' => '2', - ], - 'CHOOSE' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Selection::class, 'CHOOSE'], - 'argumentCount' => '2+', - ], - 'CLEAN' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Trim::class, 'nonPrintable'], - 'argumentCount' => '1', - ], - 'CODE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CharacterConvert::class, 'code'], - 'argumentCount' => '1', - ], - 'COLUMN' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\RowColumnInformation::class, 'COLUMN'], - 'argumentCount' => '-1', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'COLUMNS' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\RowColumnInformation::class, 'COLUMNS'], - 'argumentCount' => '1', - ], - 'COMBIN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Combinations::class, 'withoutRepetition'], - 'argumentCount' => '2', - ], - 'COMBINA' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Combinations::class, 'withRepetition'], - 'argumentCount' => '2', - ], - 'COMPLEX' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Complex::class, 'COMPLEX'], - 'argumentCount' => '2,3', - ], - 'CONCAT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Concatenate::class, 'CONCATENATE'], - 'argumentCount' => '1+', - ], - 'CONCATENATE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Concatenate::class, 'CONCATENATE'], - 'argumentCount' => '1+', - ], - 'CONFIDENCE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Confidence::class, 'CONFIDENCE'], - 'argumentCount' => '3', - ], - 'CONFIDENCE.NORM' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Confidence::class, 'CONFIDENCE'], - 'argumentCount' => '3', - ], - 'CONFIDENCE.T' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'CONVERT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertUOM::class, 'CONVERT'], - 'argumentCount' => '3', - ], - 'CORREL' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'CORREL'], - 'argumentCount' => '2', - ], - 'COS' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosine::class, 'cos'], - 'argumentCount' => '1', - ], - 'COSH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosine::class, 'cosh'], - 'argumentCount' => '1', - ], - 'COT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cotangent::class, 'cot'], - 'argumentCount' => '1', - ], - 'COTH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cotangent::class, 'coth'], - 'argumentCount' => '1', - ], - 'COUNT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Counts::class, 'COUNT'], - 'argumentCount' => '1+', - ], - 'COUNTA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Counts::class, 'COUNTA'], - 'argumentCount' => '1+', - ], - 'COUNTBLANK' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Counts::class, 'COUNTBLANK'], - 'argumentCount' => '1', - ], - 'COUNTIF' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'COUNTIF'], - 'argumentCount' => '2', - ], - 'COUNTIFS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'COUNTIFS'], - 'argumentCount' => '2+', - ], - 'COUPDAYBS' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPDAYBS'], - 'argumentCount' => '3,4', - ], - 'COUPDAYS' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPDAYS'], - 'argumentCount' => '3,4', - ], - 'COUPDAYSNC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPDAYSNC'], - 'argumentCount' => '3,4', - ], - 'COUPNCD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPNCD'], - 'argumentCount' => '3,4', - ], - 'COUPNUM' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPNUM'], - 'argumentCount' => '3,4', - ], - 'COUPPCD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Coupons::class, 'COUPPCD'], - 'argumentCount' => '3,4', - ], - 'COVAR' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'COVAR'], - 'argumentCount' => '2', - ], - 'COVARIANCE.P' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'COVAR'], - 'argumentCount' => '2', - ], - 'COVARIANCE.S' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'CRITBINOM' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'inverse'], - 'argumentCount' => '3', - ], - 'CSC' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosecant::class, 'csc'], - 'argumentCount' => '1', - ], - 'CSCH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Cosecant::class, 'csch'], - 'argumentCount' => '1', - ], - 'CUBEKPIMEMBER' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBEMEMBER' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBEMEMBERPROPERTY' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBERANKEDMEMBER' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBESET' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBESETCOUNT' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUBEVALUE' => [ - 'category' => Category::CATEGORY_CUBE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'CUMIPMT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Cumulative::class, 'interest'], - 'argumentCount' => '6', - ], - 'CUMPRINC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Cumulative::class, 'principal'], - 'argumentCount' => '6', - ], - 'DATE' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Date::class, 'fromYMD'], - 'argumentCount' => '3', - ], - 'DATEDIF' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Difference::class, 'interval'], - 'argumentCount' => '2,3', - ], - 'DATESTRING' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'DATEVALUE' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\DateValue::class, 'fromString'], - 'argumentCount' => '1', - ], - 'DAVERAGE' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DAverage::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DAY' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\DateParts::class, 'day'], - 'argumentCount' => '1', - ], - 'DAYS' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Days::class, 'between'], - 'argumentCount' => '2', - ], - 'DAYS360' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Days360::class, 'between'], - 'argumentCount' => '2,3', - ], - 'DB' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Depreciation::class, 'DB'], - 'argumentCount' => '4,5', - ], - 'DBCS' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'DCOUNT' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DCount::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DCOUNTA' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DCountA::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DDB' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Depreciation::class, 'DDB'], - 'argumentCount' => '4,5', - ], - 'DEC2BIN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertDecimal::class, 'toBinary'], - 'argumentCount' => '1,2', - ], - 'DEC2HEX' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertDecimal::class, 'toHex'], - 'argumentCount' => '1,2', - ], - 'DEC2OCT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertDecimal::class, 'toOctal'], - 'argumentCount' => '1,2', - ], - 'DECIMAL' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'DEGREES' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Angle::class, 'toDegrees'], - 'argumentCount' => '1', - ], - 'DELTA' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Compare::class, 'DELTA'], - 'argumentCount' => '1,2', - ], - 'DEVSQ' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Deviations::class, 'sumSquares'], - 'argumentCount' => '1+', - ], - 'DGET' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DGet::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DISC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Rates::class, 'discount'], - 'argumentCount' => '4,5', - ], - 'DMAX' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DMax::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DMIN' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DMin::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DOLLAR' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Format::class, 'DOLLAR'], - 'argumentCount' => '1,2', - ], - 'DOLLARDE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Dollar::class, 'decimal'], - 'argumentCount' => '2', - ], - 'DOLLARFR' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Dollar::class, 'fractional'], - 'argumentCount' => '2', - ], - 'DPRODUCT' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DProduct::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DSTDEV' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DStDev::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DSTDEVP' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DStDevP::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DSUM' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DSum::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DURATION' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '5,6', - ], - 'DVAR' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DVar::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'DVARP' => [ - 'category' => Category::CATEGORY_DATABASE, - 'functionCall' => [Database\DVarP::class, 'evaluate'], - 'argumentCount' => '3', - ], - 'ECMA.CEILING' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1,2', - ], - 'EDATE' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Month::class, 'adjust'], - 'argumentCount' => '2', - ], - 'EFFECT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\InterestRate::class, 'effective'], - 'argumentCount' => '2', - ], - 'ENCODEURL' => [ - 'category' => Category::CATEGORY_WEB, - 'functionCall' => [Web\Service::class, 'urlEncode'], - 'argumentCount' => '1', - ], - 'EOMONTH' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Month::class, 'lastDay'], - 'argumentCount' => '2', - ], - 'ERF' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Erf::class, 'ERF'], - 'argumentCount' => '1,2', - ], - 'ERF.PRECISE' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Erf::class, 'ERFPRECISE'], - 'argumentCount' => '1', - ], - 'ERFC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ErfC::class, 'ERFC'], - 'argumentCount' => '1', - ], - 'ERFC.PRECISE' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ErfC::class, 'ERFC'], - 'argumentCount' => '1', - ], - 'ERROR.TYPE' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\ExcelError::class, 'type'], - 'argumentCount' => '1', - ], - 'EVEN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'even'], - 'argumentCount' => '1', - ], - 'EXACT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Text::class, 'exact'], - 'argumentCount' => '2', - ], - 'EXP' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Exp::class, 'evaluate'], - 'argumentCount' => '1', - ], - 'EXPONDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Exponential::class, 'distribution'], - 'argumentCount' => '3', - ], - 'EXPON.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Exponential::class, 'distribution'], - 'argumentCount' => '3', - ], - 'FACT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Factorial::class, 'fact'], - 'argumentCount' => '1', - ], - 'FACTDOUBLE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Factorial::class, 'factDouble'], - 'argumentCount' => '1', - ], - 'FALSE' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Boolean::class, 'FALSE'], - 'argumentCount' => '0', - ], - 'FDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'F.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\F::class, 'distribution'], - 'argumentCount' => '4', - ], - 'F.DIST.RT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'FILTER' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Filter::class, 'filter'], - 'argumentCount' => '2-3', - ], - 'FILTERXML' => [ - 'category' => Category::CATEGORY_WEB, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'FIND' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Search::class, 'sensitive'], - 'argumentCount' => '2,3', - ], - 'FINDB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Search::class, 'sensitive'], - 'argumentCount' => '2,3', - ], - 'FINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'F.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'F.INV.RT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'FISHER' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Fisher::class, 'distribution'], - 'argumentCount' => '1', - ], - 'FISHERINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Fisher::class, 'inverse'], - 'argumentCount' => '1', - ], - 'FIXED' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Format::class, 'FIXEDFORMAT'], - 'argumentCount' => '1-3', - ], - 'FLOOR' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Floor::class, 'floor'], - 'argumentCount' => '1-2', // Excel requries 2, Ods/Gnumeric 1-2 - ], - 'FLOOR.MATH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Floor::class, 'math'], - 'argumentCount' => '1-3', - ], - 'FLOOR.PRECISE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Floor::class, 'precise'], - 'argumentCount' => '1-2', - ], - 'FORECAST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'FORECAST'], - 'argumentCount' => '3', - ], - 'FORECAST.ETS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3-6', - ], - 'FORECAST.ETS.CONFINT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3-6', - ], - 'FORECAST.ETS.SEASONALITY' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2-4', - ], - 'FORECAST.ETS.STAT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3-6', - ], - 'FORECAST.LINEAR' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'FORECAST'], - 'argumentCount' => '3', - ], - 'FORMULATEXT' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Formula::class, 'text'], - 'argumentCount' => '1', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'FREQUENCY' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'FTEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'F.TEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'FV' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'futureValue'], - 'argumentCount' => '3-5', - ], - 'FVSCHEDULE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Single::class, 'futureValue'], - 'argumentCount' => '2', - ], - 'GAMMA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'gamma'], - 'argumentCount' => '1', - ], - 'GAMMADIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'distribution'], - 'argumentCount' => '4', - ], - 'GAMMA.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'distribution'], - 'argumentCount' => '4', - ], - 'GAMMAINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'inverse'], - 'argumentCount' => '3', - ], - 'GAMMA.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'inverse'], - 'argumentCount' => '3', - ], - 'GAMMALN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'ln'], - 'argumentCount' => '1', - ], - 'GAMMALN.PRECISE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Gamma::class, 'ln'], - 'argumentCount' => '1', - ], - 'GAUSS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'gauss'], - 'argumentCount' => '1', - ], - 'GCD' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Gcd::class, 'evaluate'], - 'argumentCount' => '1+', - ], - 'GEOMEAN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages\Mean::class, 'geometric'], - 'argumentCount' => '1+', - ], - 'GESTEP' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Compare::class, 'GESTEP'], - 'argumentCount' => '1,2', - ], - 'GETPIVOTDATA' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2+', - ], - 'GROWTH' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'GROWTH'], - 'argumentCount' => '1-4', - ], - 'HARMEAN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages\Mean::class, 'harmonic'], - 'argumentCount' => '1+', - ], - 'HEX2BIN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertHex::class, 'toBinary'], - 'argumentCount' => '1,2', - ], - 'HEX2DEC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertHex::class, 'toDecimal'], - 'argumentCount' => '1', - ], - 'HEX2OCT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertHex::class, 'toOctal'], - 'argumentCount' => '1,2', - ], - 'HLOOKUP' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\HLookup::class, 'lookup'], - 'argumentCount' => '3,4', - ], - 'HOUR' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\TimeParts::class, 'hour'], - 'argumentCount' => '1', - ], - 'HYPERLINK' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Hyperlink::class, 'set'], - 'argumentCount' => '1,2', - 'passCellReference' => true, - ], - 'HYPGEOMDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\HyperGeometric::class, 'distribution'], - 'argumentCount' => '4', - ], - 'HYPGEOM.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '5', - ], - 'IF' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Conditional::class, 'statementIf'], - 'argumentCount' => '1-3', - ], - 'IFERROR' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Conditional::class, 'IFERROR'], - 'argumentCount' => '2', - ], - 'IFNA' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Conditional::class, 'IFNA'], - 'argumentCount' => '2', - ], - 'IFS' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Conditional::class, 'IFS'], - 'argumentCount' => '2+', - ], - 'IMABS' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMABS'], - 'argumentCount' => '1', - ], - 'IMAGINARY' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Complex::class, 'IMAGINARY'], - 'argumentCount' => '1', - ], - 'IMARGUMENT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMARGUMENT'], - 'argumentCount' => '1', - ], - 'IMCONJUGATE' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCONJUGATE'], - 'argumentCount' => '1', - ], - 'IMCOS' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOS'], - 'argumentCount' => '1', - ], - 'IMCOSH' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOSH'], - 'argumentCount' => '1', - ], - 'IMCOT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOT'], - 'argumentCount' => '1', - ], - 'IMCSC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCSC'], - 'argumentCount' => '1', - ], - 'IMCSCH' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCSCH'], - 'argumentCount' => '1', - ], - 'IMDIV' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexOperations::class, 'IMDIV'], - 'argumentCount' => '2', - ], - 'IMEXP' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMEXP'], - 'argumentCount' => '1', - ], - 'IMLN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLN'], - 'argumentCount' => '1', - ], - 'IMLOG10' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLOG10'], - 'argumentCount' => '1', - ], - 'IMLOG2' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLOG2'], - 'argumentCount' => '1', - ], - 'IMPOWER' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMPOWER'], - 'argumentCount' => '2', - ], - 'IMPRODUCT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexOperations::class, 'IMPRODUCT'], - 'argumentCount' => '1+', - ], - 'IMREAL' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\Complex::class, 'IMREAL'], - 'argumentCount' => '1', - ], - 'IMSEC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSEC'], - 'argumentCount' => '1', - ], - 'IMSECH' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSECH'], - 'argumentCount' => '1', - ], - 'IMSIN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSIN'], - 'argumentCount' => '1', - ], - 'IMSINH' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSINH'], - 'argumentCount' => '1', - ], - 'IMSQRT' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSQRT'], - 'argumentCount' => '1', - ], - 'IMSUB' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexOperations::class, 'IMSUB'], - 'argumentCount' => '2', - ], - 'IMSUM' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexOperations::class, 'IMSUM'], - 'argumentCount' => '1+', - ], - 'IMTAN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ComplexFunctions::class, 'IMTAN'], - 'argumentCount' => '1', - ], - 'INDEX' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Matrix::class, 'index'], - 'argumentCount' => '1-4', - ], - 'INDIRECT' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Indirect::class, 'INDIRECT'], - 'argumentCount' => '1,2', - 'passCellReference' => true, - ], - 'INFO' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'INT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\IntClass::class, 'evaluate'], - 'argumentCount' => '1', - ], - 'INTERCEPT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'INTERCEPT'], - 'argumentCount' => '2', - ], - 'INTRATE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Rates::class, 'interest'], - 'argumentCount' => '4,5', - ], - 'IPMT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'payment'], - 'argumentCount' => '4-6', - ], - 'IRR' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'rate'], - 'argumentCount' => '1,2', - ], - 'ISBLANK' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isBlank'], - 'argumentCount' => '1', - ], - 'ISERR' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\ErrorValue::class, 'isErr'], - 'argumentCount' => '1', - ], - 'ISERROR' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\ErrorValue::class, 'isError'], - 'argumentCount' => '1', - ], - 'ISEVEN' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isEven'], - 'argumentCount' => '1', - ], - 'ISFORMULA' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isFormula'], - 'argumentCount' => '1', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'ISLOGICAL' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isLogical'], - 'argumentCount' => '1', - ], - 'ISNA' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\ErrorValue::class, 'isNa'], - 'argumentCount' => '1', - ], - 'ISNONTEXT' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isNonText'], - 'argumentCount' => '1', - ], - 'ISNUMBER' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isNumber'], - 'argumentCount' => '1', - ], - 'ISO.CEILING' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1,2', - ], - 'ISODD' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isOdd'], - 'argumentCount' => '1', - ], - 'ISOWEEKNUM' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Week::class, 'isoWeekNumber'], - 'argumentCount' => '1', - ], - 'ISPMT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'schedulePayment'], - 'argumentCount' => '4', - ], - 'ISREF' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isRef'], - 'argumentCount' => '1', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'ISTEXT' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'isText'], - 'argumentCount' => '1', - ], - 'ISTHAIDIGIT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'JIS' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'KURT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Deviations::class, 'kurtosis'], - 'argumentCount' => '1+', - ], - 'LARGE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Size::class, 'large'], - 'argumentCount' => '2', - ], - 'LCM' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Lcm::class, 'evaluate'], - 'argumentCount' => '1+', - ], - 'LEFT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'left'], - 'argumentCount' => '1,2', - ], - 'LEFTB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'left'], - 'argumentCount' => '1,2', - ], - 'LEN' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Text::class, 'length'], - 'argumentCount' => '1', - ], - 'LENB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Text::class, 'length'], - 'argumentCount' => '1', - ], - 'LINEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'LINEST'], - 'argumentCount' => '1-4', - ], - 'LN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Logarithms::class, 'natural'], - 'argumentCount' => '1', - ], - 'LOG' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Logarithms::class, 'withBase'], - 'argumentCount' => '1,2', - ], - 'LOG10' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Logarithms::class, 'base10'], - 'argumentCount' => '1', - ], - 'LOGEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'LOGEST'], - 'argumentCount' => '1-4', - ], - 'LOGINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\LogNormal::class, 'inverse'], - 'argumentCount' => '3', - ], - 'LOGNORMDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\LogNormal::class, 'cumulative'], - 'argumentCount' => '3', - ], - 'LOGNORM.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\LogNormal::class, 'distribution'], - 'argumentCount' => '4', - ], - 'LOGNORM.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\LogNormal::class, 'inverse'], - 'argumentCount' => '3', - ], - 'LOOKUP' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Lookup::class, 'lookup'], - 'argumentCount' => '2,3', - ], - 'LOWER' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CaseConvert::class, 'lower'], - 'argumentCount' => '1', - ], - 'MATCH' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\ExcelMatch::class, 'MATCH'], - 'argumentCount' => '2,3', - ], - 'MAX' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Maximum::class, 'max'], - 'argumentCount' => '1+', - ], - 'MAXA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Maximum::class, 'maxA'], - 'argumentCount' => '1+', - ], - 'MAXIFS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'MAXIFS'], - 'argumentCount' => '3+', - ], - 'MDETERM' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\MatrixFunctions::class, 'determinant'], - 'argumentCount' => '1', - ], - 'MDURATION' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '5,6', - ], - 'MEDIAN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'median'], - 'argumentCount' => '1+', - ], - 'MEDIANIF' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2+', - ], - 'MID' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'mid'], - 'argumentCount' => '3', - ], - 'MIDB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'mid'], - 'argumentCount' => '3', - ], - 'MIN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Minimum::class, 'min'], - 'argumentCount' => '1+', - ], - 'MINA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Minimum::class, 'minA'], - 'argumentCount' => '1+', - ], - 'MINIFS' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Conditional::class, 'MINIFS'], - 'argumentCount' => '3+', - ], - 'MINUTE' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\TimeParts::class, 'minute'], - 'argumentCount' => '1', - ], - 'MINVERSE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\MatrixFunctions::class, 'inverse'], - 'argumentCount' => '1', - ], - 'MIRR' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'modifiedRate'], - 'argumentCount' => '3', - ], - 'MMULT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\MatrixFunctions::class, 'multiply'], - 'argumentCount' => '2', - ], - 'MOD' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Operations::class, 'mod'], - 'argumentCount' => '2', - ], - 'MODE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'mode'], - 'argumentCount' => '1+', - ], - 'MODE.MULT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1+', - ], - 'MODE.SNGL' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages::class, 'mode'], - 'argumentCount' => '1+', - ], - 'MONTH' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\DateParts::class, 'month'], - 'argumentCount' => '1', - ], - 'MROUND' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'multiple'], - 'argumentCount' => '2', - ], - 'MULTINOMIAL' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Factorial::class, 'multinomial'], - 'argumentCount' => '1+', - ], - 'MUNIT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\MatrixFunctions::class, 'identity'], - 'argumentCount' => '1', - ], - 'N' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'asNumber'], - 'argumentCount' => '1', - ], - 'NA' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\ExcelError::class, 'NA'], - 'argumentCount' => '0', - ], - 'NEGBINOMDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Binomial::class, 'negative'], - 'argumentCount' => '3', - ], - 'NEGBINOM.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '4', - ], - 'NETWORKDAYS' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\NetworkDays::class, 'count'], - 'argumentCount' => '2-3', - ], - 'NETWORKDAYS.INTL' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2-4', - ], - 'NOMINAL' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\InterestRate::class, 'nominal'], - 'argumentCount' => '2', - ], - 'NORMDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Normal::class, 'distribution'], - 'argumentCount' => '4', - ], - 'NORM.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Normal::class, 'distribution'], - 'argumentCount' => '4', - ], - 'NORMINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Normal::class, 'inverse'], - 'argumentCount' => '3', - ], - 'NORM.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Normal::class, 'inverse'], - 'argumentCount' => '3', - ], - 'NORMSDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'cumulative'], - 'argumentCount' => '1', - ], - 'NORM.S.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'distribution'], - 'argumentCount' => '1,2', - ], - 'NORMSINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'inverse'], - 'argumentCount' => '1', - ], - 'NORM.S.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'inverse'], - 'argumentCount' => '1', - ], - 'NOT' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Operations::class, 'NOT'], - 'argumentCount' => '1', - ], - 'NOW' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Current::class, 'now'], - 'argumentCount' => '0', - ], - 'NPER' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'periods'], - 'argumentCount' => '3-5', - ], - 'NPV' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'presentValue'], - 'argumentCount' => '2+', - ], - 'NUMBERSTRING' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'NUMBERVALUE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Format::class, 'NUMBERVALUE'], - 'argumentCount' => '1+', - ], - 'OCT2BIN' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertOctal::class, 'toBinary'], - 'argumentCount' => '1,2', - ], - 'OCT2DEC' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertOctal::class, 'toDecimal'], - 'argumentCount' => '1', - ], - 'OCT2HEX' => [ - 'category' => Category::CATEGORY_ENGINEERING, - 'functionCall' => [Engineering\ConvertOctal::class, 'toHex'], - 'argumentCount' => '1,2', - ], - 'ODD' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'odd'], - 'argumentCount' => '1', - ], - 'ODDFPRICE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '8,9', - ], - 'ODDFYIELD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '8,9', - ], - 'ODDLPRICE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '7,8', - ], - 'ODDLYIELD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '7,8', - ], - 'OFFSET' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Offset::class, 'OFFSET'], - 'argumentCount' => '3-5', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'OR' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Operations::class, 'logicalOr'], - 'argumentCount' => '1+', - ], - 'PDURATION' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Single::class, 'periods'], - 'argumentCount' => '3', - ], - 'PEARSON' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'CORREL'], - 'argumentCount' => '2', - ], - 'PERCENTILE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'PERCENTILE'], - 'argumentCount' => '2', - ], - 'PERCENTILE.EXC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'PERCENTILE.INC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'PERCENTILE'], - 'argumentCount' => '2', - ], - 'PERCENTRANK' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'PERCENTRANK'], - 'argumentCount' => '2,3', - ], - 'PERCENTRANK.EXC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2,3', - ], - 'PERCENTRANK.INC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'PERCENTRANK'], - 'argumentCount' => '2,3', - ], - 'PERMUT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Permutations::class, 'PERMUT'], - 'argumentCount' => '2', - ], - 'PERMUTATIONA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Permutations::class, 'PERMUTATIONA'], - 'argumentCount' => '2', - ], - 'PHONETIC' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'PHI' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1', - ], - 'PI' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'pi', - 'argumentCount' => '0', - ], - 'PMT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Payments::class, 'annuity'], - 'argumentCount' => '3-5', - ], - 'POISSON' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Poisson::class, 'distribution'], - 'argumentCount' => '3', - ], - 'POISSON.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Poisson::class, 'distribution'], - 'argumentCount' => '3', - ], - 'POWER' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Operations::class, 'power'], - 'argumentCount' => '2', - ], - 'PPMT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Payments::class, 'interestPayment'], - 'argumentCount' => '4-6', - ], - 'PRICE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Price::class, 'price'], - 'argumentCount' => '6,7', - ], - 'PRICEDISC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Price::class, 'priceDiscounted'], - 'argumentCount' => '4,5', - ], - 'PRICEMAT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Price::class, 'priceAtMaturity'], - 'argumentCount' => '5,6', - ], - 'PROB' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3,4', - ], - 'PRODUCT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Operations::class, 'product'], - 'argumentCount' => '1+', - ], - 'PROPER' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CaseConvert::class, 'proper'], - 'argumentCount' => '1', - ], - 'PV' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'presentValue'], - 'argumentCount' => '3-5', - ], - 'QUARTILE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'QUARTILE'], - 'argumentCount' => '2', - ], - 'QUARTILE.EXC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'QUARTILE.INC' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'QUARTILE'], - 'argumentCount' => '2', - ], - 'QUOTIENT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Operations::class, 'quotient'], - 'argumentCount' => '2', - ], - 'RADIANS' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Angle::class, 'toRadians'], - 'argumentCount' => '1', - ], - 'RAND' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Random::class, 'rand'], - 'argumentCount' => '0', - ], - 'RANDARRAY' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Random::class, 'randArray'], - 'argumentCount' => '0-5', - ], - 'RANDBETWEEN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Random::class, 'randBetween'], - 'argumentCount' => '2', - ], - 'RANK' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'RANK'], - 'argumentCount' => '2,3', - ], - 'RANK.AVG' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2,3', - ], - 'RANK.EQ' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Percentiles::class, 'RANK'], - 'argumentCount' => '2,3', - ], - 'RATE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'rate'], - 'argumentCount' => '3-6', - ], - 'RECEIVED' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Price::class, 'received'], - 'argumentCount' => '4-5', - ], - 'REPLACE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Replace::class, 'replace'], - 'argumentCount' => '4', - ], - 'REPLACEB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Replace::class, 'replace'], - 'argumentCount' => '4', - ], - 'REPT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Concatenate::class, 'builtinREPT'], - 'argumentCount' => '2', - ], - 'RIGHT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'right'], - 'argumentCount' => '1,2', - ], - 'RIGHTB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Extract::class, 'right'], - 'argumentCount' => '1,2', - ], - 'ROMAN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Roman::class, 'evaluate'], - 'argumentCount' => '1,2', - ], - 'ROUND' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'round'], - 'argumentCount' => '2', - ], - 'ROUNDBAHTDOWN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'ROUNDBAHTUP' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'ROUNDDOWN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'down'], - 'argumentCount' => '2', - ], - 'ROUNDUP' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Round::class, 'up'], - 'argumentCount' => '2', - ], - 'ROW' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\RowColumnInformation::class, 'ROW'], - 'argumentCount' => '-1', - 'passCellReference' => true, - 'passByReference' => [true], - ], - 'ROWS' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\RowColumnInformation::class, 'ROWS'], - 'argumentCount' => '1', - ], - 'RRI' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Single::class, 'interestRate'], - 'argumentCount' => '3', - ], - 'RSQ' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'RSQ'], - 'argumentCount' => '2', - ], - 'RTD' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1+', - ], - 'SEARCH' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Search::class, 'insensitive'], - 'argumentCount' => '2,3', - ], - 'SEARCHB' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Search::class, 'insensitive'], - 'argumentCount' => '2,3', - ], - 'SEC' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Secant::class, 'sec'], - 'argumentCount' => '1', - ], - 'SECH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Secant::class, 'sech'], - 'argumentCount' => '1', - ], - 'SECOND' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\TimeParts::class, 'second'], - 'argumentCount' => '1', - ], - 'SEQUENCE' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\MatrixFunctions::class, 'sequence'], - 'argumentCount' => '1-4', - ], - 'SERIESSUM' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\SeriesSum::class, 'evaluate'], - 'argumentCount' => '4', - ], - 'SHEET' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '0,1', - ], - 'SHEETS' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '0,1', - ], - 'SIGN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sign::class, 'evaluate'], - 'argumentCount' => '1', - ], - 'SIN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Sine::class, 'sin'], - 'argumentCount' => '1', - ], - 'SINH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Sine::class, 'sinh'], - 'argumentCount' => '1', - ], - 'SKEW' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Deviations::class, 'skew'], - 'argumentCount' => '1+', - ], - 'SKEW.P' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '1+', - ], - 'SLN' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Depreciation::class, 'SLN'], - 'argumentCount' => '3', - ], - 'SLOPE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'SLOPE'], - 'argumentCount' => '2', - ], - 'SMALL' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Size::class, 'small'], - 'argumentCount' => '2', - ], - 'SORT' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Sort::class, 'sort'], - 'argumentCount' => '1-4', - ], - 'SORTBY' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Sort::class, 'sortBy'], - 'argumentCount' => '2+', - ], - 'SQRT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sqrt::class, 'sqrt'], - 'argumentCount' => '1', - ], - 'SQRTPI' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sqrt::class, 'pi'], - 'argumentCount' => '1', - ], - 'STANDARDIZE' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Standardize::class, 'execute'], - 'argumentCount' => '3', - ], - 'STDEV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEV'], - 'argumentCount' => '1+', - ], - 'STDEV.S' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEV'], - 'argumentCount' => '1+', - ], - 'STDEV.P' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVP'], - 'argumentCount' => '1+', - ], - 'STDEVA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVA'], - 'argumentCount' => '1+', - ], - 'STDEVP' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVP'], - 'argumentCount' => '1+', - ], - 'STDEVPA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVPA'], - 'argumentCount' => '1+', - ], - 'STEYX' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'STEYX'], - 'argumentCount' => '2', - ], - 'SUBSTITUTE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Replace::class, 'substitute'], - 'argumentCount' => '3,4', - ], - 'SUBTOTAL' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Subtotal::class, 'evaluate'], - 'argumentCount' => '2+', - 'passCellReference' => true, - ], - 'SUM' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sum::class, 'sumErroringStrings'], - 'argumentCount' => '1+', - ], - 'SUMIF' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Statistical\Conditional::class, 'SUMIF'], - 'argumentCount' => '2,3', - ], - 'SUMIFS' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [Statistical\Conditional::class, 'SUMIFS'], - 'argumentCount' => '3+', - ], - 'SUMPRODUCT' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sum::class, 'product'], - 'argumentCount' => '1+', - ], - 'SUMSQ' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\SumSquares::class, 'sumSquare'], - 'argumentCount' => '1+', - ], - 'SUMX2MY2' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\SumSquares::class, 'sumXSquaredMinusYSquared'], - 'argumentCount' => '2', - ], - 'SUMX2PY2' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\SumSquares::class, 'sumXSquaredPlusYSquared'], - 'argumentCount' => '2', - ], - 'SUMXMY2' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\SumSquares::class, 'sumXMinusYSquared'], - 'argumentCount' => '2', - ], - 'SWITCH' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Conditional::class, 'statementSwitch'], - 'argumentCount' => '3+', - ], - 'SYD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Depreciation::class, 'SYD'], - 'argumentCount' => '4', - ], - 'T' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Text::class, 'test'], - 'argumentCount' => '1', - ], - 'TAN' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Tangent::class, 'tan'], - 'argumentCount' => '1', - ], - 'TANH' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trig\Tangent::class, 'tanh'], - 'argumentCount' => '1', - ], - 'TBILLEQ' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\TreasuryBill::class, 'bondEquivalentYield'], - 'argumentCount' => '3', - ], - 'TBILLPRICE' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\TreasuryBill::class, 'price'], - 'argumentCount' => '3', - ], - 'TBILLYIELD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\TreasuryBill::class, 'yield'], - 'argumentCount' => '3', - ], - 'TDIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StudentT::class, 'distribution'], - 'argumentCount' => '3', - ], - 'T.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3', - ], - 'T.DIST.2T' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'T.DIST.RT' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'TEXT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Format::class, 'TEXTFORMAT'], - 'argumentCount' => '2', - ], - 'TEXTJOIN' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Concatenate::class, 'TEXTJOIN'], - 'argumentCount' => '3+', - ], - 'THAIDAYOFWEEK' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAIDIGIT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAIMONTHOFYEAR' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAINUMSOUND' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAINUMSTRING' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAISTRINGLENGTH' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'THAIYEAR' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'TIME' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Time::class, 'fromHMS'], - 'argumentCount' => '3', - ], - 'TIMEVALUE' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\TimeValue::class, 'fromString'], - 'argumentCount' => '1', - ], - 'TINV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StudentT::class, 'inverse'], - 'argumentCount' => '2', - ], - 'T.INV' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StudentT::class, 'inverse'], - 'argumentCount' => '2', - ], - 'T.INV.2T' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2', - ], - 'TODAY' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Current::class, 'today'], - 'argumentCount' => '0', - ], - 'TRANSPOSE' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Matrix::class, 'transpose'], - 'argumentCount' => '1', - ], - 'TREND' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Trends::class, 'TREND'], - 'argumentCount' => '1-4', - ], - 'TRIM' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Trim::class, 'spaces'], - 'argumentCount' => '1', - ], - 'TRIMMEAN' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Averages\Mean::class, 'trim'], - 'argumentCount' => '2', - ], - 'TRUE' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Boolean::class, 'TRUE'], - 'argumentCount' => '0', - ], - 'TRUNC' => [ - 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Trunc::class, 'evaluate'], - 'argumentCount' => '1,2', - ], - 'TTEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '4', - ], - 'T.TEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '4', - ], - 'TYPE' => [ - 'category' => Category::CATEGORY_INFORMATION, - 'functionCall' => [Information\Value::class, 'type'], - 'argumentCount' => '1', - ], - 'UNICHAR' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CharacterConvert::class, 'character'], - 'argumentCount' => '1', - ], - 'UNICODE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CharacterConvert::class, 'code'], - 'argumentCount' => '1', - ], - 'UNIQUE' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\Unique::class, 'unique'], - 'argumentCount' => '1+', - ], - 'UPPER' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\CaseConvert::class, 'upper'], - 'argumentCount' => '1', - ], - 'USDOLLAR' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Dollar::class, 'format'], - 'argumentCount' => '2', - ], - 'VALUE' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [TextData\Format::class, 'VALUE'], - 'argumentCount' => '1', - ], - 'VALUETOTEXT' => [ - 'category' => Category::CATEGORY_TEXT_AND_DATA, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '?', - ], - 'VAR' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VAR'], - 'argumentCount' => '1+', - ], - 'VAR.P' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VARP'], - 'argumentCount' => '1+', - ], - 'VAR.S' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VAR'], - 'argumentCount' => '1+', - ], - 'VARA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VARA'], - 'argumentCount' => '1+', - ], - 'VARP' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VARP'], - 'argumentCount' => '1+', - ], - 'VARPA' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Variances::class, 'VARPA'], - 'argumentCount' => '1+', - ], - 'VDB' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '5-7', - ], - 'VLOOKUP' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [LookupRef\VLookup::class, 'lookup'], - 'argumentCount' => '3,4', - ], - 'WEBSERVICE' => [ - 'category' => Category::CATEGORY_WEB, - 'functionCall' => [Web\Service::class, 'webService'], - 'argumentCount' => '1', - ], - 'WEEKDAY' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Week::class, 'day'], - 'argumentCount' => '1,2', - ], - 'WEEKNUM' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\Week::class, 'number'], - 'argumentCount' => '1,2', - ], - 'WEIBULL' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Weibull::class, 'distribution'], - 'argumentCount' => '4', - ], - 'WEIBULL.DIST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\Weibull::class, 'distribution'], - 'argumentCount' => '4', - ], - 'WORKDAY' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\WorkDay::class, 'date'], - 'argumentCount' => '2-3', - ], - 'WORKDAY.INTL' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2-4', - ], - 'XIRR' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Variable\NonPeriodic::class, 'rate'], - 'argumentCount' => '2,3', - ], - 'XLOOKUP' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '3-6', - ], - 'XNPV' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\CashFlow\Variable\NonPeriodic::class, 'presentValue'], - 'argumentCount' => '3', - ], - 'XMATCH' => [ - 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '2,3', - ], - 'XOR' => [ - 'category' => Category::CATEGORY_LOGICAL, - 'functionCall' => [Logical\Operations::class, 'logicalXor'], - 'argumentCount' => '1+', - ], - 'YEAR' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\DateParts::class, 'year'], - 'argumentCount' => '1', - ], - 'YEARFRAC' => [ - 'category' => Category::CATEGORY_DATE_AND_TIME, - 'functionCall' => [DateTimeExcel\YearFrac::class, 'fraction'], - 'argumentCount' => '2,3', - ], - 'YIELD' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Functions::class, 'DUMMY'], - 'argumentCount' => '6,7', - ], - 'YIELDDISC' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Yields::class, 'yieldDiscounted'], - 'argumentCount' => '4,5', - ], - 'YIELDMAT' => [ - 'category' => Category::CATEGORY_FINANCIAL, - 'functionCall' => [Financial\Securities\Yields::class, 'yieldAtMaturity'], - 'argumentCount' => '5,6', - ], - 'ZTEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'zTest'], - 'argumentCount' => '2-3', - ], - 'Z.TEST' => [ - 'category' => Category::CATEGORY_STATISTICAL, - 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'zTest'], - 'argumentCount' => '2-3', - ], - ]; + /** + * PhpSpreadsheet functions. + * + * @var ExcelFunctions + */ + private static $phpSpreadsheetFunctions; // Internal functions used for special control purposes private static $controlFunctions = [ @@ -2762,6 +256,7 @@ class Calculation public function __construct(?Spreadsheet $spreadsheet = null) { $this->spreadsheet = $spreadsheet; + self::$phpSpreadsheetFunctions = new ExcelFunctions(); $this->cyclicReferenceStack = new CyclicReferenceStack(); $this->debugLog = new Logger($this->cyclicReferenceStack); $this->branchPruner = new BranchPruner($this->branchPruningEnabled); @@ -3039,11 +534,13 @@ public function setLocale(string $locale) [$localeFunction] = explode('##', $localeFunction); // Strip out comments if (strpos($localeFunction, '=') !== false) { [$fName, $lfName] = array_map('trim', explode('=', $localeFunction)); + if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) { self::$localeFunctions[$fName] = $lfName; } } } + // Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions if (isset(self::$localeFunctions['TRUE'])) { self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE']; @@ -5229,9 +2726,9 @@ public function isImplemented($function) } /** - * Get a list of all implemented functions as an array of function objects. + * Get a list of all Excel functions as a collection of XlFunctionAbstract objects. */ - public function getFunctions(): array + public function getFunctions(): ExcelFunctions { return self::$phpSpreadsheetFunctions; } diff --git a/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php b/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php new file mode 100644 index 0000000000..07daa7f6f0 --- /dev/null +++ b/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php @@ -0,0 +1,674 @@ + + * @implements Iterator + */ +class ExcelFunctions implements ArrayAccess, Iterator +{ + /** + * @var int + */ + private $index; + + /** + * @var array + */ + private static $excelFunctions = [ + 'ABS' => true, + 'ACCRINT' => true, + 'ACCRINTM' => true, + 'ACOS' => true, + 'ACOSH' => true, + 'ACOT' => true, + 'ACOTH' => true, + 'ADDRESS' => true, + 'AGGREGATE' => true, + 'AMORDEGRC' => true, + 'AMORLINC' => true, + 'AND' => true, + 'ARABIC' => true, + 'AREAS' => true, + 'ARRAYTOTEXT' => true, + 'ASC' => true, + 'ASIN' => true, + 'ASINH' => true, + 'ATAN' => true, + 'ATAN2' => true, + 'ATANH' => true, + 'AVEDEV' => true, + 'AVERAGE' => true, + 'AVERAGEA' => true, + 'AVERAGEIF' => true, + 'AVERAGEIFS' => true, + 'BAHTTEXT' => true, + 'BASE' => true, + 'BESSELI' => true, + 'BESSELJ' => true, + 'BESSELK' => true, + 'BESSELY' => true, + 'BETADIST' => true, + 'BETA.DIST' => true, + 'BETAINV' => true, + 'BETA.INV' => true, + 'BIN2DEC' => true, + 'BIN2HEX' => true, + 'BIN2OCT' => true, + 'BINOMDIST' => true, + 'BINOM.DIST' => true, + 'BINOM.DIST.RANGE' => true, + 'BINOM.INV' => true, + 'BITAND' => true, + 'BITOR' => true, + 'BITXOR' => true, + 'BITLSHIFT' => true, + 'BITRSHIFT' => true, + 'CEILING' => true, + 'CEILING.MATH' => true, + 'CEILING.PRECISE' => true, + 'CELL' => true, + 'CHAR' => true, + 'CHIDIST' => true, + 'CHISQ.DIST' => true, + 'CHISQ.DIST.RT' => true, + 'CHIINV' => true, + 'CHISQ.INV' => true, + 'CHISQ.INV.RT' => true, + 'CHITEST' => true, + 'CHISQ.TEST' => true, + 'CHOOSE' => true, + 'CLEAN' => true, + 'CODE' => true, + 'COLUMN' => true, + 'COLUMNS' => true, + 'COMBIN' => true, + 'COMBINA' => true, + 'COMPLEX' => true, + 'CONCAT' => true, + 'CONCATENATE' => true, + 'CONFIDENCE' => true, + 'CONFIDENCE.NORM' => true, + 'CONFIDENCE.T' => true, + 'CONVERT' => true, + 'CORREL' => true, + 'COS' => true, + 'COSH' => true, + 'COT' => true, + 'COTH' => true, + 'COUNT' => true, + 'COUNTA' => true, + 'COUNTBLANK' => true, + 'COUNTIF' => true, + 'COUNTIFS' => true, + 'COUPDAYBS' => true, + 'COUPDAYS' => true, + 'COUPDAYSNC' => true, + 'COUPNCD' => true, + 'COUPNUM' => true, + 'COUPPCD' => true, + 'COVAR' => true, + 'COVARIANCE.P' => true, + 'COVARIANCE.S' => true, + 'CRITBINOM' => true, + 'CSC' => true, + 'CSCH' => true, + 'CUBEKPIMEMBER' => true, + 'CUBEMEMBER' => true, + 'CUBEMEMBERPROPERTY' => true, + 'CUBERANKEDMEMBER' => true, + 'CUBESET' => true, + 'CUBESETCOUNT' => true, + 'CUBEVALUE' => true, + 'CUMIPMT' => true, + 'CUMPRINC' => true, + 'DATE' => true, + 'DATEDIF' => true, + 'DATESTRING' => true, + 'DATEVALUE' => true, + 'DAVERAGE' => true, + 'DAY' => true, + 'DAYS' => true, + 'DAYS360' => true, + 'DB' => true, + 'DBCS' => true, + 'DCOUNT' => true, + 'DCOUNTA' => true, + 'DDB' => true, + 'DEC2BIN' => true, + 'DEC2HEX' => true, + 'DEC2OCT' => true, + 'DECIMAL' => true, + 'DEGREES' => true, + 'DELTA' => true, + 'DEVSQ' => true, + 'DGET' => true, + 'DISC' => true, + 'DMAX' => true, + 'DMIN' => true, + 'DOLLAR' => true, + 'DOLLARDE' => true, + 'DOLLARFR' => true, + 'DPRODUCT' => true, + 'DSTDEV' => true, + 'DSTDEVP' => true, + 'DSUM' => true, + 'DURATION' => true, + 'DVAR' => true, + 'DVARP' => true, + 'ECMA.CEILING' => true, + 'EDATE' => true, + 'EFFECT' => true, + 'ENCODEURL' => true, + 'EOMONTH' => true, + 'ERF' => true, + 'ERF.PRECISE' => true, + 'ERFC' => true, + 'ERFC.PRECISE' => true, + 'ERROR.TYPE' => true, + 'EVEN' => true, + 'EXACT' => true, + 'EXP' => true, + 'EXPONDIST' => true, + 'EXPON.DIST' => true, + 'FACT' => true, + 'FACTDOUBLE' => true, + 'FALSE' => true, + 'FDIST' => true, + 'F.DIST' => true, + 'F.DIST.RT' => true, + 'FILTER' => true, + 'FILTERXML' => true, + 'FIND' => true, + 'FINDB' => true, + 'FINV' => true, + 'F.INV' => true, + 'F.INV.RT' => true, + 'FISHER' => true, + 'FISHERINV' => true, + 'FIXED' => true, + 'FLOOR' => true, + 'FLOOR.MATH' => true, + 'FLOOR.PRECISE' => true, + 'FORECAST' => true, + 'FORECAST.ETS' => true, + 'FORECAST.ETS.CONFINT' => true, + 'FORECAST.ETS.SEASONALITY' => true, + 'FORECAST.ETS.STAT' => true, + 'FORECAST.LINEAR' => true, + 'FORMULATEXT' => true, + 'FREQUENCY' => true, + 'FTEST' => true, + 'F.TEST' => true, + 'FV' => true, + 'FVSCHEDULE' => true, + 'GAMMA' => true, + 'GAMMADIST' => true, + 'GAMMA.DIST' => true, + 'GAMMAINV' => true, + 'GAMMA.INV' => true, + 'GAMMALN' => true, + 'GAMMALN.PRECISE' => true, + 'GAUSS' => true, + 'GCD' => true, + 'GEOMEAN' => true, + 'GESTEP' => true, + 'GETPIVOTDATA' => true, + 'GROWTH' => true, + 'HARMEAN' => true, + 'HEX2BIN' => true, + 'HEX2DEC' => true, + 'HEX2OCT' => true, + 'HLOOKUP' => true, + 'HOUR' => true, + 'HYPERLINK' => true, + 'HYPGEOMDIST' => true, + 'HYPGEOM.DIST' => true, + 'IF' => true, + 'IFERROR' => true, + 'IFNA' => true, + 'IFS' => true, + 'IMABS' => true, + 'IMAGINARY' => true, + 'IMARGUMENT' => true, + 'IMCONJUGATE' => true, + 'IMCOS' => true, + 'IMCOSH' => true, + 'IMCOT' => true, + 'IMCSC' => true, + 'IMCSCH' => true, + 'IMDIV' => true, + 'IMEXP' => true, + 'IMLN' => true, + 'IMLOG10' => true, + 'IMLOG2' => true, + 'IMPOWER' => true, + 'IMPRODUCT' => true, + 'IMREAL' => true, + 'IMSEC' => true, + 'IMSECH' => true, + 'IMSIN' => true, + 'IMSINH' => true, + 'IMSQRT' => true, + 'IMSUB' => true, + 'IMSUM' => true, + 'IMTAN' => true, + 'INDEX' => true, + 'INDIRECT' => true, + 'INFO' => true, + 'INT' => true, + 'INTERCEPT' => true, + 'INTRATE' => true, + 'IPMT' => true, + 'IRR' => true, + 'ISBLANK' => true, + 'ISERR' => true, + 'ISERROR' => true, + 'ISEVEN' => true, + 'ISFORMULA' => true, + 'ISLOGICAL' => true, + 'ISNA' => true, + 'ISNONTEXT' => true, + 'ISNUMBER' => true, + 'ISO.CEILING' => true, + 'ISODD' => true, + 'ISOWEEKNUM' => true, + 'ISPMT' => true, + 'ISREF' => true, + 'ISTEXT' => true, + 'ISTHAIDIGIT' => true, + 'JIS' => true, + 'KURT' => true, + 'LARGE' => true, + 'LCM' => true, + 'LEFT' => true, + 'LEFTB' => true, + 'LEN' => true, + 'LENB' => true, + 'LINEST' => true, + 'LN' => true, + 'LOG' => true, + 'LOG10' => true, + 'LOGEST' => true, + 'LOGINV' => true, + 'LOGNORMDIST' => true, + 'LOGNORM.DIST' => true, + 'LOGNORM.INV' => true, + 'LOOKUP' => true, + 'LOWER' => true, + 'MATCH' => true, + 'MAX' => true, + 'MAXA' => true, + 'MAXIFS' => true, + 'MDETERM' => true, + 'MDURATION' => true, + 'MEDIAN' => true, + 'MEDIANIF' => true, + 'MID' => true, + 'MIDB' => true, + 'MIN' => true, + 'MINA' => true, + 'MINIFS' => true, + 'MINUTE' => true, + 'MINVERSE' => true, + 'MIRR' => true, + 'MMULT' => true, + 'MOD' => true, + 'MODE' => true, + 'MODE.MULT' => true, + 'MODE.SNGL' => true, + 'MONTH' => true, + 'MROUND' => true, + 'MULTINOMIAL' => true, + 'MUNIT' => true, + 'N' => true, + 'NA' => true, + 'NEGBINOMDIST' => true, + 'NEGBINOM.DIST' => true, + 'NETWORKDAYS' => true, + 'NETWORKDAYS.INTL' => true, + 'NOMINAL' => true, + 'NORMDIST' => true, + 'NORM.DIST' => true, + 'NORMINV' => true, + 'NORM.INV' => true, + 'NORMSDIST' => true, + 'NORM.S.DIST' => true, + 'NORMSINV' => true, + 'NORM.S.INV' => true, + 'NOT' => true, + 'NOW' => true, + 'NPER' => true, + 'NPV' => true, + 'NUMBERSTRING' => true, + 'NUMBERVALUE' => true, + 'OCT2BIN' => true, + 'OCT2DEC' => true, + 'OCT2HEX' => true, + 'ODD' => true, + 'ODDFPRICE' => true, + 'ODDFYIELD' => true, + 'ODDLPRICE' => true, + 'ODDLYIELD' => true, + 'OFFSET' => true, + 'OR' => true, + 'PDURATION' => true, + 'PEARSON' => true, + 'PERCENTILE' => true, + 'PERCENTILE.EXC' => true, + 'PERCENTILE.INC' => true, + 'PERCENTRANK' => true, + 'PERCENTRANK.EXC' => true, + 'PERCENTRANK.INC' => true, + 'PERMUT' => true, + 'PERMUTATIONA' => true, + 'PHONETIC' => true, + 'PHI' => true, + 'PI' => true, + 'PMT' => true, + 'POISSON' => true, + 'POISSON.DIST' => true, + 'POWER' => true, + 'PPMT' => true, + 'PRICE' => true, + 'PRICEDISC' => true, + 'PRICEMAT' => true, + 'PROB' => true, + 'PRODUCT' => true, + 'PROPER' => true, + 'PV' => true, + 'QUARTILE' => true, + 'QUARTILE.EXC' => true, + 'QUARTILE.INC' => true, + 'QUOTIENT' => true, + 'RADIANS' => true, + 'RAND' => true, + 'RANDARRAY' => true, + 'RANDBETWEEN' => true, + 'RANK' => true, + 'RANK.AVG' => true, + 'RANK.EQ' => true, + 'RATE' => true, + 'RECEIVED' => true, + 'REPLACE' => true, + 'REPLACEB' => true, + 'REPT' => true, + 'RIGHT' => true, + 'RIGHTB' => true, + 'ROMAN' => true, + 'ROUND' => true, + 'ROUNDBAHTDOWN' => true, + 'ROUNDBAHTUP' => true, + 'ROUNDDOWN' => true, + 'ROUNDUP' => true, + 'ROW' => true, + 'ROWS' => true, + 'RRI' => true, + 'RSQ' => true, + 'RTD' => true, + 'SEARCH' => true, + 'SEARCHB' => true, + 'SEC' => true, + 'SECH' => true, + 'SECOND' => true, + 'SEQUENCE' => true, + 'SERIESSUM' => true, + 'SHEET' => true, + 'SHEETS' => true, + 'SIGN' => true, + 'SIN' => true, + 'SINH' => true, + 'SKEW' => true, + 'SKEW.P' => true, + 'SLN' => true, + 'SLOPE' => true, + 'SMALL' => true, + 'SORT' => true, + 'SORTBY' => true, + 'SQRT' => true, + 'SQRTPI' => true, + 'STANDARDIZE' => true, + 'STDEV' => true, + 'STDEV.S' => true, + 'STDEV.P' => true, + 'STDEVA' => true, + 'STDEVP' => true, + 'STDEVPA' => true, + 'STEYX' => true, + 'SUBSTITUTE' => true, + 'SUBTOTAL' => true, + 'SUM' => true, + 'SUMIF' => true, + 'SUMIFS' => true, + 'SUMPRODUCT' => true, + 'SUMSQ' => true, + 'SUMX2MY2' => true, + 'SUMX2PY2' => true, + 'SUMXMY2' => true, + 'SWITCH' => true, + 'SYD' => true, + 'T' => true, + 'TAN' => true, + 'TANH' => true, + 'TBILLEQ' => true, + 'TBILLPRICE' => true, + 'TBILLYIELD' => true, + 'TDIST' => true, + 'T.DIST' => true, + 'T.DIST.2T' => true, + 'T.DIST.RT' => true, + 'TEXT' => true, + 'TEXTJOIN' => true, + 'THAIDAYOFWEEK' => true, + 'THAIDIGIT' => true, + 'THAIMONTHOFYEAR' => true, + 'THAINUMSOUND' => true, + 'THAINUMSTRING' => true, + 'THAISTRINGLENGTH' => true, + 'THAIYEAR' => true, + 'TIME' => true, + 'TIMEVALUE' => true, + 'TINV' => true, + 'T.INV' => true, + 'T.INV.2T' => true, + 'TODAY' => true, + 'TRANSPOSE' => true, + 'TREND' => true, + 'TRIM' => true, + 'TRIMMEAN' => true, + 'TRUE' => true, + 'TRUNC' => true, + 'TTEST' => true, + 'T.TEST' => true, + 'TYPE' => true, + 'UNICHAR' => true, + 'UNICODE' => true, + 'UNIQUE' => true, + 'UPPER' => true, + 'USDOLLAR' => true, + 'VALUE' => true, + 'VALUETOTEXT' => true, + 'VAR' => true, + 'VAR.P' => true, + 'VAR.S' => true, + 'VARA' => true, + 'VARP' => true, + 'VARPA' => true, + 'VDB' => true, + 'VLOOKUP' => true, + 'WEBSERVICE' => true, + 'WEEKDAY' => true, + 'WEEKNUM' => true, + 'WEIBULL' => true, + 'WEIBULL.DIST' => true, + 'WORKDAY' => true, + 'WORKDAY.INTL' => true, + 'XIRR' => true, + 'XLOOKUP' => true, + 'XNPV' => true, + 'XMATCH' => true, + 'XOR' => true, + 'YEAR' => true, + 'YEARFRAC' => true, + 'YIELD' => true, + 'YIELDDISC' => true, + 'YIELDMAT' => true, + 'ZTEST' => true, + 'Z.TEST' => true, + ]; + + /** + * @var bool + */ + private $loading = false; + + public function isRecognisedExcelFunction(string $functionName): bool + { + return isset(self::$excelFunctions[$functionName]); + } + + private function loadFunctionDefinition(string $className): XlFunctionAbstract + { + $this->loading = true; + /** @var XlFunctionAbstract $definition */ + $definition = new $className(); + $excelFunctionName = $definition->name; + self::$excelFunctions[$excelFunctionName] = $definition; + + if (isset($definition->synonyms)) { + /** @var string $synonym */ + foreach ($definition->synonyms as $synonym) { + self::$excelFunctions[$synonym] = $definition; + } + } + $this->loading = false; + + return $definition; + } + + private function buildClassName(string $functionName): string + { + $classPath = 'PhpOffice\\PhpSpreadsheet\\Calculation\\Engine\\Functions\\Xl'; + + return $classPath . ucfirst(strtolower(str_replace('.', '_', $functionName))); + } + + private function functionDefinitionFactory(string $functionName): ?XlFunctionAbstract + { + if (isset(self::$excelFunctions[$functionName]) && self::$excelFunctions[$functionName] === true) { + $functionDefinition = $this->loadFunctionDefinition($this->buildClassName($functionName)); + + return $functionDefinition; + } + + return null; + } + + /** + * @param string $functionName + */ + public function offsetExists($functionName): bool + { + $functionName = strtoupper($functionName); + + return isset(self::$excelFunctions[$functionName]); + } + + /** + * @param string $functionName + */ + public function offsetGet($functionName): ?XlFunctionAbstract + { + $functionName = strtoupper($functionName); + + return (isset(self::$excelFunctions[$functionName]) && self::$excelFunctions[$functionName] instanceof XlFunctionAbstract) + ? self::$excelFunctions[$functionName] + : $this->functionDefinitionFactory($functionName); + } + + /** + * @param string $functionName + * @param mixed $value + */ + public function offsetSet($functionName, $value): void + { + throw new Exception('Action not permitted'); + } + + /** + * @param string $functionName + */ + public function offsetUnset($functionName): void + { + throw new Exception('Action not permitted'); + } + + public function __isset(string $functionName): bool + { + $functionName = strtoupper($functionName); + + return isset(self::$excelFunctions[$functionName]); + } + + public function __get(string $functionName): ?XlFunctionAbstract + { + $functionName = strtoupper($functionName); + + return (isset(self::$excelFunctions[$functionName]) && self::$excelFunctions[$functionName] instanceof XlFunctionAbstract) + ? self::$excelFunctions[$functionName] + : $this->functionDefinitionFactory($functionName); + } + + /** + * @param mixed $value + */ + public function __set(string $functionName, $value): void + { + $functionName = strtoupper($functionName); + if ($this->loading === false) { + throw new Exception('Action not permitted'); + } + + self::$excelFunctions[$functionName] = $value; + } + + public function __unset(string $functionName): void + { + throw new Exception('Action not permitted'); + } + + public function current(): ?XlFunctionAbstract + { + $functionName = array_keys(self::$excelFunctions)[$this->index]; + if (isset(self::$excelFunctions[$functionName]) && self::$excelFunctions[$functionName] instanceof XlFunctionAbstract) { + return self::$excelFunctions[$functionName]; + } + + return $this->functionDefinitionFactory($functionName); + } + + public function next(): void + { + ++$this->index; + } + + public function key(): string + { + return array_keys(self::$excelFunctions)[$this->index]; + } + + public function valid(): bool + { + return $this->index < count(self::$excelFunctions); + } + + public function rewind(): void + { + $this->index = 0; + } +} diff --git a/src/PhpSpreadsheet/Calculation/Engine/Functions/XlAbs.php b/src/PhpSpreadsheet/Calculation/Engine/Functions/XlAbs.php new file mode 100644 index 0000000000..86e7e69fa0 --- /dev/null +++ b/src/PhpSpreadsheet/Calculation/Engine/Functions/XlAbs.php @@ -0,0 +1,33 @@ + + */ +class XlFunctionAbstract implements ArrayAccess +{ + /** + * @param mixed $offset + */ + public function offsetExists($offset): bool + { + return property_exists($this, $offset); + } + + /** + * @param mixed $offset + * + * @return null|mixed + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return (property_exists($this, $offset)) ? $this->$offset : null; + } + + /** + * @param string $offset + * @param mixed $value + */ + public function offsetSet($offset, $value): void + { + throw new Exception('Action not permitted'); + } + + /** + * @param mixed $offset + */ + public function offsetUnset($offset): void + { + throw new Exception('Action not permitted'); + } + + public function __isset(string $name): bool + { + return property_exists($this, $name); + } + + /** + * @return null|mixed + */ + public function __get(string $name) + { + return (property_exists($this, $name)) ? $this->{$name} : null; + } + + /** + * @param mixed $value + */ + public function __set(string $name, $value): void + { + throw new Exception('Action not permitted'); + } + + public function __unset(string $name): void + { + throw new Exception('Action not permitted'); + } +} diff --git a/src/PhpSpreadsheet/Calculation/Engine/XlPassByReference.php b/src/PhpSpreadsheet/Calculation/Engine/XlPassByReference.php new file mode 100644 index 0000000000..b54f8be33c --- /dev/null +++ b/src/PhpSpreadsheet/Calculation/Engine/XlPassByReference.php @@ -0,0 +1,14 @@ +setLocale($this->locale); } - /** - * @dataProvider providerGetFunctions - * - * @param string $category - * @param array|string $functionCall - * @param string $argumentCount - */ - public function testGetFunctions(/** @scrutinizer ignore-unused */ $category, $functionCall, /** @scrutinizer ignore-unused */ $argumentCount): void + public function testGetFunctions(): void { - self::assertIsCallable($functionCall); - } + $functionList = Calculation::getInstance()->getFunctions(); - public function providerGetFunctions(): array - { - return Calculation::getInstance()->getFunctions(); + foreach ($functionList as $function) { + if ($function !== null) { + self::assertIsCallable($function->functionCall); + } + } } public function testIsImplemented(): void diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/ExcelFunctionsCollectionTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/ExcelFunctionsCollectionTest.php new file mode 100644 index 0000000000..a1dd438035 --- /dev/null +++ b/tests/PhpSpreadsheetTests/Calculation/Engine/ExcelFunctionsCollectionTest.php @@ -0,0 +1,72 @@ +isRecognisedExcelFunction('AAA')); + self::assertTrue($excelFunctionCollection->isRecognisedExcelFunction('ABS')); + } + + public function testFunctionDefinitionLoadsAsArrayElement(): void + { + $excelFunctionCollection = new ExcelFunctions(); + $excelFunctionDefinition = $excelFunctionCollection['ABS']; + + self::assertInstanceOf(XlFunctionAbstract::class, $excelFunctionDefinition); + } + + public function testReadOnlyArrayAccess(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $excelFunctionCollection = new ExcelFunctions(); + $excelFunctionCollection['ABS']; // @phpstan-ignore-line + $excelFunctionCollection['ABS'] = 'NO LONGER ABS'; + } + + public function testUnsetBlockedAsArray(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $excelFunctionCollection = new ExcelFunctions(); + $excelFunctionCollection['ABS']; // @phpstan-ignore-line + unset($excelFunctionCollection['ABS']); + } + + public function testFunctionDefinitionLoadsAsObjectProperty(): void + { + $excelFunctionCollection = new ExcelFunctions(); + $excelFunctionDefinition = $excelFunctionCollection->ABS; // @phpstan-ignore-line + self::assertInstanceOf(XlFunctionAbstract::class, $excelFunctionDefinition); + } + + public function testReadOnlyObjectAccess(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $excelFunctionCollection = new ExcelFunctions(); + $excelFunctionCollection->ABS = 'NO LONGER ABS'; // @phpstan-ignore-line + } + + public function testUnsetBlockedAsObjectProperty(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $excelFunctionCollection = new ExcelFunctions(); + unset($excelFunctionCollection->ABS); + } +} diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/XlFunctionSignatureTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/XlFunctionSignatureTest.php new file mode 100644 index 0000000000..7cd1bf74b0 --- /dev/null +++ b/tests/PhpSpreadsheetTests/Calculation/Engine/XlFunctionSignatureTest.php @@ -0,0 +1,69 @@ +name)); + self::assertSame('ABS', $functionDefinition->name); + self::assertSame(Category::CATEGORY_MATH_AND_TRIG, $functionDefinition->category); + self::assertIsCallable($functionDefinition->functionCall); + self::assertSame('1', $functionDefinition->argumentCount); + } + + public function testReadOnlyObjectAccess(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $functionDefinition = new XlAbs(); + $functionDefinition->name = 'NO LONGER ABS'; + } + + public function testUnsetBlockedAsObject(): void + { + self::expectException(Exception::class); + self::expectExceptionMessage('Action not permitted'); + + $functionDefinition = new XlAbs(); + unset($functionDefinition->name); + } +} diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php new file mode 100644 index 0000000000..fa471e95ab --- /dev/null +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php @@ -0,0 +1,13 @@ +getSheet(); + $sheet->getCell('A1')->setValue('=PI()'); + self::assertEquals(M_PI, $sheet->getCell('A1')->getCalculatedValue()); + } +} diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php index f93211022f..5bde03690e 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php @@ -78,7 +78,10 @@ public function testBooleanConversionsLocaleAware(bool $useStringBinder, ?bool $ Cell::setValueBinder($binder); } - Calculation::getInstance()->setLocale('fr'); + $localeChanged = Calculation::getInstance()->setLocale('fr'); + if ($localeChanged === false) { + self::markTestSkipped('Unable to set locale'); + } $reader = new Csv(); $filename = 'tests/data/Reader/CSV/issue.2232.csv'; From 0c1e0f7b279c44074fb8d261893279b55ab9b472 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Sat, 30 Apr 2022 12:40:42 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Add=20"Not=20yet=20Implemented"=20stubs=20f?= =?UTF-8?q?or=2014=20new=20Excel=20Functions=20-=20TEXTBEFORE=20=E2=80=93?= =?UTF-8?q?=20Returns=20text=20that=E2=80=99s=20before=20delimiting=20char?= =?UTF-8?q?acters=20-=20TEXTAFTER=20=E2=80=93=20Returns=20text=20that?= =?UTF-8?q?=E2=80=99s=20after=20delimiting=20character=20-=20TEXTSPLIT=20?= =?UTF-8?q?=E2=80=93=20Splits=20text=20into=20rows=20or=20columns=20using?= =?UTF-8?q?=20delimiters=20-=20VSTACK=20=E2=80=93=20Stacks=20arrays=20vert?= =?UTF-8?q?ically=20-=20HSTACK=20=E2=80=93=20Stacks=20arrays=20horizontall?= =?UTF-8?q?y=20-=20TOROW=20=E2=80=93=20Returns=20the=20array=20as=20one=20?= =?UTF-8?q?row=20-=20TOCOL=20=E2=80=93=20Returns=20the=20array=20as=20one?= =?UTF-8?q?=20column=20-=20WRAPROWS=20=E2=80=93=20Wraps=20a=20row=20array?= =?UTF-8?q?=20into=20a=202D=20array=20-=20WRAPCOLS=20=E2=80=93=20Wraps=20a?= =?UTF-8?q?=20column=20array=20into=20a=202D=20array=20-=20TAKE=20?= =?UTF-8?q?=E2=80=93=20Returns=20rows=20or=20columns=20from=20array=20star?= =?UTF-8?q?t=20or=20end=20-=20DROP=20=E2=80=93=20Drops=20rows=20or=20colum?= =?UTF-8?q?ns=20from=20array=20start=20or=20end=20-=20CHOOSEROWS=20?= =?UTF-8?q?=E2=80=93=20Returns=20the=20specified=20rows=20from=20an=20arra?= =?UTF-8?q?y=20-=20CHOOSECOLS=20=E2=80=93=20Returns=20the=20specified=20co?= =?UTF-8?q?lumns=20from=20an=20array=20-=20EXPAND=20=E2=80=93=20Expands=20?= =?UTF-8?q?an=20array=20to=20the=20specified=20dimensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Calculation/Engine/ExcelFunctions.php | 14 +++++++++ .../Engine/Functions/XlChoosecols.php | 30 +++++++++++++++++++ .../Engine/Functions/XlChooserows.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlDrop.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlExpand.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlHstack.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlTake.php | 30 +++++++++++++++++++ .../Engine/Functions/XlTextafter.php | 30 +++++++++++++++++++ .../Engine/Functions/XlTextbefore.php | 30 +++++++++++++++++++ .../Engine/Functions/XlTextsplit.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlTocol.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlTorow.php | 30 +++++++++++++++++++ .../Calculation/Engine/Functions/XlVstack.php | 30 +++++++++++++++++++ .../Engine/Functions/XlWrapcols.php | 30 +++++++++++++++++++ .../Engine/Functions/XlWraprows.php | 30 +++++++++++++++++++ 15 files changed, 434 insertions(+) create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChoosecols.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlChooserows.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlDrop.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlExpand.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlHstack.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTake.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTextafter.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTextbefore.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTextsplit.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTocol.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlTorow.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlVstack.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWrapcols.php create mode 100644 src/PhpSpreadsheet/Calculation/Engine/Functions/XlWraprows.php diff --git a/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php b/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php index 07daa7f6f0..c6d242463e 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php +++ b/src/PhpSpreadsheet/Calculation/Engine/ExcelFunctions.php @@ -83,6 +83,8 @@ class ExcelFunctions implements ArrayAccess, Iterator 'CHITEST' => true, 'CHISQ.TEST' => true, 'CHOOSE' => true, + 'CHOOSECOLS' => true, + 'CHOOSEROWS' => true, 'CLEAN' => true, 'CODE' => true, 'COLUMN' => true, @@ -155,6 +157,7 @@ class ExcelFunctions implements ArrayAccess, Iterator 'DOLLARDE' => true, 'DOLLARFR' => true, 'DPRODUCT' => true, + 'DROP' => true, 'DSTDEV' => true, 'DSTDEVP' => true, 'DSUM' => true, @@ -174,6 +177,7 @@ class ExcelFunctions implements ArrayAccess, Iterator 'EVEN' => true, 'EXACT' => true, 'EXP' => true, + 'EXPAND' => true, 'EXPONDIST' => true, 'EXPON.DIST' => true, 'FACT' => true, @@ -226,6 +230,7 @@ class ExcelFunctions implements ArrayAccess, Iterator 'HEX2OCT' => true, 'HLOOKUP' => true, 'HOUR' => true, + 'HSTACK' => true, 'HYPERLINK' => true, 'HYPGEOMDIST' => true, 'HYPGEOM.DIST' => true, @@ -455,6 +460,7 @@ class ExcelFunctions implements ArrayAccess, Iterator 'T' => true, 'TAN' => true, 'TANH' => true, + 'TAKE' => true, 'TBILLEQ' => true, 'TBILLPRICE' => true, 'TBILLYIELD' => true, @@ -463,7 +469,10 @@ class ExcelFunctions implements ArrayAccess, Iterator 'T.DIST.2T' => true, 'T.DIST.RT' => true, 'TEXT' => true, + 'TEXTAFTER' => true, + 'TEXTBEFORE' => true, 'TEXTJOIN' => true, + 'TEXTSPLIT' => true, 'THAIDAYOFWEEK' => true, 'THAIDIGIT' => true, 'THAIMONTHOFYEAR' => true, @@ -476,6 +485,8 @@ class ExcelFunctions implements ArrayAccess, Iterator 'TINV' => true, 'T.INV' => true, 'T.INV.2T' => true, + 'TOCOL' => true, + 'TOROW' => true, 'TODAY' => true, 'TRANSPOSE' => true, 'TREND' => true, @@ -501,6 +512,7 @@ class ExcelFunctions implements ArrayAccess, Iterator 'VARPA' => true, 'VDB' => true, 'VLOOKUP' => true, + 'VSTACK' => true, 'WEBSERVICE' => true, 'WEEKDAY' => true, 'WEEKNUM' => true, @@ -508,6 +520,8 @@ class ExcelFunctions implements ArrayAccess, Iterator 'WEIBULL.DIST' => true, 'WORKDAY' => true, 'WORKDAY.INTL' => true, + 'WRAPCOLS' => true, + 'WRAPROWS' => true, 'XIRR' => true, 'XLOOKUP' => true, 'XNPV' => true, diff --git a/src/PhpSpreadsheet/Calculation/Engine/Functions/XlChoosecols.php b/src/PhpSpreadsheet/Calculation/Engine/Functions/XlChoosecols.php new file mode 100644 index 0000000000..3abecc26dc --- /dev/null +++ b/src/PhpSpreadsheet/Calculation/Engine/Functions/XlChoosecols.php @@ -0,0 +1,30 @@ +