-
-1. Only text contents
-2. Only BIFF8 files support Rich Text. Prior to that, comments could only be plain text
-3. Only BIFF8 files support alignment and rotation. Prior to that, comments could only be unformatted text
-4. Xlsx forms and controls can be read and written but not otherwise manipulated
-5. Xlsx macros can be read and written; their values can be retrieved and changed, but only in a binary form which is unlikely to be useful
-6. There is very limited support for reading styles from an Ods spreadsheet. Writing styles has better support, although Number Format is incomplete.
-7. In most cases, Html reader processes only inline styles; styles provided by Css classes may be ignored.
-8. Code must [opt in](../topics/recipes.md#array-formulas) to array output.
-
-## Writers
-
-
+
+1. Only text contents
+2. Only BIFF8 files support Rich Text. Prior to that, comments could only be plain text
+3. Only BIFF8 files support alignment and rotation. Prior to that, comments could only be unformatted text
diff --git a/docs/references/function-list-by-category.md b/docs/references/function-list-by-category.md
index 22c5222ad1..185bf4c06f 100644
--- a/docs/references/function-list-by-category.md
+++ b/docs/references/function-list-by-category.md
@@ -2,595 +2,444 @@
## CATEGORY_CUBE
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-CUBEKPIMEMBER | **Not yet Implemented**
-CUBEMEMBER | **Not yet Implemented**
-CUBEMEMBERPROPERTY | **Not yet Implemented**
-CUBERANKEDMEMBER | **Not yet Implemented**
-CUBESET | **Not yet Implemented**
-CUBESETCOUNT | **Not yet Implemented**
-CUBEVALUE | **Not yet Implemented**
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+CUBEKPIMEMBER | **Not yet Implemented**
+CUBEMEMBER | **Not yet Implemented**
+CUBEMEMBERPROPERTY | **Not yet Implemented**
+CUBERANKEDMEMBER | **Not yet Implemented**
+CUBESET | **Not yet Implemented**
+CUBESETCOUNT | **Not yet Implemented**
+CUBEVALUE | **Not yet Implemented**
## CATEGORY_DATABASE
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-DAVERAGE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DAverage::evaluate
-DCOUNT | \PhpOffice\PhpSpreadsheet\Calculation\Database\DCount::evaluate
-DCOUNTA | \PhpOffice\PhpSpreadsheet\Calculation\Database\DCountA::evaluate
-DGET | \PhpOffice\PhpSpreadsheet\Calculation\Database\DGet::evaluate
-DMAX | \PhpOffice\PhpSpreadsheet\Calculation\Database\DMax::evaluate
-DMIN | \PhpOffice\PhpSpreadsheet\Calculation\Database\DMin::evaluate
-DPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\Database\DProduct::evaluate
-DSTDEV | \PhpOffice\PhpSpreadsheet\Calculation\Database\DStDev::evaluate
-DSTDEVP | \PhpOffice\PhpSpreadsheet\Calculation\Database\DStDevP::evaluate
-DSUM | \PhpOffice\PhpSpreadsheet\Calculation\Database\DSum::evaluate
-DVAR | \PhpOffice\PhpSpreadsheet\Calculation\Database\DVar::evaluate
-DVARP | \PhpOffice\PhpSpreadsheet\Calculation\Database\DVarP::evaluate
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+DAVERAGE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DAVERAGE
+DCOUNT | \PhpOffice\PhpSpreadsheet\Calculation\Database::DCOUNT
+DCOUNTA | \PhpOffice\PhpSpreadsheet\Calculation\Database::DCOUNTA
+DGET | \PhpOffice\PhpSpreadsheet\Calculation\Database::DGET
+DMAX | \PhpOffice\PhpSpreadsheet\Calculation\Database::DMAX
+DMIN | \PhpOffice\PhpSpreadsheet\Calculation\Database::DMIN
+DPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\Database::DPRODUCT
+DSTDEV | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSTDEV
+DSTDEVP | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSTDEVP
+DSUM | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSUM
+DVAR | \PhpOffice\PhpSpreadsheet\Calculation\Database::DVAR
+DVARP | \PhpOffice\PhpSpreadsheet\Calculation\Database::DVARP
## CATEGORY_DATE_AND_TIME
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-DATE | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Date::fromYMD
-DATEDIF | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Difference::interval
-DATESTRING | **Not yet Implemented**
-DATEVALUE | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateValue::fromString
-DAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::day
-DAYS | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Days::between
-DAYS360 | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Days360::between
-EDATE | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Month::adjust
-EOMONTH | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Month::lastDay
-HOUR | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::hour
-ISOWEEKNUM | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::isoWeekNumber
-MINUTE | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::minute
-MONTH | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::month
-NETWORKDAYS | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\NetworkDays::count
-NETWORKDAYS.INTL | **Not yet Implemented**
-NOW | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Current::now
-SECOND | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::second
-THAIDAYOFWEEK | **Not yet Implemented**
-THAIMONTHOFYEAR | **Not yet Implemented**
-THAIYEAR | **Not yet Implemented**
-TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Time::fromHMS
-TIMEVALUE | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeValue::fromString
-TODAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Current::today
-WEEKDAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::day
-WEEKNUM | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::number
-WORKDAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\WorkDay::date
-WORKDAY.INTL | **Not yet Implemented**
-YEAR | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::year
-YEARFRAC | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\YearFrac::fraction
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+DATE | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATE
+DATEDIF | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATEDIF
+DATEVALUE | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATEVALUE
+DAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DAYOFMONTH
+DAYS360 | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DAYS360
+EDATE | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::EDATE
+EOMONTH | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::EOMONTH
+HOUR | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::HOUROFDAY
+ISOWEEKNUM | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::ISOWEEKNUM
+MINUTE | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::MINUTE
+MONTH | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::MONTHOFYEAR
+NETWORKDAYS | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::NETWORKDAYS
+NOW | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATETIMENOW
+SECOND | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::SECOND
+TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::TIME
+TIMEVALUE | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::TIMEVALUE
+TODAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATENOW
+WEEKDAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WEEKDAY
+WEEKNUM | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WEEKNUM
+WORKDAY | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WORKDAY
+YEAR | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::YEAR
+YEARFRAC | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::YEARFRAC
## CATEGORY_ENGINEERING
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-BESSELI | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselI::BESSELI
-BESSELJ | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselJ::BESSELJ
-BESSELK | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselK::BESSELK
-BESSELY | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselY::BESSELY
-BIN2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toDecimal
-BIN2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toHex
-BIN2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toOctal
-BITAND | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITAND
-BITLSHIFT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITLSHIFT
-BITOR | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITOR
-BITRSHIFT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITRSHIFT
-BITXOR | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITXOR
-COMPLEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::COMPLEX
-CONVERT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertUOM::CONVERT
-DEC2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toBinary
-DEC2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toHex
-DEC2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toOctal
-DELTA | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Compare::DELTA
-ERF | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Erf::ERF
-ERF.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Erf::ERFPRECISE
-ERFC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ErfC::ERFC
-ERFC.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ErfC::ERFC
-GESTEP | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Compare::GESTEP
-HEX2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toBinary
-HEX2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toDecimal
-HEX2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toOctal
-IMABS | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMABS
-IMAGINARY | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::IMAGINARY
-IMARGUMENT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMARGUMENT
-IMCONJUGATE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCONJUGATE
-IMCOS | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOS
-IMCOSH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOSH
-IMCOT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOT
-IMCSC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCSC
-IMCSCH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCSCH
-IMDIV | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMDIV
-IMEXP | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMEXP
-IMLN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLN
-IMLOG10 | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLOG10
-IMLOG2 | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLOG2
-IMPOWER | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMPOWER
-IMPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMPRODUCT
-IMREAL | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::IMREAL
-IMSEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSEC
-IMSECH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSECH
-IMSIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSIN
-IMSINH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSINH
-IMSQRT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSQRT
-IMSUB | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMSUB
-IMSUM | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMSUM
-IMTAN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMTAN
-OCT2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toBinary
-OCT2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toDecimal
-OCT2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toHex
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+BESSELI | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELI
+BESSELJ | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELJ
+BESSELK | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELK
+BESSELY | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELY
+BIN2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTODEC
+BIN2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTOHEX
+BIN2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTOOCT
+COMPLEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::COMPLEX
+CONVERT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::CONVERTUOM
+DEC2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOBIN
+DEC2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOHEX
+DEC2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOOCT
+DELTA | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DELTA
+ERF | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERF
+ERF.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFPRECISE
+ERFC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFC
+ERFC.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFC
+GESTEP | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::GESTEP
+HEX2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTOBIN
+HEX2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTODEC
+HEX2OCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTOOCT
+IMABS | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMABS
+IMAGINARY | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMAGINARY
+IMARGUMENT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMARGUMENT
+IMCONJUGATE | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCONJUGATE
+IMCOS | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOS
+IMCOSH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOSH
+IMCOT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOT
+IMCSC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCSC
+IMCSCH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCSCH
+IMDIV | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMDIV
+IMEXP | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMEXP
+IMLN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLN
+IMLOG10 | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLOG10
+IMLOG2 | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLOG2
+IMPOWER | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMPOWER
+IMPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMPRODUCT
+IMREAL | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMREAL
+IMSEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSEC
+IMSECH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSECH
+IMSIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSIN
+IMSINH | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSINH
+IMSQRT | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSQRT
+IMSUB | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSUB
+IMSUM | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSUM
+IMTAN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMTAN
+OCT2BIN | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTOBIN
+OCT2DEC | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTODEC
+OCT2HEX | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTOHEX
## CATEGORY_FINANCIAL
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ACCRINT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest::periodic
-ACCRINTM | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest::atMaturity
-AMORDEGRC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization::AMORDEGRC
-AMORLINC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization::AMORLINC
-COUPDAYBS | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYBS
-COUPDAYS | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYS
-COUPDAYSNC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYSNC
-COUPNCD | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPNCD
-COUPNUM | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPNUM
-COUPPCD | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPPCD
-CUMIPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative::interest
-CUMPRINC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative::principal
-DB | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::DB
-DDB | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::DDB
-DISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates::discount
-DOLLARDE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::decimal
-DOLLARFR | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::fractional
-DURATION | **Not yet Implemented**
-EFFECT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate::effective
-FV | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::futureValue
-FVSCHEDULE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::futureValue
-INTRATE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates::interest
-IPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::payment
-IRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::rate
-ISPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::schedulePayment
-MDURATION | **Not yet Implemented**
-MIRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::modifiedRate
-NOMINAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate::nominal
-NPER | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::periods
-NPV | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::presentValue
-ODDFPRICE | **Not yet Implemented**
-ODDFYIELD | **Not yet Implemented**
-ODDLPRICE | **Not yet Implemented**
-ODDLYIELD | **Not yet Implemented**
-PDURATION | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::periods
-PMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments::annuity
-PPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments::interestPayment
-PRICE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::price
-PRICEDISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::priceDiscounted
-PRICEMAT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::priceAtMaturity
-PV | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::presentValue
-RATE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::rate
-RECEIVED | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::received
-RRI | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::interestRate
-SLN | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::SLN
-SYD | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::SYD
-TBILLEQ | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::bondEquivalentYield
-TBILLPRICE | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::price
-TBILLYIELD | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::yield
-USDOLLAR | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::format
-VDB | **Not yet Implemented**
-XIRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic::rate
-XNPV | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic::presentValue
-YIELD | **Not yet Implemented**
-YIELDDISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields::yieldDiscounted
-YIELDMAT | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields::yieldAtMaturity
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+ACCRINT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINT
+ACCRINTM | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINTM
+AMORDEGRC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORDEGRC
+AMORLINC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORLINC
+COUPDAYBS | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYBS
+COUPDAYS | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYS
+COUPDAYSNC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYSNC
+COUPNCD | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNCD
+COUPNUM | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNUM
+COUPPCD | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPPCD
+CUMIPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMIPMT
+CUMPRINC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMPRINC
+DB | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DB
+DDB | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DDB
+DISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DISC
+DOLLARDE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARDE
+DOLLARFR | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARFR
+DURATION | **Not yet Implemented**
+EFFECT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::EFFECT
+FV | \PhpOffice\PhpSpreadsheet\Calculation\Financial::FV
+FVSCHEDULE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::FVSCHEDULE
+INTRATE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::INTRATE
+IPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::IPMT
+IRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial::IRR
+ISPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ISPMT
+MDURATION | **Not yet Implemented**
+MIRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial::MIRR
+NOMINAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NOMINAL
+NPER | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NPER
+NPV | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NPV
+ODDFPRICE | **Not yet Implemented**
+ODDFYIELD | **Not yet Implemented**
+ODDLPRICE | **Not yet Implemented**
+ODDLYIELD | **Not yet Implemented**
+PDURATION | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PDURATION
+PMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PMT
+PPMT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PPMT
+PRICE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICE
+PRICEDISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEDISC
+PRICEMAT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEMAT
+PV | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PV
+RATE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RATE
+RECEIVED | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RECEIVED
+RRI | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RRI
+SLN | \PhpOffice\PhpSpreadsheet\Calculation\Financial::SLN
+SYD | \PhpOffice\PhpSpreadsheet\Calculation\Financial::SYD
+TBILLEQ | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLEQ
+TBILLPRICE | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLPRICE
+TBILLYIELD | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLYIELD
+USDOLLAR | **Not yet Implemented**
+VDB | **Not yet Implemented**
+XIRR | \PhpOffice\PhpSpreadsheet\Calculation\Financial::XIRR
+XNPV | \PhpOffice\PhpSpreadsheet\Calculation\Financial::XNPV
+YIELD | **Not yet Implemented**
+YIELDDISC | \PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDDISC
+YIELDMAT | \PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDMAT
## CATEGORY_INFORMATION
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-CELL | **Not yet Implemented**
-ERROR.TYPE | \PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError::type
-INFO | **Not yet Implemented**
-ISBLANK | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isBlank
-ISERR | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isErr
-ISERROR | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isError
-ISEVEN | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isEven
-ISFORMULA | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isFormula
-ISLOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isLogical
-ISNA | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isNa
-ISNONTEXT | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isNonText
-ISNUMBER | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isNumber
-ISODD | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isOdd
-ISOMITTED | **Not yet Implemented**
-ISREF | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isRef
-ISTEXT | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isText
-N | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::asNumber
-NA | \PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError::NA
-SHEET | **Not yet Implemented**
-SHEETS | **Not yet Implemented**
-TYPE | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::type
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+CELL | **Not yet Implemented**
+ERROR.TYPE | \PhpOffice\PhpSpreadsheet\Calculation\Functions::ERROR_TYPE
+INFO | **Not yet Implemented**
+ISBLANK | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_BLANK
+ISERR | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ERR
+ISERROR | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ERROR
+ISEVEN | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_EVEN
+ISFORMULA | \PhpOffice\PhpSpreadsheet\Calculation\Functions::ISFORMULA
+ISLOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_LOGICAL
+ISNA | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NA
+ISNONTEXT | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NONTEXT
+ISNUMBER | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NUMBER
+ISODD | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ODD
+ISREF | **Not yet Implemented**
+ISTEXT | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_TEXT
+N | \PhpOffice\PhpSpreadsheet\Calculation\Functions::N
+NA | \PhpOffice\PhpSpreadsheet\Calculation\Functions::NA
+TYPE | \PhpOffice\PhpSpreadsheet\Calculation\Functions::TYPE
## CATEGORY_LOGICAL
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-AND | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalAnd
-BYCOL | **Not yet Implemented**
-BYROW | **Not yet Implemented**
-FALSE | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean::FALSE
-IF | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::statementIf
-IFERROR | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFERROR
-IFNA | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFNA
-IFS | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFS
-LAMBDA | **Not yet Implemented**
-LET | **Not yet Implemented**
-MAKEARRAY | **Not yet Implemented**
-MAP | **Not yet Implemented**
-NOT | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::NOT
-OR | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalOr
-REDUCE | **Not yet Implemented**
-SCAN | **Not yet Implemented**
-SWITCH | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::statementSwitch
-TRUE | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean::TRUE
-XOR | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalXor
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+AND | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd
+FALSE | \PhpOffice\PhpSpreadsheet\Calculation\Logical::FALSE
+IF | \PhpOffice\PhpSpreadsheet\Calculation\Logical::STATEMENT_IF
+IFERROR | \PhpOffice\PhpSpreadsheet\Calculation\Logical::IFERROR
+NOT | \PhpOffice\PhpSpreadsheet\Calculation\Logical::NOT
+OR | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalOr
+TRUE | \PhpOffice\PhpSpreadsheet\Calculation\Logical::TRUE
+XOR | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalXor
## CATEGORY_LOOKUP_AND_REFERENCE
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ADDRESS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Address::cell
-AREAS | **Not yet Implemented**
-CHOOSE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Selection::CHOOSE
-CHOOSECOLS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::chooseCols
-CHOOSEROWS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::chooseRows
-COLUMN | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::COLUMN
-COLUMNS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::COLUMNS
-DROP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::drop
-EXPAND | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::expand
-FILTER | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Filter::filter
-FORMULATEXT | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Formula::text
-GETPIVOTDATA | **Not yet Implemented**
-GROUPBY | **Not yet Implemented**
-HLOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\HLookup::lookup
-HSTACK | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Hstack::hstack
-HYPERLINK | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Hyperlink::set
-INDEX | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix::index
-INDIRECT | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Indirect::INDIRECT
-LOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Lookup::lookup
-MATCH | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ExcelMatch::MATCH
-OFFSET | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset::OFFSET
-ROW | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::ROW
-ROWS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::ROWS
-RTD | **Not yet Implemented**
-SORT | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Sort::sort
-SORTBY | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Sort::sortBy
-TAKE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::take
-TOCOL | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\TorowTocol::tocol
-TOROW | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\TorowTocol::torow
-TRANSPOSE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix::transpose
-UNIQUE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Unique::unique
-VLOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\VLookup::lookup
-VSTACK | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Vstack::vstack
-XLOOKUP | **Not yet Implemented**
-XMATCH | **Not yet Implemented**
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+ADDRESS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::CELL_ADDRESS
+AREAS | **Not yet Implemented**
+CHOOSE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::CHOOSE
+COLUMN | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMN
+COLUMNS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMNS
+FORMULATEXT | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::FORMULATEXT
+GETPIVOTDATA | **Not yet Implemented**
+HLOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HLOOKUP
+HYPERLINK | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HYPERLINK
+INDEX | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDEX
+INDIRECT | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDIRECT
+LOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::LOOKUP
+MATCH | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::MATCH
+OFFSET | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::OFFSET
+ROW | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROW
+ROWS | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROWS
+RTD | **Not yet Implemented**
+TRANSPOSE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::TRANSPOSE
+VLOOKUP | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::VLOOKUP
## CATEGORY_MATH_AND_TRIG
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ABS | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Absolute::evaluate
-ACOS | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::acos
-ACOSH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::acosh
-ACOT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::acot
-ACOTH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::acoth
-AGGREGATE | **Not yet Implemented**
-ARABIC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Arabic::evaluate
-ASIN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::asin
-ASINH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::asinh
-ATAN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atan
-ATAN2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atan2
-ATANH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atanh
-BASE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Base::evaluate
-CEILING | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::ceiling
-CEILING.MATH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::math
-CEILING.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::precise
-COMBIN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Combinations::withoutRepetition
-COMBINA | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Combinations::withRepetition
-COS | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::cos
-COSH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::cosh
-COT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::cot
-COTH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::coth
-CSC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosecant::csc
-CSCH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosecant::csch
-DECIMAL | **Not yet Implemented**
-DEGREES | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Angle::toDegrees
-ECMA.CEILING | **Not yet Implemented**
-EVEN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::even
-EXP | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Exp::evaluate
-FACT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::fact
-FACTDOUBLE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::factDouble
-FLOOR | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::floor
-FLOOR.MATH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::math
-FLOOR.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::precise
-GCD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Gcd::evaluate
-INT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\IntClass::evaluate
-ISO.CEILING | **Not yet Implemented**
-LCM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Lcm::evaluate
-LN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::natural
-LOG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::withBase
-LOG10 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::base10
-MDETERM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::determinant
-MINVERSE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::inverse
-MMULT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::multiply
-MOD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::mod
-MROUND | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::multiple
-MULTINOMIAL | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::multinomial
-MUNIT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::identity
-ODD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::odd
-PI | pi
-POWER | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::power
-PRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::product
-QUOTIENT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::quotient
-RADIANS | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Angle::toRadians
-RAND | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::rand
-RANDARRAY | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::randArray
-RANDBETWEEN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::randBetween
-ROMAN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Roman::evaluate
-ROUND | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::round
-ROUNDBAHTDOWN | **Not yet Implemented**
-ROUNDBAHTUP | **Not yet Implemented**
-ROUNDDOWN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::down
-ROUNDUP | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::up
-SEC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Secant::sec
-SECH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Secant::sech
-SEQUENCE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::sequence
-SERIESSUM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SeriesSum::evaluate
-SIGN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sign::evaluate
-SIN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::sin
-SINH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::sinh
-SQRT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sqrt::sqrt
-SQRTPI | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sqrt::pi
-SUBTOTAL | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Subtotal::evaluate
-SUM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::sumErroringStrings
-SUMIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIF
-SUMIFS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIFS
-SUMPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::product
-SUMSQ | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumSquare
-SUMX2MY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXSquaredMinusYSquared
-SUMX2PY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXSquaredPlusYSquared
-SUMXMY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXMinusYSquared
-TAN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::tan
-TANH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::tanh
-TRUNC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trunc::evaluate
-WRAPCOLS | **Not yet Implemented**
-WRAPROWS | **Not yet Implemented**
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+ABS | abs
+ACOS | acos
+ACOSH | acosh
+ACOT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ACOT
+ACOTH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ACOTH
+ASIN | asin
+ASINH | asinh
+ATAN | atan
+ATAN2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::REVERSE_ATAN2
+ATANH | atanh
+CEILING | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CEILING
+COMBIN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COMBIN
+COS | cos
+COSH | cosh
+COT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COT
+COTH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COTH
+CSC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CSC
+CSCH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CSCH
+DEGREES | rad2deg
+EVEN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::EVEN
+EXP | exp
+FACT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FACT
+FACTDOUBLE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FACTDOUBLE
+FLOOR | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FLOOR
+GCD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::GCD
+INT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::INT
+LCM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::LCM
+LN | log
+LOG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::LOG_BASE
+LOG10 | log10
+MDETERM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MDETERM
+MINVERSE | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MINVERSE
+MMULT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MMULT
+MOD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MOD
+MROUND | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MROUND
+MULTINOMIAL | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MULTINOMIAL
+ODD | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ODD
+PI | pi
+POWER | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::POWER
+PRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::PRODUCT
+QUOTIENT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::QUOTIENT
+RADIANS | deg2rad
+RAND | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::RAND
+RANDBETWEEN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::RAND
+ROMAN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROMAN
+ROUND | round
+ROUNDDOWN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROUNDDOWN
+ROUNDUP | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROUNDUP
+SEC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SEC
+SECH | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SECH
+SERIESSUM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SERIESSUM
+SIGN | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SIGN
+SIN | sin
+SINH | sinh
+SQRT | sqrt
+SQRTPI | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SQRTPI
+SUBTOTAL | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUBTOTAL
+SUM | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUM
+SUMIF | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMIF
+SUMIFS | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMIFS
+SUMPRODUCT | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMPRODUCT
+SUMSQ | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMSQ
+SUMX2MY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMX2MY2
+SUMX2PY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMX2PY2
+SUMXMY2 | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMXMY2
+TAN | tan
+TANH | tanh
+TRUNC | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::TRUNC
## CATEGORY_STATISTICAL
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-AVEDEV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::averageDeviations
-AVERAGE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::average
-AVERAGEA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::averageA
-AVERAGEIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::AVERAGEIF
-AVERAGEIFS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::AVERAGEIFS
-BETA.DIST | **Not yet Implemented**
-BETA.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::inverse
-BETADIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::distribution
-BETAINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::inverse
-BINOM.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::distribution
-BINOM.DIST.RANGE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::range
-BINOM.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::inverse
-BINOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::distribution
-CHIDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionRightTail
-CHIINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionLeftTail
-CHISQ.DIST.RT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionRightTail
-CHISQ.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseLeftTail
-CHISQ.INV.RT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.TEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::test
-CHITEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::test
-CONFIDENCE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence::CONFIDENCE
-CONFIDENCE.NORM | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence::CONFIDENCE
-CONFIDENCE.T | **Not yet Implemented**
-CORREL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::CORREL
-COUNT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNT
-COUNTA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNTA
-COUNTBLANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNTBLANK
-COUNTIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::COUNTIF
-COUNTIFS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::COUNTIFS
-COVAR | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::COVAR
-COVARIANCE.P | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::COVAR
-COVARIANCE.S | **Not yet Implemented**
-CRITBINOM | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::inverse
-DEVSQ | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::sumSquares
-EXPON.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Exponential::distribution
-EXPONDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Exponential::distribution
-F.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\F::distribution
-F.DIST.RT | **Not yet Implemented**
-F.INV | **Not yet Implemented**
-F.INV.RT | **Not yet Implemented**
-F.TEST | **Not yet Implemented**
-FDIST | **Not yet Implemented**
-FINV | **Not yet Implemented**
-FISHER | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Fisher::distribution
-FISHERINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Fisher::inverse
-FORECAST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::FORECAST
-FORECAST.ETS | **Not yet Implemented**
-FORECAST.ETS.CONFINT | **Not yet Implemented**
-FORECAST.ETS.SEASONALITY | **Not yet Implemented**
-FORECAST.ETS.STAT | **Not yet Implemented**
-FORECAST.LINEAR | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::FORECAST
-FREQUENCY | **Not yet Implemented**
-FTEST | **Not yet Implemented**
-GAMMA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::gamma
-GAMMA.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::distribution
-GAMMA.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::inverse
-GAMMADIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::distribution
-GAMMAINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::inverse
-GAMMALN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::ln
-GAMMALN.PRECISE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::ln
-GAUSS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::gauss
-GEOMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::geometric
-GROWTH | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::GROWTH
-HARMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::harmonic
-HYPGEOM.DIST | **Not yet Implemented**
-HYPGEOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\HyperGeometric::distribution
-INTERCEPT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::INTERCEPT
-KURT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::kurtosis
-LARGE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Size::large
-LINEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::LINEST
-LOGEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::LOGEST
-LOGINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::inverse
-LOGNORM.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::distribution
-LOGNORM.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::inverse
-LOGNORMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::cumulative
-MAX | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::max
-MAXA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::maxA
-MAXIFS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::MAXIFS
-MEDIAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::median
-MEDIANIF | **Not yet Implemented**
-MIN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::min
-MINA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::minA
-MINIFS | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::MINIFS
-MODE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::mode
-MODE.MULT | **Not yet Implemented**
-MODE.SNGL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::mode
-NEGBINOM.DIST | **Not yet Implemented**
-NEGBINOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::negative
-NORM.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::distribution
-NORM.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::inverse
-NORM.S.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::distribution
-NORM.S.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::inverse
-NORMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::distribution
-NORMINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::inverse
-NORMSDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::cumulative
-NORMSINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::inverse
-PEARSON | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::CORREL
-PERCENTILE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTILE
-PERCENTILE.EXC | **Not yet Implemented**
-PERCENTILE.INC | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTILE
-PERCENTRANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTRANK
-PERCENTRANK.EXC | **Not yet Implemented**
-PERCENTRANK.INC | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTRANK
-PERMUT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations::PERMUT
-PERMUTATIONA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations::PERMUTATIONA
-PHI | **Not yet Implemented**
-POISSON | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Poisson::distribution
-POISSON.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Poisson::distribution
-PROB | **Not yet Implemented**
-QUARTILE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::QUARTILE
-QUARTILE.EXC | **Not yet Implemented**
-QUARTILE.INC | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::QUARTILE
-RANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::RANK
-RANK.AVG | **Not yet Implemented**
-RANK.EQ | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::RANK
-RSQ | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::RSQ
-SKEW | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::skew
-SKEW.P | **Not yet Implemented**
-SLOPE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::SLOPE
-SMALL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Size::small
-STANDARDIZE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Standardize::execute
-STDEV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEV
-STDEV.P | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVP
-STDEV.S | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEV
-STDEVA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVA
-STDEVP | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVP
-STDEVPA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVPA
-STEYX | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::STEYX
-T.DIST | **Not yet Implemented**
-T.DIST.2T | **Not yet Implemented**
-T.DIST.RT | **Not yet Implemented**
-T.INV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::inverse
-T.INV.2T | **Not yet Implemented**
-T.TEST | **Not yet Implemented**
-TDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::distribution
-TINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::inverse
-TREND | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::TREND
-TRIMMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::trim
-TTEST | **Not yet Implemented**
-VAR | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VAR
-VAR.P | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARP
-VAR.S | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VAR
-VARA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARA
-VARP | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARP
-VARPA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARPA
-WEIBULL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Weibull::distribution
-WEIBULL.DIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Weibull::distribution
-Z.TEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::zTest
-ZTEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::zTest
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+AVEDEV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVEDEV
+AVERAGE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGE
+AVERAGEA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGEA
+AVERAGEIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGEIF
+AVERAGEIFS | **Not yet Implemented**
+BETADIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BETADIST
+BETAINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BETAINV
+BINOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BINOMDIST
+CHIDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CHIDIST
+CHIINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CHIINV
+CHITEST | **Not yet Implemented**
+CONFIDENCE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CONFIDENCE
+CORREL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CORREL
+COUNT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNT
+COUNTA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTA
+COUNTBLANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTBLANK
+COUNTIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTIF
+COUNTIFS | **Not yet Implemented**
+COVAR | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COVAR
+CRITBINOM | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CRITBINOM
+DEVSQ | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::DEVSQ
+EXPONDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::EXPONDIST
+FDIST | **Not yet Implemented**
+FINV | **Not yet Implemented**
+FISHER | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FISHER
+FISHERINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FISHERINV
+FORECAST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FORECAST
+FREQUENCY | **Not yet Implemented**
+FTEST | **Not yet Implemented**
+GAMMADIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMADIST
+GAMMAINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMAINV
+GAMMALN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMALN
+GEOMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GEOMEAN
+GROWTH | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GROWTH
+HARMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::HARMEAN
+HYPGEOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::HYPGEOMDIST
+INTERCEPT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::INTERCEPT
+KURT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::KURT
+LARGE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LARGE
+LINEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LINEST
+LOGEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGEST
+LOGINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGINV
+LOGNORMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGNORMDIST
+MAX | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAX
+MAXA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAXA
+MAXIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAXIF
+MEDIAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MEDIAN
+MEDIANIF | **Not yet Implemented**
+MIN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MIN
+MINA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MINA
+MINIF | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MINIF
+MODE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MODE
+MODE.SNGL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MODE
+NEGBINOMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NEGBINOMDIST
+NORMDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMDIST
+NORMINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMINV
+NORMSDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMSDIST
+NORMSINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMSINV
+PEARSON | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CORREL
+PERCENTILE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERCENTILE
+PERCENTRANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERCENTRANK
+PERMUT | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERMUT
+POISSON | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::POISSON
+PROB | **Not yet Implemented**
+QUARTILE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::QUARTILE
+RANK | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::RANK
+RSQ | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::RSQ
+SKEW | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SKEW
+SLOPE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SLOPE
+SMALL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SMALL
+STANDARDIZE | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STANDARDIZE
+STDEV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEV
+STDEV.S | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEV
+STDEV.P | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVP
+STDEVA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVA
+STDEVP | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVP
+STDEVPA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVPA
+STEYX | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STEYX
+TDIST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TDIST
+TINV | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TINV
+TREND | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TREND
+TRIMMEAN | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TRIMMEAN
+TTEST | **Not yet Implemented**
+VAR | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARFunc
+VAR.P | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARP
+VAR.S | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARFunc
+VARA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARA
+VARP | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARP
+VARPA | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARPA
+WEIBULL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::WEIBULL
+ZTEST | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::ZTEST
## CATEGORY_TEXT_AND_DATA
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ARRAYTOTEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::fromArray
-ASC | **Not yet Implemented**
-BAHTTEXT | **Not yet Implemented**
-CHAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::character
-CLEAN | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Trim::nonPrintable
-CODE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::code
-CONCAT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::CONCATENATE
-CONCATENATE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::actualCONCATENATE
-DBCS | **Not yet Implemented**
-DOLLAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::DOLLAR
-EXACT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::exact
-FIND | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::sensitive
-FINDB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::sensitive
-FIXED | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::FIXEDFORMAT
-ISTHAIDIGIT | **Not yet Implemented**
-JIS | **Not yet Implemented**
-LEFT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::left
-LEFTB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::left
-LEN | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::length
-LENB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::length
-LOWER | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::lower
-MID | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::mid
-MIDB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::mid
-NUMBERSTRING | **Not yet Implemented**
-NUMBERVALUE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::NUMBERVALUE
-PHONETIC | **Not yet Implemented**
-PROPER | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::proper
-REPLACE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::replace
-REPLACEB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::replace
-REPT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::builtinREPT
-RIGHT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::right
-RIGHTB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::right
-SEARCH | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::insensitive
-SEARCHB | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::insensitive
-SUBSTITUTE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::substitute
-T | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::test
-TEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::TEXTFORMAT
-TEXTAFTER | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::after
-TEXTBEFORE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::before
-TEXTJOIN | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::TEXTJOIN
-TEXTSPLIT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::split
-THAIDIGIT | **Not yet Implemented**
-THAINUMSOUND | **Not yet Implemented**
-THAINUMSTRING | **Not yet Implemented**
-THAISTRINGLENGTH | **Not yet Implemented**
-TRIM | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Trim::spaces
-UNICHAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::character
-UNICODE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::code
-UPPER | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::upper
-VALUE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::VALUE
-VALUETOTEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::valueToText
-
-## CATEGORY_WEB
-
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ENCODEURL | \PhpOffice\PhpSpreadsheet\Calculation\Web\Service::urlEncode
-FILTERXML | **Not yet Implemented**
-WEBSERVICE | \PhpOffice\PhpSpreadsheet\Calculation\Web\Service::webService
-
-## CATEGORY_UNCATEGORISED
-
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-
-## CATEGORY_MICROSOFT_INTERNAL
-
-Excel Function | PhpSpreadsheet Function
--------------------------|--------------------------------------
-ANCHORARRAY | \PhpOffice\PhpSpreadsheet\Calculation\Internal\ExcelArrayPseudoFunctions::anchorArray
-SINGLE | \PhpOffice\PhpSpreadsheet\Calculation\Internal\ExcelArrayPseudoFunctions::single
+Excel Function | PhpSpreadsheet Function
+--------------------|-------------------------------------------
+ASC | **Not yet Implemented**
+BAHTTEXT | **Not yet Implemented**
+CHAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CHARACTER
+CLEAN | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TRIMNONPRINTABLE
+CODE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::ASCIICODE
+CONCAT | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CONCATENATE
+CONCATENATE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CONCATENATE
+DOLLAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData::DOLLAR
+EXACT | \PhpOffice\PhpSpreadsheet\Calculation\TextData::EXACT
+FIND | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHSENSITIVE
+FINDB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHSENSITIVE
+FIXED | \PhpOffice\PhpSpreadsheet\Calculation\TextData::FIXEDFORMAT
+JIS | **Not yet Implemented**
+LEFT | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LEFT
+LEFTB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LEFT
+LEN | \PhpOffice\PhpSpreadsheet\Calculation\TextData::STRINGLENGTH
+LENB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::STRINGLENGTH
+LOWER | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LOWERCASE
+MID | \PhpOffice\PhpSpreadsheet\Calculation\TextData::MID
+MIDB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::MID
+NUMBERVALUE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::NUMBERVALUE
+PHONETIC | **Not yet Implemented**
+PROPER | \PhpOffice\PhpSpreadsheet\Calculation\TextData::PROPERCASE
+REPLACE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::REPLACE
+REPLACEB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::REPLACE
+REPT | str_repeat
+RIGHT | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RIGHT
+RIGHTB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RIGHT
+SEARCH | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHINSENSITIVE
+SEARCHB | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHINSENSITIVE
+SUBSTITUTE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SUBSTITUTE
+T | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RETURNSTRING
+TEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TEXTFORMAT
+TEXTJOIN | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TEXTJOIN
+TRIM | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TRIMSPACES
+UNICHAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CHARACTER
+UNICODE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::ASCIICODE
+UPPER | \PhpOffice\PhpSpreadsheet\Calculation\TextData::UPPERCASE
+VALUE | \PhpOffice\PhpSpreadsheet\Calculation\TextData::VALUE
diff --git a/docs/references/function-list-by-name-compact.md b/docs/references/function-list-by-name-compact.md
deleted file mode 100644
index 4df84d2935..0000000000
--- a/docs/references/function-list-by-name-compact.md
+++ /dev/null
@@ -1,663 +0,0 @@
-# Function list by name compact
-
-Category should be prefixed by `CATEGORY_` to match the values in \PhpOffice\PhpSpreadsheet\Calculation\Category
-
-Function should be prefixed by `PhpOffice\PhpSpreadsheet\Calculation\`
-
-A less compact list can be found [here](./function-list-by-name.md)
-
-
-## A
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-ABS | MATH_AND_TRIG | MathTrig\Absolute::evaluate
-ACCRINT | FINANCIAL | Financial\Securities\AccruedInterest::periodic
-ACCRINTM | FINANCIAL | Financial\Securities\AccruedInterest::atMaturity
-ACOS | MATH_AND_TRIG | MathTrig\Trig\Cosine::acos
-ACOSH | MATH_AND_TRIG | MathTrig\Trig\Cosine::acosh
-ACOT | MATH_AND_TRIG | MathTrig\Trig\Cotangent::acot
-ACOTH | MATH_AND_TRIG | MathTrig\Trig\Cotangent::acoth
-ADDRESS | LOOKUP_AND_REFERENCE | LookupRef\Address::cell
-AGGREGATE | MATH_AND_TRIG | **Not yet Implemented**
-AMORDEGRC | FINANCIAL | Financial\Amortization::AMORDEGRC
-AMORLINC | FINANCIAL | Financial\Amortization::AMORLINC
-ANCHORARRAY | MICROSOFT_INTERNAL | Internal\ExcelArrayPseudoFunctions::anchorArray
-AND | LOGICAL | Logical\Operations::logicalAnd
-ARABIC | MATH_AND_TRIG | MathTrig\Arabic::evaluate
-AREAS | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-ARRAYTOTEXT | TEXT_AND_DATA | TextData\Text::fromArray
-ASC | TEXT_AND_DATA | **Not yet Implemented**
-ASIN | MATH_AND_TRIG | MathTrig\Trig\Sine::asin
-ASINH | MATH_AND_TRIG | MathTrig\Trig\Sine::asinh
-ATAN | MATH_AND_TRIG | MathTrig\Trig\Tangent::atan
-ATAN2 | MATH_AND_TRIG | MathTrig\Trig\Tangent::atan2
-ATANH | MATH_AND_TRIG | MathTrig\Trig\Tangent::atanh
-AVEDEV | STATISTICAL | Statistical\Averages::averageDeviations
-AVERAGE | STATISTICAL | Statistical\Averages::average
-AVERAGEA | STATISTICAL | Statistical\Averages::averageA
-AVERAGEIF | STATISTICAL | Statistical\Conditional::AVERAGEIF
-AVERAGEIFS | STATISTICAL | Statistical\Conditional::AVERAGEIFS
-
-## B
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-BAHTTEXT | TEXT_AND_DATA | **Not yet Implemented**
-BASE | MATH_AND_TRIG | MathTrig\Base::evaluate
-BESSELI | ENGINEERING | Engineering\BesselI::BESSELI
-BESSELJ | ENGINEERING | Engineering\BesselJ::BESSELJ
-BESSELK | ENGINEERING | Engineering\BesselK::BESSELK
-BESSELY | ENGINEERING | Engineering\BesselY::BESSELY
-BETA.DIST | STATISTICAL | **Not yet Implemented**
-BETA.INV | STATISTICAL | Statistical\Distributions\Beta::inverse
-BETADIST | STATISTICAL | Statistical\Distributions\Beta::distribution
-BETAINV | STATISTICAL | Statistical\Distributions\Beta::inverse
-BIN2DEC | ENGINEERING | Engineering\ConvertBinary::toDecimal
-BIN2HEX | ENGINEERING | Engineering\ConvertBinary::toHex
-BIN2OCT | ENGINEERING | Engineering\ConvertBinary::toOctal
-BINOM.DIST | STATISTICAL | Statistical\Distributions\Binomial::distribution
-BINOM.DIST.RANGE | STATISTICAL | Statistical\Distributions\Binomial::range
-BINOM.INV | STATISTICAL | Statistical\Distributions\Binomial::inverse
-BINOMDIST | STATISTICAL | Statistical\Distributions\Binomial::distribution
-BITAND | ENGINEERING | Engineering\BitWise::BITAND
-BITLSHIFT | ENGINEERING | Engineering\BitWise::BITLSHIFT
-BITOR | ENGINEERING | Engineering\BitWise::BITOR
-BITRSHIFT | ENGINEERING | Engineering\BitWise::BITRSHIFT
-BITXOR | ENGINEERING | Engineering\BitWise::BITXOR
-BYCOL | LOGICAL | **Not yet Implemented**
-BYROW | LOGICAL | **Not yet Implemented**
-
-## C
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-CEILING | MATH_AND_TRIG | MathTrig\Ceiling::ceiling
-CEILING.MATH | MATH_AND_TRIG | MathTrig\Ceiling::math
-CEILING.PRECISE | MATH_AND_TRIG | MathTrig\Ceiling::precise
-CELL | INFORMATION | **Not yet Implemented**
-CHAR | TEXT_AND_DATA | TextData\CharacterConvert::character
-CHIDIST | STATISTICAL | Statistical\Distributions\ChiSquared::distributionRightTail
-CHIINV | STATISTICAL | Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.DIST | STATISTICAL | Statistical\Distributions\ChiSquared::distributionLeftTail
-CHISQ.DIST.RT | STATISTICAL | Statistical\Distributions\ChiSquared::distributionRightTail
-CHISQ.INV | STATISTICAL | Statistical\Distributions\ChiSquared::inverseLeftTail
-CHISQ.INV.RT | STATISTICAL | Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.TEST | STATISTICAL | Statistical\Distributions\ChiSquared::test
-CHITEST | STATISTICAL | Statistical\Distributions\ChiSquared::test
-CHOOSE | LOOKUP_AND_REFERENCE | LookupRef\Selection::CHOOSE
-CHOOSECOLS | LOOKUP_AND_REFERENCE | LookupRef\ChooseRowsEtc::chooseCols
-CHOOSEROWS | LOOKUP_AND_REFERENCE | LookupRef\ChooseRowsEtc::chooseRows
-CLEAN | TEXT_AND_DATA | TextData\Trim::nonPrintable
-CODE | TEXT_AND_DATA | TextData\CharacterConvert::code
-COLUMN | LOOKUP_AND_REFERENCE | LookupRef\RowColumnInformation::COLUMN
-COLUMNS | LOOKUP_AND_REFERENCE | LookupRef\RowColumnInformation::COLUMNS
-COMBIN | MATH_AND_TRIG | MathTrig\Combinations::withoutRepetition
-COMBINA | MATH_AND_TRIG | MathTrig\Combinations::withRepetition
-COMPLEX | ENGINEERING | Engineering\Complex::COMPLEX
-CONCAT | TEXT_AND_DATA | TextData\Concatenate::CONCATENATE
-CONCATENATE | TEXT_AND_DATA | TextData\Concatenate::actualCONCATENATE
-CONFIDENCE | STATISTICAL | Statistical\Confidence::CONFIDENCE
-CONFIDENCE.NORM | STATISTICAL | Statistical\Confidence::CONFIDENCE
-CONFIDENCE.T | STATISTICAL | **Not yet Implemented**
-CONVERT | ENGINEERING | Engineering\ConvertUOM::CONVERT
-CORREL | STATISTICAL | Statistical\Trends::CORREL
-COS | MATH_AND_TRIG | MathTrig\Trig\Cosine::cos
-COSH | MATH_AND_TRIG | MathTrig\Trig\Cosine::cosh
-COT | MATH_AND_TRIG | MathTrig\Trig\Cotangent::cot
-COTH | MATH_AND_TRIG | MathTrig\Trig\Cotangent::coth
-COUNT | STATISTICAL | Statistical\Counts::COUNT
-COUNTA | STATISTICAL | Statistical\Counts::COUNTA
-COUNTBLANK | STATISTICAL | Statistical\Counts::COUNTBLANK
-COUNTIF | STATISTICAL | Statistical\Conditional::COUNTIF
-COUNTIFS | STATISTICAL | Statistical\Conditional::COUNTIFS
-COUPDAYBS | FINANCIAL | Financial\Coupons::COUPDAYBS
-COUPDAYS | FINANCIAL | Financial\Coupons::COUPDAYS
-COUPDAYSNC | FINANCIAL | Financial\Coupons::COUPDAYSNC
-COUPNCD | FINANCIAL | Financial\Coupons::COUPNCD
-COUPNUM | FINANCIAL | Financial\Coupons::COUPNUM
-COUPPCD | FINANCIAL | Financial\Coupons::COUPPCD
-COVAR | STATISTICAL | Statistical\Trends::COVAR
-COVARIANCE.P | STATISTICAL | Statistical\Trends::COVAR
-COVARIANCE.S | STATISTICAL | **Not yet Implemented**
-CRITBINOM | STATISTICAL | Statistical\Distributions\Binomial::inverse
-CSC | MATH_AND_TRIG | MathTrig\Trig\Cosecant::csc
-CSCH | MATH_AND_TRIG | MathTrig\Trig\Cosecant::csch
-CUBEKPIMEMBER | CUBE | **Not yet Implemented**
-CUBEMEMBER | CUBE | **Not yet Implemented**
-CUBEMEMBERPROPERTY | CUBE | **Not yet Implemented**
-CUBERANKEDMEMBER | CUBE | **Not yet Implemented**
-CUBESET | CUBE | **Not yet Implemented**
-CUBESETCOUNT | CUBE | **Not yet Implemented**
-CUBEVALUE | CUBE | **Not yet Implemented**
-CUMIPMT | FINANCIAL | Financial\CashFlow\Constant\Periodic\Cumulative::interest
-CUMPRINC | FINANCIAL | Financial\CashFlow\Constant\Periodic\Cumulative::principal
-
-## D
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-DATE | DATE_AND_TIME | DateTimeExcel\Date::fromYMD
-DATEDIF | DATE_AND_TIME | DateTimeExcel\Difference::interval
-DATESTRING | DATE_AND_TIME | **Not yet Implemented**
-DATEVALUE | DATE_AND_TIME | DateTimeExcel\DateValue::fromString
-DAVERAGE | DATABASE | Database\DAverage::evaluate
-DAY | DATE_AND_TIME | DateTimeExcel\DateParts::day
-DAYS | DATE_AND_TIME | DateTimeExcel\Days::between
-DAYS360 | DATE_AND_TIME | DateTimeExcel\Days360::between
-DB | FINANCIAL | Financial\Depreciation::DB
-DBCS | TEXT_AND_DATA | **Not yet Implemented**
-DCOUNT | DATABASE | Database\DCount::evaluate
-DCOUNTA | DATABASE | Database\DCountA::evaluate
-DDB | FINANCIAL | Financial\Depreciation::DDB
-DEC2BIN | ENGINEERING | Engineering\ConvertDecimal::toBinary
-DEC2HEX | ENGINEERING | Engineering\ConvertDecimal::toHex
-DEC2OCT | ENGINEERING | Engineering\ConvertDecimal::toOctal
-DECIMAL | MATH_AND_TRIG | **Not yet Implemented**
-DEGREES | MATH_AND_TRIG | MathTrig\Angle::toDegrees
-DELTA | ENGINEERING | Engineering\Compare::DELTA
-DEVSQ | STATISTICAL | Statistical\Deviations::sumSquares
-DGET | DATABASE | Database\DGet::evaluate
-DISC | FINANCIAL | Financial\Securities\Rates::discount
-DMAX | DATABASE | Database\DMax::evaluate
-DMIN | DATABASE | Database\DMin::evaluate
-DOLLAR | TEXT_AND_DATA | TextData\Format::DOLLAR
-DOLLARDE | FINANCIAL | Financial\Dollar::decimal
-DOLLARFR | FINANCIAL | Financial\Dollar::fractional
-DPRODUCT | DATABASE | Database\DProduct::evaluate
-DROP | LOOKUP_AND_REFERENCE | LookupRef\ChooseRowsEtc::drop
-DSTDEV | DATABASE | Database\DStDev::evaluate
-DSTDEVP | DATABASE | Database\DStDevP::evaluate
-DSUM | DATABASE | Database\DSum::evaluate
-DURATION | FINANCIAL | **Not yet Implemented**
-DVAR | DATABASE | Database\DVar::evaluate
-DVARP | DATABASE | Database\DVarP::evaluate
-
-## E
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-ECMA.CEILING | MATH_AND_TRIG | **Not yet Implemented**
-EDATE | DATE_AND_TIME | DateTimeExcel\Month::adjust
-EFFECT | FINANCIAL | Financial\InterestRate::effective
-ENCODEURL | WEB | Web\Service::urlEncode
-EOMONTH | DATE_AND_TIME | DateTimeExcel\Month::lastDay
-ERF | ENGINEERING | Engineering\Erf::ERF
-ERF.PRECISE | ENGINEERING | Engineering\Erf::ERFPRECISE
-ERFC | ENGINEERING | Engineering\ErfC::ERFC
-ERFC.PRECISE | ENGINEERING | Engineering\ErfC::ERFC
-ERROR.TYPE | INFORMATION | Information\ExcelError::type
-EVEN | MATH_AND_TRIG | MathTrig\Round::even
-EXACT | TEXT_AND_DATA | TextData\Text::exact
-EXP | MATH_AND_TRIG | MathTrig\Exp::evaluate
-EXPAND | LOOKUP_AND_REFERENCE | LookupRef\ChooseRowsEtc::expand
-EXPON.DIST | STATISTICAL | Statistical\Distributions\Exponential::distribution
-EXPONDIST | STATISTICAL | Statistical\Distributions\Exponential::distribution
-
-## F
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-F.DIST | STATISTICAL | Statistical\Distributions\F::distribution
-F.DIST.RT | STATISTICAL | **Not yet Implemented**
-F.INV | STATISTICAL | **Not yet Implemented**
-F.INV.RT | STATISTICAL | **Not yet Implemented**
-F.TEST | STATISTICAL | **Not yet Implemented**
-FACT | MATH_AND_TRIG | MathTrig\Factorial::fact
-FACTDOUBLE | MATH_AND_TRIG | MathTrig\Factorial::factDouble
-FALSE | LOGICAL | Logical\Boolean::FALSE
-FDIST | STATISTICAL | **Not yet Implemented**
-FILTER | LOOKUP_AND_REFERENCE | LookupRef\Filter::filter
-FILTERXML | WEB | **Not yet Implemented**
-FIND | TEXT_AND_DATA | TextData\Search::sensitive
-FINDB | TEXT_AND_DATA | TextData\Search::sensitive
-FINV | STATISTICAL | **Not yet Implemented**
-FISHER | STATISTICAL | Statistical\Distributions\Fisher::distribution
-FISHERINV | STATISTICAL | Statistical\Distributions\Fisher::inverse
-FIXED | TEXT_AND_DATA | TextData\Format::FIXEDFORMAT
-FLOOR | MATH_AND_TRIG | MathTrig\Floor::floor
-FLOOR.MATH | MATH_AND_TRIG | MathTrig\Floor::math
-FLOOR.PRECISE | MATH_AND_TRIG | MathTrig\Floor::precise
-FORECAST | STATISTICAL | Statistical\Trends::FORECAST
-FORECAST.ETS | STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.CONFINT | STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.SEASONALITY | STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.STAT | STATISTICAL | **Not yet Implemented**
-FORECAST.LINEAR | STATISTICAL | Statistical\Trends::FORECAST
-FORMULATEXT | LOOKUP_AND_REFERENCE | LookupRef\Formula::text
-FREQUENCY | STATISTICAL | **Not yet Implemented**
-FTEST | STATISTICAL | **Not yet Implemented**
-FV | FINANCIAL | Financial\CashFlow\Constant\Periodic::futureValue
-FVSCHEDULE | FINANCIAL | Financial\CashFlow\Single::futureValue
-
-## G
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-GAMMA | STATISTICAL | Statistical\Distributions\Gamma::gamma
-GAMMA.DIST | STATISTICAL | Statistical\Distributions\Gamma::distribution
-GAMMA.INV | STATISTICAL | Statistical\Distributions\Gamma::inverse
-GAMMADIST | STATISTICAL | Statistical\Distributions\Gamma::distribution
-GAMMAINV | STATISTICAL | Statistical\Distributions\Gamma::inverse
-GAMMALN | STATISTICAL | Statistical\Distributions\Gamma::ln
-GAMMALN.PRECISE | STATISTICAL | Statistical\Distributions\Gamma::ln
-GAUSS | STATISTICAL | Statistical\Distributions\StandardNormal::gauss
-GCD | MATH_AND_TRIG | MathTrig\Gcd::evaluate
-GEOMEAN | STATISTICAL | Statistical\Averages\Mean::geometric
-GESTEP | ENGINEERING | Engineering\Compare::GESTEP
-GETPIVOTDATA | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-GROUPBY | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-GROWTH | STATISTICAL | Statistical\Trends::GROWTH
-
-## H
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-HARMEAN | STATISTICAL | Statistical\Averages\Mean::harmonic
-HEX2BIN | ENGINEERING | Engineering\ConvertHex::toBinary
-HEX2DEC | ENGINEERING | Engineering\ConvertHex::toDecimal
-HEX2OCT | ENGINEERING | Engineering\ConvertHex::toOctal
-HLOOKUP | LOOKUP_AND_REFERENCE | LookupRef\HLookup::lookup
-HOUR | DATE_AND_TIME | DateTimeExcel\TimeParts::hour
-HSTACK | LOOKUP_AND_REFERENCE | LookupRef\Hstack::hstack
-HYPERLINK | LOOKUP_AND_REFERENCE | LookupRef\Hyperlink::set
-HYPGEOM.DIST | STATISTICAL | **Not yet Implemented**
-HYPGEOMDIST | STATISTICAL | Statistical\Distributions\HyperGeometric::distribution
-
-## I
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-IF | LOGICAL | Logical\Conditional::statementIf
-IFERROR | LOGICAL | Logical\Conditional::IFERROR
-IFNA | LOGICAL | Logical\Conditional::IFNA
-IFS | LOGICAL | Logical\Conditional::IFS
-IMABS | ENGINEERING | Engineering\ComplexFunctions::IMABS
-IMAGINARY | ENGINEERING | Engineering\Complex::IMAGINARY
-IMARGUMENT | ENGINEERING | Engineering\ComplexFunctions::IMARGUMENT
-IMCONJUGATE | ENGINEERING | Engineering\ComplexFunctions::IMCONJUGATE
-IMCOS | ENGINEERING | Engineering\ComplexFunctions::IMCOS
-IMCOSH | ENGINEERING | Engineering\ComplexFunctions::IMCOSH
-IMCOT | ENGINEERING | Engineering\ComplexFunctions::IMCOT
-IMCSC | ENGINEERING | Engineering\ComplexFunctions::IMCSC
-IMCSCH | ENGINEERING | Engineering\ComplexFunctions::IMCSCH
-IMDIV | ENGINEERING | Engineering\ComplexOperations::IMDIV
-IMEXP | ENGINEERING | Engineering\ComplexFunctions::IMEXP
-IMLN | ENGINEERING | Engineering\ComplexFunctions::IMLN
-IMLOG10 | ENGINEERING | Engineering\ComplexFunctions::IMLOG10
-IMLOG2 | ENGINEERING | Engineering\ComplexFunctions::IMLOG2
-IMPOWER | ENGINEERING | Engineering\ComplexFunctions::IMPOWER
-IMPRODUCT | ENGINEERING | Engineering\ComplexOperations::IMPRODUCT
-IMREAL | ENGINEERING | Engineering\Complex::IMREAL
-IMSEC | ENGINEERING | Engineering\ComplexFunctions::IMSEC
-IMSECH | ENGINEERING | Engineering\ComplexFunctions::IMSECH
-IMSIN | ENGINEERING | Engineering\ComplexFunctions::IMSIN
-IMSINH | ENGINEERING | Engineering\ComplexFunctions::IMSINH
-IMSQRT | ENGINEERING | Engineering\ComplexFunctions::IMSQRT
-IMSUB | ENGINEERING | Engineering\ComplexOperations::IMSUB
-IMSUM | ENGINEERING | Engineering\ComplexOperations::IMSUM
-IMTAN | ENGINEERING | Engineering\ComplexFunctions::IMTAN
-INDEX | LOOKUP_AND_REFERENCE | LookupRef\Matrix::index
-INDIRECT | LOOKUP_AND_REFERENCE | LookupRef\Indirect::INDIRECT
-INFO | INFORMATION | **Not yet Implemented**
-INT | MATH_AND_TRIG | MathTrig\IntClass::evaluate
-INTERCEPT | STATISTICAL | Statistical\Trends::INTERCEPT
-INTRATE | FINANCIAL | Financial\Securities\Rates::interest
-IPMT | FINANCIAL | Financial\CashFlow\Constant\Periodic\Interest::payment
-IRR | FINANCIAL | Financial\CashFlow\Variable\Periodic::rate
-ISBLANK | INFORMATION | Information\Value::isBlank
-ISERR | INFORMATION | Information\ErrorValue::isErr
-ISERROR | INFORMATION | Information\ErrorValue::isError
-ISEVEN | INFORMATION | Information\Value::isEven
-ISFORMULA | INFORMATION | Information\Value::isFormula
-ISLOGICAL | INFORMATION | Information\Value::isLogical
-ISNA | INFORMATION | Information\ErrorValue::isNa
-ISNONTEXT | INFORMATION | Information\Value::isNonText
-ISNUMBER | INFORMATION | Information\Value::isNumber
-ISO.CEILING | MATH_AND_TRIG | **Not yet Implemented**
-ISODD | INFORMATION | Information\Value::isOdd
-ISOMITTED | INFORMATION | **Not yet Implemented**
-ISOWEEKNUM | DATE_AND_TIME | DateTimeExcel\Week::isoWeekNumber
-ISPMT | FINANCIAL | Financial\CashFlow\Constant\Periodic\Interest::schedulePayment
-ISREF | INFORMATION | Information\Value::isRef
-ISTEXT | INFORMATION | Information\Value::isText
-ISTHAIDIGIT | TEXT_AND_DATA | **Not yet Implemented**
-
-## J
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-JIS | TEXT_AND_DATA | **Not yet Implemented**
-
-## K
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-KURT | STATISTICAL | Statistical\Deviations::kurtosis
-
-## L
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-LAMBDA | LOGICAL | **Not yet Implemented**
-LARGE | STATISTICAL | Statistical\Size::large
-LCM | MATH_AND_TRIG | MathTrig\Lcm::evaluate
-LEFT | TEXT_AND_DATA | TextData\Extract::left
-LEFTB | TEXT_AND_DATA | TextData\Extract::left
-LEN | TEXT_AND_DATA | TextData\Text::length
-LENB | TEXT_AND_DATA | TextData\Text::length
-LET | LOGICAL | **Not yet Implemented**
-LINEST | STATISTICAL | Statistical\Trends::LINEST
-LN | MATH_AND_TRIG | MathTrig\Logarithms::natural
-LOG | MATH_AND_TRIG | MathTrig\Logarithms::withBase
-LOG10 | MATH_AND_TRIG | MathTrig\Logarithms::base10
-LOGEST | STATISTICAL | Statistical\Trends::LOGEST
-LOGINV | STATISTICAL | Statistical\Distributions\LogNormal::inverse
-LOGNORM.DIST | STATISTICAL | Statistical\Distributions\LogNormal::distribution
-LOGNORM.INV | STATISTICAL | Statistical\Distributions\LogNormal::inverse
-LOGNORMDIST | STATISTICAL | Statistical\Distributions\LogNormal::cumulative
-LOOKUP | LOOKUP_AND_REFERENCE | LookupRef\Lookup::lookup
-LOWER | TEXT_AND_DATA | TextData\CaseConvert::lower
-
-## M
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-MAKEARRAY | LOGICAL | **Not yet Implemented**
-MAP | LOGICAL | **Not yet Implemented**
-MATCH | LOOKUP_AND_REFERENCE | LookupRef\ExcelMatch::MATCH
-MAX | STATISTICAL | Statistical\Maximum::max
-MAXA | STATISTICAL | Statistical\Maximum::maxA
-MAXIFS | STATISTICAL | Statistical\Conditional::MAXIFS
-MDETERM | MATH_AND_TRIG | MathTrig\MatrixFunctions::determinant
-MDURATION | FINANCIAL | **Not yet Implemented**
-MEDIAN | STATISTICAL | Statistical\Averages::median
-MEDIANIF | STATISTICAL | **Not yet Implemented**
-MID | TEXT_AND_DATA | TextData\Extract::mid
-MIDB | TEXT_AND_DATA | TextData\Extract::mid
-MIN | STATISTICAL | Statistical\Minimum::min
-MINA | STATISTICAL | Statistical\Minimum::minA
-MINIFS | STATISTICAL | Statistical\Conditional::MINIFS
-MINUTE | DATE_AND_TIME | DateTimeExcel\TimeParts::minute
-MINVERSE | MATH_AND_TRIG | MathTrig\MatrixFunctions::inverse
-MIRR | FINANCIAL | Financial\CashFlow\Variable\Periodic::modifiedRate
-MMULT | MATH_AND_TRIG | MathTrig\MatrixFunctions::multiply
-MOD | MATH_AND_TRIG | MathTrig\Operations::mod
-MODE | STATISTICAL | Statistical\Averages::mode
-MODE.MULT | STATISTICAL | **Not yet Implemented**
-MODE.SNGL | STATISTICAL | Statistical\Averages::mode
-MONTH | DATE_AND_TIME | DateTimeExcel\DateParts::month
-MROUND | MATH_AND_TRIG | MathTrig\Round::multiple
-MULTINOMIAL | MATH_AND_TRIG | MathTrig\Factorial::multinomial
-MUNIT | MATH_AND_TRIG | MathTrig\MatrixFunctions::identity
-
-## N
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-N | INFORMATION | Information\Value::asNumber
-NA | INFORMATION | Information\ExcelError::NA
-NEGBINOM.DIST | STATISTICAL | **Not yet Implemented**
-NEGBINOMDIST | STATISTICAL | Statistical\Distributions\Binomial::negative
-NETWORKDAYS | DATE_AND_TIME | DateTimeExcel\NetworkDays::count
-NETWORKDAYS.INTL | DATE_AND_TIME | **Not yet Implemented**
-NOMINAL | FINANCIAL | Financial\InterestRate::nominal
-NORM.DIST | STATISTICAL | Statistical\Distributions\Normal::distribution
-NORM.INV | STATISTICAL | Statistical\Distributions\Normal::inverse
-NORM.S.DIST | STATISTICAL | Statistical\Distributions\StandardNormal::distribution
-NORM.S.INV | STATISTICAL | Statistical\Distributions\StandardNormal::inverse
-NORMDIST | STATISTICAL | Statistical\Distributions\Normal::distribution
-NORMINV | STATISTICAL | Statistical\Distributions\Normal::inverse
-NORMSDIST | STATISTICAL | Statistical\Distributions\StandardNormal::cumulative
-NORMSINV | STATISTICAL | Statistical\Distributions\StandardNormal::inverse
-NOT | LOGICAL | Logical\Operations::NOT
-NOW | DATE_AND_TIME | DateTimeExcel\Current::now
-NPER | FINANCIAL | Financial\CashFlow\Constant\Periodic::periods
-NPV | FINANCIAL | Financial\CashFlow\Variable\Periodic::presentValue
-NUMBERSTRING | TEXT_AND_DATA | **Not yet Implemented**
-NUMBERVALUE | TEXT_AND_DATA | TextData\Format::NUMBERVALUE
-
-## O
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-OCT2BIN | ENGINEERING | Engineering\ConvertOctal::toBinary
-OCT2DEC | ENGINEERING | Engineering\ConvertOctal::toDecimal
-OCT2HEX | ENGINEERING | Engineering\ConvertOctal::toHex
-ODD | MATH_AND_TRIG | MathTrig\Round::odd
-ODDFPRICE | FINANCIAL | **Not yet Implemented**
-ODDFYIELD | FINANCIAL | **Not yet Implemented**
-ODDLPRICE | FINANCIAL | **Not yet Implemented**
-ODDLYIELD | FINANCIAL | **Not yet Implemented**
-OFFSET | LOOKUP_AND_REFERENCE | LookupRef\Offset::OFFSET
-OR | LOGICAL | Logical\Operations::logicalOr
-
-## P
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-PDURATION | FINANCIAL | Financial\CashFlow\Single::periods
-PEARSON | STATISTICAL | Statistical\Trends::CORREL
-PERCENTILE | STATISTICAL | Statistical\Percentiles::PERCENTILE
-PERCENTILE.EXC | STATISTICAL | **Not yet Implemented**
-PERCENTILE.INC | STATISTICAL | Statistical\Percentiles::PERCENTILE
-PERCENTRANK | STATISTICAL | Statistical\Percentiles::PERCENTRANK
-PERCENTRANK.EXC | STATISTICAL | **Not yet Implemented**
-PERCENTRANK.INC | STATISTICAL | Statistical\Percentiles::PERCENTRANK
-PERMUT | STATISTICAL | Statistical\Permutations::PERMUT
-PERMUTATIONA | STATISTICAL | Statistical\Permutations::PERMUTATIONA
-PHI | STATISTICAL | **Not yet Implemented**
-PHONETIC | TEXT_AND_DATA | **Not yet Implemented**
-PI | MATH_AND_TRIG | pi
-PMT | FINANCIAL | Financial\CashFlow\Constant\Periodic\Payments::annuity
-POISSON | STATISTICAL | Statistical\Distributions\Poisson::distribution
-POISSON.DIST | STATISTICAL | Statistical\Distributions\Poisson::distribution
-POWER | MATH_AND_TRIG | MathTrig\Operations::power
-PPMT | FINANCIAL | Financial\CashFlow\Constant\Periodic\Payments::interestPayment
-PRICE | FINANCIAL | Financial\Securities\Price::price
-PRICEDISC | FINANCIAL | Financial\Securities\Price::priceDiscounted
-PRICEMAT | FINANCIAL | Financial\Securities\Price::priceAtMaturity
-PROB | STATISTICAL | **Not yet Implemented**
-PRODUCT | MATH_AND_TRIG | MathTrig\Operations::product
-PROPER | TEXT_AND_DATA | TextData\CaseConvert::proper
-PV | FINANCIAL | Financial\CashFlow\Constant\Periodic::presentValue
-
-## Q
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-QUARTILE | STATISTICAL | Statistical\Percentiles::QUARTILE
-QUARTILE.EXC | STATISTICAL | **Not yet Implemented**
-QUARTILE.INC | STATISTICAL | Statistical\Percentiles::QUARTILE
-QUOTIENT | MATH_AND_TRIG | MathTrig\Operations::quotient
-
-## R
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-RADIANS | MATH_AND_TRIG | MathTrig\Angle::toRadians
-RAND | MATH_AND_TRIG | MathTrig\Random::rand
-RANDARRAY | MATH_AND_TRIG | MathTrig\Random::randArray
-RANDBETWEEN | MATH_AND_TRIG | MathTrig\Random::randBetween
-RANK | STATISTICAL | Statistical\Percentiles::RANK
-RANK.AVG | STATISTICAL | **Not yet Implemented**
-RANK.EQ | STATISTICAL | Statistical\Percentiles::RANK
-RATE | FINANCIAL | Financial\CashFlow\Constant\Periodic\Interest::rate
-RECEIVED | FINANCIAL | Financial\Securities\Price::received
-REDUCE | LOGICAL | **Not yet Implemented**
-REPLACE | TEXT_AND_DATA | TextData\Replace::replace
-REPLACEB | TEXT_AND_DATA | TextData\Replace::replace
-REPT | TEXT_AND_DATA | TextData\Concatenate::builtinREPT
-RIGHT | TEXT_AND_DATA | TextData\Extract::right
-RIGHTB | TEXT_AND_DATA | TextData\Extract::right
-ROMAN | MATH_AND_TRIG | MathTrig\Roman::evaluate
-ROUND | MATH_AND_TRIG | MathTrig\Round::round
-ROUNDBAHTDOWN | MATH_AND_TRIG | **Not yet Implemented**
-ROUNDBAHTUP | MATH_AND_TRIG | **Not yet Implemented**
-ROUNDDOWN | MATH_AND_TRIG | MathTrig\Round::down
-ROUNDUP | MATH_AND_TRIG | MathTrig\Round::up
-ROW | LOOKUP_AND_REFERENCE | LookupRef\RowColumnInformation::ROW
-ROWS | LOOKUP_AND_REFERENCE | LookupRef\RowColumnInformation::ROWS
-RRI | FINANCIAL | Financial\CashFlow\Single::interestRate
-RSQ | STATISTICAL | Statistical\Trends::RSQ
-RTD | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-
-## S
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-SCAN | LOGICAL | **Not yet Implemented**
-SEARCH | TEXT_AND_DATA | TextData\Search::insensitive
-SEARCHB | TEXT_AND_DATA | TextData\Search::insensitive
-SEC | MATH_AND_TRIG | MathTrig\Trig\Secant::sec
-SECH | MATH_AND_TRIG | MathTrig\Trig\Secant::sech
-SECOND | DATE_AND_TIME | DateTimeExcel\TimeParts::second
-SEQUENCE | MATH_AND_TRIG | MathTrig\MatrixFunctions::sequence
-SERIESSUM | MATH_AND_TRIG | MathTrig\SeriesSum::evaluate
-SHEET | INFORMATION | **Not yet Implemented**
-SHEETS | INFORMATION | **Not yet Implemented**
-SIGN | MATH_AND_TRIG | MathTrig\Sign::evaluate
-SIN | MATH_AND_TRIG | MathTrig\Trig\Sine::sin
-SINGLE | MICROSOFT_INTERNAL | Internal\ExcelArrayPseudoFunctions::single
-SINH | MATH_AND_TRIG | MathTrig\Trig\Sine::sinh
-SKEW | STATISTICAL | Statistical\Deviations::skew
-SKEW.P | STATISTICAL | **Not yet Implemented**
-SLN | FINANCIAL | Financial\Depreciation::SLN
-SLOPE | STATISTICAL | Statistical\Trends::SLOPE
-SMALL | STATISTICAL | Statistical\Size::small
-SORT | LOOKUP_AND_REFERENCE | LookupRef\Sort::sort
-SORTBY | LOOKUP_AND_REFERENCE | LookupRef\Sort::sortBy
-SQRT | MATH_AND_TRIG | MathTrig\Sqrt::sqrt
-SQRTPI | MATH_AND_TRIG | MathTrig\Sqrt::pi
-STANDARDIZE | STATISTICAL | Statistical\Standardize::execute
-STDEV | STATISTICAL | Statistical\StandardDeviations::STDEV
-STDEV.P | STATISTICAL | Statistical\StandardDeviations::STDEVP
-STDEV.S | STATISTICAL | Statistical\StandardDeviations::STDEV
-STDEVA | STATISTICAL | Statistical\StandardDeviations::STDEVA
-STDEVP | STATISTICAL | Statistical\StandardDeviations::STDEVP
-STDEVPA | STATISTICAL | Statistical\StandardDeviations::STDEVPA
-STEYX | STATISTICAL | Statistical\Trends::STEYX
-SUBSTITUTE | TEXT_AND_DATA | TextData\Replace::substitute
-SUBTOTAL | MATH_AND_TRIG | MathTrig\Subtotal::evaluate
-SUM | MATH_AND_TRIG | MathTrig\Sum::sumErroringStrings
-SUMIF | MATH_AND_TRIG | Statistical\Conditional::SUMIF
-SUMIFS | MATH_AND_TRIG | Statistical\Conditional::SUMIFS
-SUMPRODUCT | MATH_AND_TRIG | MathTrig\Sum::product
-SUMSQ | MATH_AND_TRIG | MathTrig\SumSquares::sumSquare
-SUMX2MY2 | MATH_AND_TRIG | MathTrig\SumSquares::sumXSquaredMinusYSquared
-SUMX2PY2 | MATH_AND_TRIG | MathTrig\SumSquares::sumXSquaredPlusYSquared
-SUMXMY2 | MATH_AND_TRIG | MathTrig\SumSquares::sumXMinusYSquared
-SWITCH | LOGICAL | Logical\Conditional::statementSwitch
-SYD | FINANCIAL | Financial\Depreciation::SYD
-
-## T
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-T | TEXT_AND_DATA | TextData\Text::test
-T.DIST | STATISTICAL | **Not yet Implemented**
-T.DIST.2T | STATISTICAL | **Not yet Implemented**
-T.DIST.RT | STATISTICAL | **Not yet Implemented**
-T.INV | STATISTICAL | Statistical\Distributions\StudentT::inverse
-T.INV.2T | STATISTICAL | **Not yet Implemented**
-T.TEST | STATISTICAL | **Not yet Implemented**
-TAKE | LOOKUP_AND_REFERENCE | LookupRef\ChooseRowsEtc::take
-TAN | MATH_AND_TRIG | MathTrig\Trig\Tangent::tan
-TANH | MATH_AND_TRIG | MathTrig\Trig\Tangent::tanh
-TBILLEQ | FINANCIAL | Financial\TreasuryBill::bondEquivalentYield
-TBILLPRICE | FINANCIAL | Financial\TreasuryBill::price
-TBILLYIELD | FINANCIAL | Financial\TreasuryBill::yield
-TDIST | STATISTICAL | Statistical\Distributions\StudentT::distribution
-TEXT | TEXT_AND_DATA | TextData\Format::TEXTFORMAT
-TEXTAFTER | TEXT_AND_DATA | TextData\Extract::after
-TEXTBEFORE | TEXT_AND_DATA | TextData\Extract::before
-TEXTJOIN | TEXT_AND_DATA | TextData\Concatenate::TEXTJOIN
-TEXTSPLIT | TEXT_AND_DATA | TextData\Text::split
-THAIDAYOFWEEK | DATE_AND_TIME | **Not yet Implemented**
-THAIDIGIT | TEXT_AND_DATA | **Not yet Implemented**
-THAIMONTHOFYEAR | DATE_AND_TIME | **Not yet Implemented**
-THAINUMSOUND | TEXT_AND_DATA | **Not yet Implemented**
-THAINUMSTRING | TEXT_AND_DATA | **Not yet Implemented**
-THAISTRINGLENGTH | TEXT_AND_DATA | **Not yet Implemented**
-THAIYEAR | DATE_AND_TIME | **Not yet Implemented**
-TIME | DATE_AND_TIME | DateTimeExcel\Time::fromHMS
-TIMEVALUE | DATE_AND_TIME | DateTimeExcel\TimeValue::fromString
-TINV | STATISTICAL | Statistical\Distributions\StudentT::inverse
-TOCOL | LOOKUP_AND_REFERENCE | LookupRef\TorowTocol::tocol
-TODAY | DATE_AND_TIME | DateTimeExcel\Current::today
-TOROW | LOOKUP_AND_REFERENCE | LookupRef\TorowTocol::torow
-TRANSPOSE | LOOKUP_AND_REFERENCE | LookupRef\Matrix::transpose
-TREND | STATISTICAL | Statistical\Trends::TREND
-TRIM | TEXT_AND_DATA | TextData\Trim::spaces
-TRIMMEAN | STATISTICAL | Statistical\Averages\Mean::trim
-TRUE | LOGICAL | Logical\Boolean::TRUE
-TRUNC | MATH_AND_TRIG | MathTrig\Trunc::evaluate
-TTEST | STATISTICAL | **Not yet Implemented**
-TYPE | INFORMATION | Information\Value::type
-
-## U
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-UNICHAR | TEXT_AND_DATA | TextData\CharacterConvert::character
-UNICODE | TEXT_AND_DATA | TextData\CharacterConvert::code
-UNIQUE | LOOKUP_AND_REFERENCE | LookupRef\Unique::unique
-UPPER | TEXT_AND_DATA | TextData\CaseConvert::upper
-USDOLLAR | FINANCIAL | Financial\Dollar::format
-
-## V
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-VALUE | TEXT_AND_DATA | TextData\Format::VALUE
-VALUETOTEXT | TEXT_AND_DATA | TextData\Format::valueToText
-VAR | STATISTICAL | Statistical\Variances::VAR
-VAR.P | STATISTICAL | Statistical\Variances::VARP
-VAR.S | STATISTICAL | Statistical\Variances::VAR
-VARA | STATISTICAL | Statistical\Variances::VARA
-VARP | STATISTICAL | Statistical\Variances::VARP
-VARPA | STATISTICAL | Statistical\Variances::VARPA
-VDB | FINANCIAL | **Not yet Implemented**
-VLOOKUP | LOOKUP_AND_REFERENCE | LookupRef\VLookup::lookup
-VSTACK | LOOKUP_AND_REFERENCE | LookupRef\Vstack::vstack
-
-## W
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-WEBSERVICE | WEB | Web\Service::webService
-WEEKDAY | DATE_AND_TIME | DateTimeExcel\Week::day
-WEEKNUM | DATE_AND_TIME | DateTimeExcel\Week::number
-WEIBULL | STATISTICAL | Statistical\Distributions\Weibull::distribution
-WEIBULL.DIST | STATISTICAL | Statistical\Distributions\Weibull::distribution
-WORKDAY | DATE_AND_TIME | DateTimeExcel\WorkDay::date
-WORKDAY.INTL | DATE_AND_TIME | **Not yet Implemented**
-WRAPCOLS | MATH_AND_TRIG | **Not yet Implemented**
-WRAPROWS | MATH_AND_TRIG | **Not yet Implemented**
-
-## X
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-XIRR | FINANCIAL | Financial\CashFlow\Variable\NonPeriodic::rate
-XLOOKUP | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-XMATCH | LOOKUP_AND_REFERENCE | **Not yet Implemented**
-XNPV | FINANCIAL | Financial\CashFlow\Variable\NonPeriodic::presentValue
-XOR | LOGICAL | Logical\Operations::logicalXor
-
-## Y
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-YEAR | DATE_AND_TIME | DateTimeExcel\DateParts::year
-YEARFRAC | DATE_AND_TIME | DateTimeExcel\YearFrac::fraction
-YIELD | FINANCIAL | **Not yet Implemented**
-YIELDDISC | FINANCIAL | Financial\Securities\Yields::yieldDiscounted
-YIELDMAT | FINANCIAL | Financial\Securities\Yields::yieldAtMaturity
-
-## Z
-
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|-----------------------|--------------------------------------
-Z.TEST | STATISTICAL | Statistical\Distributions\StandardNormal::zTest
-ZTEST | STATISTICAL | Statistical\Distributions\StandardNormal::zTest
diff --git a/docs/references/function-list-by-name.md b/docs/references/function-list-by-name.md
index 35594a7109..a8caca6c79 100644
--- a/docs/references/function-list-by-name.md
+++ b/docs/references/function-list-by-name.md
@@ -1,659 +1,521 @@
# Function list by name
-A more compact list can be found [here](./function-list-by-name-compact.md)
-
-
## A
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-ABS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Absolute::evaluate
-ACCRINT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest::periodic
-ACCRINTM | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest::atMaturity
-ACOS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::acos
-ACOSH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::acosh
-ACOT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::acot
-ACOTH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::acoth
-ADDRESS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Address::cell
-AGGREGATE | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-AMORDEGRC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization::AMORDEGRC
-AMORLINC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization::AMORLINC
-ANCHORARRAY | CATEGORY_MICROSOFT_INTERNAL | \PhpOffice\PhpSpreadsheet\Calculation\Internal\ExcelArrayPseudoFunctions::anchorArray
-AND | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalAnd
-ARABIC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Arabic::evaluate
-AREAS | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
-ARRAYTOTEXT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::fromArray
-ASC | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-ASIN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::asin
-ASINH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::asinh
-ATAN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atan
-ATAN2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atan2
-ATANH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::atanh
-AVEDEV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::averageDeviations
-AVERAGE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::average
-AVERAGEA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::averageA
-AVERAGEIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::AVERAGEIF
-AVERAGEIFS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::AVERAGEIFS
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+ABS | CATEGORY_MATH_AND_TRIG | abs
+ACCRINT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINT
+ACCRINTM | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINTM
+ACOS | CATEGORY_MATH_AND_TRIG | acos
+ACOSH | CATEGORY_MATH_AND_TRIG | acosh
+ACOT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ACOT
+ACOTH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ACOTH
+ADDRESS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::CELL_ADDRESS
+AMORDEGRC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORDEGRC
+AMORLINC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORLINC
+AND | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd
+AREAS | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
+ASC | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
+ASIN | CATEGORY_MATH_AND_TRIG | asin
+ASINH | CATEGORY_MATH_AND_TRIG | asinh
+ATAN | CATEGORY_MATH_AND_TRIG | atan
+ATAN2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::REVERSE_ATAN2
+ATANH | CATEGORY_MATH_AND_TRIG | atanh
+AVEDEV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVEDEV
+AVERAGE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGE
+AVERAGEA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGEA
+AVERAGEIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::AVERAGEIF
+AVERAGEIFS | CATEGORY_STATISTICAL | **Not yet Implemented**
## B
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-BAHTTEXT | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-BASE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Base::evaluate
-BESSELI | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselI::BESSELI
-BESSELJ | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselJ::BESSELJ
-BESSELK | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselK::BESSELK
-BESSELY | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselY::BESSELY
-BETA.DIST | CATEGORY_STATISTICAL | **Not yet Implemented**
-BETA.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::inverse
-BETADIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::distribution
-BETAINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Beta::inverse
-BIN2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toDecimal
-BIN2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toHex
-BIN2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertBinary::toOctal
-BINOM.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::distribution
-BINOM.DIST.RANGE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::range
-BINOM.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::inverse
-BINOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::distribution
-BITAND | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITAND
-BITLSHIFT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITLSHIFT
-BITOR | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITOR
-BITRSHIFT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITRSHIFT
-BITXOR | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BitWise::BITXOR
-BYCOL | CATEGORY_LOGICAL | **Not yet Implemented**
-BYROW | CATEGORY_LOGICAL | **Not yet Implemented**
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+BAHTTEXT | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
+BESSELI | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELI
+BESSELJ | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELJ
+BESSELK | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELK
+BESSELY | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BESSELY
+BETADIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BETADIST
+BETAINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BETAINV
+BIN2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTODEC
+BIN2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTOHEX
+BIN2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::BINTOOCT
+BINOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::BINOMDIST
## C
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-CEILING | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::ceiling
-CEILING.MATH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::math
-CEILING.PRECISE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Ceiling::precise
-CELL | CATEGORY_INFORMATION | **Not yet Implemented**
-CHAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::character
-CHIDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionRightTail
-CHIINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionLeftTail
-CHISQ.DIST.RT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::distributionRightTail
-CHISQ.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseLeftTail
-CHISQ.INV.RT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::inverseRightTail
-CHISQ.TEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::test
-CHITEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared::test
-CHOOSE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Selection::CHOOSE
-CHOOSECOLS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::chooseCols
-CHOOSEROWS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::chooseRows
-CLEAN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Trim::nonPrintable
-CODE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::code
-COLUMN | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::COLUMN
-COLUMNS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::COLUMNS
-COMBIN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Combinations::withoutRepetition
-COMBINA | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Combinations::withRepetition
-COMPLEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::COMPLEX
-CONCAT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::CONCATENATE
-CONCATENATE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::actualCONCATENATE
-CONFIDENCE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence::CONFIDENCE
-CONFIDENCE.NORM | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence::CONFIDENCE
-CONFIDENCE.T | CATEGORY_STATISTICAL | **Not yet Implemented**
-CONVERT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertUOM::CONVERT
-CORREL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::CORREL
-COS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::cos
-COSH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosine::cosh
-COT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::cot
-COTH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cotangent::coth
-COUNT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNT
-COUNTA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNTA
-COUNTBLANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts::COUNTBLANK
-COUNTIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::COUNTIF
-COUNTIFS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::COUNTIFS
-COUPDAYBS | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYBS
-COUPDAYS | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYS
-COUPDAYSNC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPDAYSNC
-COUPNCD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPNCD
-COUPNUM | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPNUM
-COUPPCD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons::COUPPCD
-COVAR | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::COVAR
-COVARIANCE.P | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::COVAR
-COVARIANCE.S | CATEGORY_STATISTICAL | **Not yet Implemented**
-CRITBINOM | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::inverse
-CSC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosecant::csc
-CSCH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Cosecant::csch
-CUBEKPIMEMBER | CATEGORY_CUBE | **Not yet Implemented**
-CUBEMEMBER | CATEGORY_CUBE | **Not yet Implemented**
-CUBEMEMBERPROPERTY | CATEGORY_CUBE | **Not yet Implemented**
-CUBERANKEDMEMBER | CATEGORY_CUBE | **Not yet Implemented**
-CUBESET | CATEGORY_CUBE | **Not yet Implemented**
-CUBESETCOUNT | CATEGORY_CUBE | **Not yet Implemented**
-CUBEVALUE | CATEGORY_CUBE | **Not yet Implemented**
-CUMIPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative::interest
-CUMPRINC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative::principal
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+CEILING | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CEILING
+CELL | CATEGORY_INFORMATION | **Not yet Implemented**
+CHAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CHARACTER
+CHIDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CHIDIST
+CHIINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CHIINV
+CHITEST | CATEGORY_STATISTICAL | **Not yet Implemented**
+CHOOSE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::CHOOSE
+CLEAN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TRIMNONPRINTABLE
+CODE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::ASCIICODE
+COLUMN | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMN
+COLUMNS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::COLUMNS
+COMBIN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COMBIN
+COMPLEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::COMPLEX
+CONCAT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CONCATENATE
+CONCATENATE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CONCATENATE
+CONFIDENCE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CONFIDENCE
+CONVERT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::CONVERTUOM
+CORREL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CORREL
+COS | CATEGORY_MATH_AND_TRIG | cos
+COSH | CATEGORY_MATH_AND_TRIG | cosh
+COT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COT
+COTH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::COTH
+COUNT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNT
+COUNTA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTA
+COUNTBLANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTBLANK
+COUNTIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COUNTIF
+COUNTIFS | CATEGORY_STATISTICAL | **Not yet Implemented**
+COUPDAYBS | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYBS
+COUPDAYS | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYS
+COUPDAYSNC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYSNC
+COUPNCD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNCD
+COUPNUM | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNUM
+COUPPCD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPPCD
+COVAR | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::COVAR
+CRITBINOM | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CRITBINOM
+CSC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CSC
+CSCH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::CSCH
+CUBEKPIMEMBER | CATEGORY_CUBE | **Not yet Implemented**
+CUBEMEMBER | CATEGORY_CUBE | **Not yet Implemented**
+CUBEMEMBERPROPERTY | CATEGORY_CUBE | **Not yet Implemented**
+CUBERANKEDMEMBER | CATEGORY_CUBE | **Not yet Implemented**
+CUBESET | CATEGORY_CUBE | **Not yet Implemented**
+CUBESETCOUNT | CATEGORY_CUBE | **Not yet Implemented**
+CUBEVALUE | CATEGORY_CUBE | **Not yet Implemented**
+CUMIPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMIPMT
+CUMPRINC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMPRINC
## D
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-DATE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Date::fromYMD
-DATEDIF | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Difference::interval
-DATESTRING | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-DATEVALUE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateValue::fromString
-DAVERAGE | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DAverage::evaluate
-DAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::day
-DAYS | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Days::between
-DAYS360 | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Days360::between
-DB | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::DB
-DBCS | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-DCOUNT | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DCount::evaluate
-DCOUNTA | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DCountA::evaluate
-DDB | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::DDB
-DEC2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toBinary
-DEC2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toHex
-DEC2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertDecimal::toOctal
-DECIMAL | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-DEGREES | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Angle::toDegrees
-DELTA | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Compare::DELTA
-DEVSQ | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::sumSquares
-DGET | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DGet::evaluate
-DISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates::discount
-DMAX | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DMax::evaluate
-DMIN | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DMin::evaluate
-DOLLAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::DOLLAR
-DOLLARDE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::decimal
-DOLLARFR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::fractional
-DPRODUCT | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DProduct::evaluate
-DROP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::drop
-DSTDEV | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DStDev::evaluate
-DSTDEVP | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DStDevP::evaluate
-DSUM | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DSum::evaluate
-DURATION | CATEGORY_FINANCIAL | **Not yet Implemented**
-DVAR | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DVar::evaluate
-DVARP | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database\DVarP::evaluate
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+DATE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATE
+DATEDIF | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATEDIF
+DATEVALUE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATEVALUE
+DAVERAGE | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DAVERAGE
+DAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DAYOFMONTH
+DAYS360 | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DAYS360
+DB | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DB
+DCOUNT | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DCOUNT
+DCOUNTA | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DCOUNTA
+DDB | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DDB
+DEC2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOBIN
+DEC2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOHEX
+DEC2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DECTOOCT
+DEGREES | CATEGORY_MATH_AND_TRIG | rad2deg
+DELTA | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::DELTA
+DEVSQ | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::DEVSQ
+DGET | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DGET
+DISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DISC
+DMAX | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DMAX
+DMIN | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DMIN
+DOLLAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::DOLLAR
+DOLLARDE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARDE
+DOLLARFR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARFR
+DPRODUCT | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DPRODUCT
+DSTDEV | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSTDEV
+DSTDEVP | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSTDEVP
+DSUM | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DSUM
+DURATION | CATEGORY_FINANCIAL | **Not yet Implemented**
+DVAR | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DVAR
+DVARP | CATEGORY_DATABASE | \PhpOffice\PhpSpreadsheet\Calculation\Database::DVARP
## E
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-ECMA.CEILING | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-EDATE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Month::adjust
-EFFECT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate::effective
-ENCODEURL | CATEGORY_WEB | \PhpOffice\PhpSpreadsheet\Calculation\Web\Service::urlEncode
-EOMONTH | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Month::lastDay
-ERF | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Erf::ERF
-ERF.PRECISE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Erf::ERFPRECISE
-ERFC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ErfC::ERFC
-ERFC.PRECISE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ErfC::ERFC
-ERROR.TYPE | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError::type
-EVEN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::even
-EXACT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::exact
-EXP | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Exp::evaluate
-EXPAND | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::expand
-EXPON.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Exponential::distribution
-EXPONDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Exponential::distribution
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+EDATE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::EDATE
+EFFECT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::EFFECT
+EOMONTH | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::EOMONTH
+ERF | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERF
+ERF.PRECISE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFPRECISE
+ERFC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFC
+ERFC.PRECISE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::ERFC
+ERROR.TYPE | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::ERROR_TYPE
+EVEN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::EVEN
+EXACT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::EXACT
+EXP | CATEGORY_MATH_AND_TRIG | exp
+EXPONDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::EXPONDIST
## F
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-F.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\F::distribution
-F.DIST.RT | CATEGORY_STATISTICAL | **Not yet Implemented**
-F.INV | CATEGORY_STATISTICAL | **Not yet Implemented**
-F.INV.RT | CATEGORY_STATISTICAL | **Not yet Implemented**
-F.TEST | CATEGORY_STATISTICAL | **Not yet Implemented**
-FACT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::fact
-FACTDOUBLE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::factDouble
-FALSE | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean::FALSE
-FDIST | CATEGORY_STATISTICAL | **Not yet Implemented**
-FILTER | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Filter::filter
-FILTERXML | CATEGORY_WEB | **Not yet Implemented**
-FIND | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::sensitive
-FINDB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::sensitive
-FINV | CATEGORY_STATISTICAL | **Not yet Implemented**
-FISHER | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Fisher::distribution
-FISHERINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Fisher::inverse
-FIXED | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::FIXEDFORMAT
-FLOOR | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::floor
-FLOOR.MATH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::math
-FLOOR.PRECISE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Floor::precise
-FORECAST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::FORECAST
-FORECAST.ETS | CATEGORY_STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.CONFINT | CATEGORY_STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.SEASONALITY | CATEGORY_STATISTICAL | **Not yet Implemented**
-FORECAST.ETS.STAT | CATEGORY_STATISTICAL | **Not yet Implemented**
-FORECAST.LINEAR | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::FORECAST
-FORMULATEXT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Formula::text
-FREQUENCY | CATEGORY_STATISTICAL | **Not yet Implemented**
-FTEST | CATEGORY_STATISTICAL | **Not yet Implemented**
-FV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::futureValue
-FVSCHEDULE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::futureValue
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+FACT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FACT
+FACTDOUBLE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FACTDOUBLE
+FALSE | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::FALSE
+FDIST | CATEGORY_STATISTICAL | **Not yet Implemented**
+FIND | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHSENSITIVE
+FINDB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHSENSITIVE
+FINV | CATEGORY_STATISTICAL | **Not yet Implemented**
+FISHER | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FISHER
+FISHERINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FISHERINV
+FIXED | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::FIXEDFORMAT
+FLOOR | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::FLOOR
+FORECAST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::FORECAST
+FORMULATEXT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::FORMULATEXT
+FREQUENCY | CATEGORY_STATISTICAL | **Not yet Implemented**
+FTEST | CATEGORY_STATISTICAL | **Not yet Implemented**
+FV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::FV
+FVSCHEDULE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::FVSCHEDULE
## G
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-GAMMA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::gamma
-GAMMA.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::distribution
-GAMMA.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::inverse
-GAMMADIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::distribution
-GAMMAINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::inverse
-GAMMALN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::ln
-GAMMALN.PRECISE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Gamma::ln
-GAUSS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::gauss
-GCD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Gcd::evaluate
-GEOMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::geometric
-GESTEP | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Compare::GESTEP
-GETPIVOTDATA | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
-GROUPBY | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
-GROWTH | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::GROWTH
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+GAMMADIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMADIST
+GAMMAINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMAINV
+GAMMALN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GAMMALN
+GCD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::GCD
+GEOMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GEOMEAN
+GESTEP | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::GESTEP
+GETPIVOTDATA | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
+GROWTH | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::GROWTH
## H
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-HARMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::harmonic
-HEX2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toBinary
-HEX2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toDecimal
-HEX2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertHex::toOctal
-HLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\HLookup::lookup
-HOUR | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::hour
-HSTACK | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Hstack::hstack
-HYPERLINK | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Hyperlink::set
-HYPGEOM.DIST | CATEGORY_STATISTICAL | **Not yet Implemented**
-HYPGEOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\HyperGeometric::distribution
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+HARMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::HARMEAN
+HEX2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTOBIN
+HEX2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTODEC
+HEX2OCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::HEXTOOCT
+HLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HLOOKUP
+HOUR | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::HOUROFDAY
+HYPERLINK | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::HYPERLINK
+HYPGEOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::HYPGEOMDIST
## I
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-IF | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::statementIf
-IFERROR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFERROR
-IFNA | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFNA
-IFS | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::IFS
-IMABS | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMABS
-IMAGINARY | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::IMAGINARY
-IMARGUMENT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMARGUMENT
-IMCONJUGATE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCONJUGATE
-IMCOS | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOS
-IMCOSH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOSH
-IMCOT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCOT
-IMCSC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCSC
-IMCSCH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMCSCH
-IMDIV | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMDIV
-IMEXP | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMEXP
-IMLN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLN
-IMLOG10 | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLOG10
-IMLOG2 | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMLOG2
-IMPOWER | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMPOWER
-IMPRODUCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMPRODUCT
-IMREAL | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\Complex::IMREAL
-IMSEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSEC
-IMSECH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSECH
-IMSIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSIN
-IMSINH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSINH
-IMSQRT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMSQRT
-IMSUB | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMSUB
-IMSUM | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations::IMSUM
-IMTAN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMTAN
-INDEX | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix::index
-INDIRECT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Indirect::INDIRECT
-INFO | CATEGORY_INFORMATION | **Not yet Implemented**
-INT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\IntClass::evaluate
-INTERCEPT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::INTERCEPT
-INTRATE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates::interest
-IPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::payment
-IRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::rate
-ISBLANK | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isBlank
-ISERR | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isErr
-ISERROR | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isError
-ISEVEN | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isEven
-ISFORMULA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isFormula
-ISLOGICAL | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isLogical
-ISNA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isNa
-ISNONTEXT | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isNonText
-ISNUMBER | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isNumber
-ISO.CEILING | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-ISODD | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isOdd
-ISOMITTED | CATEGORY_INFORMATION | **Not yet Implemented**
-ISOWEEKNUM | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::isoWeekNumber
-ISPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::schedulePayment
-ISREF | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isRef
-ISTEXT | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isText
-ISTHAIDIGIT | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+IF | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::STATEMENT_IF
+IFERROR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::IFERROR
+IMABS | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMABS
+IMAGINARY | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMAGINARY
+IMARGUMENT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMARGUMENT
+IMCONJUGATE | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCONJUGATE
+IMCOS | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOS
+IMCOSH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOSH
+IMCOT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCOT
+IMCSC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCSC
+IMCSCH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMCSCH
+IMDIV | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMDIV
+IMEXP | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMEXP
+IMLN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLN
+IMLOG10 | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLOG10
+IMLOG2 | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMLOG2
+IMPOWER | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMPOWER
+IMPRODUCT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMPRODUCT
+IMREAL | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMREAL
+IMSEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSEC
+IMSECH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSECH
+IMSIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSIN
+IMSINH | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSINH
+IMSQRT | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSQRT
+IMSUB | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSUB
+IMSUM | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMSUM
+IMTAN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::IMTAN
+INDEX | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDEX
+INDIRECT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::INDIRECT
+INFO | CATEGORY_INFORMATION | **Not yet Implemented**
+INT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::INT
+INTERCEPT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::INTERCEPT
+INTRATE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::INTRATE
+IPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::IPMT
+IRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::IRR
+ISBLANK | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_BLANK
+ISERR | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ERR
+ISERROR | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ERROR
+ISEVEN | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_EVEN
+ISFORMULA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::ISFORMULA
+ISLOGICAL | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_LOGICAL
+ISNA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NA
+ISNONTEXT | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NONTEXT
+ISNUMBER | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_NUMBER
+ISODD | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_ODD
+ISOWEEKNUM | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::ISOWEEKNUM
+ISPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::ISPMT
+ISREF | CATEGORY_INFORMATION | **Not yet Implemented**
+ISTEXT | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::IS_TEXT
## J
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-JIS | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+JIS | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
## K
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-KURT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::kurtosis
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+KURT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::KURT
## L
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-LAMBDA | CATEGORY_LOGICAL | **Not yet Implemented**
-LARGE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Size::large
-LCM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Lcm::evaluate
-LEFT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::left
-LEFTB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::left
-LEN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::length
-LENB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::length
-LET | CATEGORY_LOGICAL | **Not yet Implemented**
-LINEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::LINEST
-LN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::natural
-LOG | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::withBase
-LOG10 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Logarithms::base10
-LOGEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::LOGEST
-LOGINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::inverse
-LOGNORM.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::distribution
-LOGNORM.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::inverse
-LOGNORMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\LogNormal::cumulative
-LOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Lookup::lookup
-LOWER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::lower
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+LARGE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LARGE
+LCM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::LCM
+LEFT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LEFT
+LEFTB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LEFT
+LEN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::STRINGLENGTH
+LENB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::STRINGLENGTH
+LINEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LINEST
+LN | CATEGORY_MATH_AND_TRIG | log
+LOG | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::LOG_BASE
+LOG10 | CATEGORY_MATH_AND_TRIG | log10
+LOGEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGEST
+LOGINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGINV
+LOGNORMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::LOGNORMDIST
+LOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::LOOKUP
+LOWER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::LOWERCASE
## M
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-MAKEARRAY | CATEGORY_LOGICAL | **Not yet Implemented**
-MAP | CATEGORY_LOGICAL | **Not yet Implemented**
-MATCH | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ExcelMatch::MATCH
-MAX | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::max
-MAXA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum::maxA
-MAXIFS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::MAXIFS
-MDETERM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::determinant
-MDURATION | CATEGORY_FINANCIAL | **Not yet Implemented**
-MEDIAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::median
-MEDIANIF | CATEGORY_STATISTICAL | **Not yet Implemented**
-MID | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::mid
-MIDB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::mid
-MIN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::min
-MINA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum::minA
-MINIFS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::MINIFS
-MINUTE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::minute
-MINVERSE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::inverse
-MIRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::modifiedRate
-MMULT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::multiply
-MOD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::mod
-MODE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::mode
-MODE.MULT | CATEGORY_STATISTICAL | **Not yet Implemented**
-MODE.SNGL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages::mode
-MONTH | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::month
-MROUND | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::multiple
-MULTINOMIAL | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Factorial::multinomial
-MUNIT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::identity
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+MATCH | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::MATCH
+MAX | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAX
+MAXA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAXA
+MAXIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MAXIF
+MDETERM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MDETERM
+MDURATION | CATEGORY_FINANCIAL | **Not yet Implemented**
+MEDIAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MEDIAN
+MEDIANIF | CATEGORY_STATISTICAL | **Not yet Implemented**
+MID | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::MID
+MIDB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::MID
+MIN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MIN
+MINA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MINA
+MINIF | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MINIF
+MINUTE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::MINUTE
+MINVERSE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MINVERSE
+MIRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::MIRR
+MMULT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MMULT
+MOD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MOD
+MODE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MODE
+MODE.SNGL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::MODE
+MONTH | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::MONTHOFYEAR
+MROUND | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MROUND
+MULTINOMIAL | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::MULTINOMIAL
## N
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-N | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::asNumber
-NA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError::NA
-NEGBINOM.DIST | CATEGORY_STATISTICAL | **Not yet Implemented**
-NEGBINOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Binomial::negative
-NETWORKDAYS | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\NetworkDays::count
-NETWORKDAYS.INTL | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-NOMINAL | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate::nominal
-NORM.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::distribution
-NORM.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::inverse
-NORM.S.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::distribution
-NORM.S.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::inverse
-NORMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::distribution
-NORMINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Normal::inverse
-NORMSDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::cumulative
-NORMSINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::inverse
-NOT | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::NOT
-NOW | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Current::now
-NPER | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::periods
-NPV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic::presentValue
-NUMBERSTRING | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-NUMBERVALUE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::NUMBERVALUE
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+N | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::N
+NA | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::NA
+NEGBINOMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NEGBINOMDIST
+NETWORKDAYS | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::NETWORKDAYS
+NOMINAL | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NOMINAL
+NORMDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMDIST
+NORMINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMINV
+NORMSDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMSDIST
+NORMSINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::NORMSINV
+NOT | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::NOT
+NOW | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATETIMENOW
+NPER | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NPER
+NPV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::NPV
+NUMBERVALUE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::NUMBERVALUE
## O
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-OCT2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toBinary
-OCT2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toDecimal
-OCT2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ConvertOctal::toHex
-ODD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::odd
-ODDFPRICE | CATEGORY_FINANCIAL | **Not yet Implemented**
-ODDFYIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
-ODDLPRICE | CATEGORY_FINANCIAL | **Not yet Implemented**
-ODDLYIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
-OFFSET | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset::OFFSET
-OR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalOr
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+OCT2BIN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTOBIN
+OCT2DEC | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTODEC
+OCT2HEX | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering::OCTTOHEX
+ODD | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ODD
+ODDFPRICE | CATEGORY_FINANCIAL | **Not yet Implemented**
+ODDFYIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
+ODDLPRICE | CATEGORY_FINANCIAL | **Not yet Implemented**
+ODDLYIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
+OFFSET | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::OFFSET
+OR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalOr
## P
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-PDURATION | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::periods
-PEARSON | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::CORREL
-PERCENTILE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTILE
-PERCENTILE.EXC | CATEGORY_STATISTICAL | **Not yet Implemented**
-PERCENTILE.INC | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTILE
-PERCENTRANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTRANK
-PERCENTRANK.EXC | CATEGORY_STATISTICAL | **Not yet Implemented**
-PERCENTRANK.INC | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::PERCENTRANK
-PERMUT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations::PERMUT
-PERMUTATIONA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations::PERMUTATIONA
-PHI | CATEGORY_STATISTICAL | **Not yet Implemented**
-PHONETIC | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-PI | CATEGORY_MATH_AND_TRIG | pi
-PMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments::annuity
-POISSON | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Poisson::distribution
-POISSON.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Poisson::distribution
-POWER | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::power
-PPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments::interestPayment
-PRICE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::price
-PRICEDISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::priceDiscounted
-PRICEMAT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::priceAtMaturity
-PROB | CATEGORY_STATISTICAL | **Not yet Implemented**
-PRODUCT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::product
-PROPER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::proper
-PV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic::presentValue
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+PDURATION | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PDURATION
+PEARSON | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::CORREL
+PERCENTILE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERCENTILE
+PERCENTRANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERCENTRANK
+PERMUT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::PERMUT
+PHONETIC | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
+PI | CATEGORY_MATH_AND_TRIG | pi
+PMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PMT
+POISSON | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::POISSON
+POWER | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::POWER
+PPMT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PPMT
+PRICE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICE
+PRICEDISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEDISC
+PRICEMAT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEMAT
+PROB | CATEGORY_STATISTICAL | **Not yet Implemented**
+PRODUCT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::PRODUCT
+PROPER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::PROPERCASE
+PV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::PV
## Q
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-QUARTILE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::QUARTILE
-QUARTILE.EXC | CATEGORY_STATISTICAL | **Not yet Implemented**
-QUARTILE.INC | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::QUARTILE
-QUOTIENT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Operations::quotient
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+QUARTILE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::QUARTILE
+QUOTIENT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::QUOTIENT
## R
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-RADIANS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Angle::toRadians
-RAND | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::rand
-RANDARRAY | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::randArray
-RANDBETWEEN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Random::randBetween
-RANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::RANK
-RANK.AVG | CATEGORY_STATISTICAL | **Not yet Implemented**
-RANK.EQ | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Percentiles::RANK
-RATE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest::rate
-RECEIVED | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price::received
-REDUCE | CATEGORY_LOGICAL | **Not yet Implemented**
-REPLACE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::replace
-REPLACEB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::replace
-REPT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::builtinREPT
-RIGHT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::right
-RIGHTB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::right
-ROMAN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Roman::evaluate
-ROUND | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::round
-ROUNDBAHTDOWN | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-ROUNDBAHTUP | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-ROUNDDOWN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::down
-ROUNDUP | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Round::up
-ROW | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::ROW
-ROWS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation::ROWS
-RRI | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single::interestRate
-RSQ | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::RSQ
-RTD | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+RADIANS | CATEGORY_MATH_AND_TRIG | deg2rad
+RAND | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::RAND
+RANDBETWEEN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::RAND
+RANK | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::RANK
+RATE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RATE
+RECEIVED | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RECEIVED
+REPLACE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::REPLACE
+REPLACEB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::REPLACE
+REPT | CATEGORY_TEXT_AND_DATA | str_repeat
+RIGHT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RIGHT
+RIGHTB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RIGHT
+ROMAN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROMAN
+ROUND | CATEGORY_MATH_AND_TRIG | round
+ROUNDDOWN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROUNDDOWN
+ROUNDUP | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::ROUNDUP
+ROW | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROW
+ROWS | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::ROWS
+RRI | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::RRI
+RSQ | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::RSQ
+RTD | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
## S
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-SCAN | CATEGORY_LOGICAL | **Not yet Implemented**
-SEARCH | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::insensitive
-SEARCHB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Search::insensitive
-SEC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Secant::sec
-SECH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Secant::sech
-SECOND | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeParts::second
-SEQUENCE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\MatrixFunctions::sequence
-SERIESSUM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SeriesSum::evaluate
-SHEET | CATEGORY_INFORMATION | **Not yet Implemented**
-SHEETS | CATEGORY_INFORMATION | **Not yet Implemented**
-SIGN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sign::evaluate
-SIN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::sin
-SINGLE | CATEGORY_MICROSOFT_INTERNAL | \PhpOffice\PhpSpreadsheet\Calculation\Internal\ExcelArrayPseudoFunctions::single
-SINH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Sine::sinh
-SKEW | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Deviations::skew
-SKEW.P | CATEGORY_STATISTICAL | **Not yet Implemented**
-SLN | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::SLN
-SLOPE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::SLOPE
-SMALL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Size::small
-SORT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Sort::sort
-SORTBY | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Sort::sortBy
-SQRT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sqrt::sqrt
-SQRTPI | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sqrt::pi
-STANDARDIZE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Standardize::execute
-STDEV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEV
-STDEV.P | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVP
-STDEV.S | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEV
-STDEVA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVA
-STDEVP | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVP
-STDEVPA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations::STDEVPA
-STEYX | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::STEYX
-SUBSTITUTE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Replace::substitute
-SUBTOTAL | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Subtotal::evaluate
-SUM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::sumErroringStrings
-SUMIF | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIF
-SUMIFS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIFS
-SUMPRODUCT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Sum::product
-SUMSQ | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumSquare
-SUMX2MY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXSquaredMinusYSquared
-SUMX2PY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXSquaredPlusYSquared
-SUMXMY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\SumSquares::sumXMinusYSquared
-SWITCH | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional::statementSwitch
-SYD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation::SYD
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+SEARCH | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHINSENSITIVE
+SEARCHB | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SEARCHINSENSITIVE
+SEC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SEC
+SECH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SECH
+SECOND | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::SECOND
+SERIESSUM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SERIESSUM
+SIGN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SIGN
+SIN | CATEGORY_MATH_AND_TRIG | sin
+SINH | CATEGORY_MATH_AND_TRIG | sinh
+SKEW | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SKEW
+SLN | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::SLN
+SLOPE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SLOPE
+SMALL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::SMALL
+SQRT | CATEGORY_MATH_AND_TRIG | sqrt
+SQRTPI | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SQRTPI
+STANDARDIZE | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STANDARDIZE
+STDEV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEV
+STDEV.S | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEV
+STDEV.P | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVP
+STDEVA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVA
+STDEVP | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVP
+STDEVPA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STDEVPA
+STEYX | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::STEYX
+SUBSTITUTE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::SUBSTITUTE
+SUBTOTAL | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUBTOTAL
+SUM | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUM
+SUMIF | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMIF
+SUMIFS | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMIFS
+SUMPRODUCT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMPRODUCT
+SUMSQ | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMSQ
+SUMX2MY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMX2MY2
+SUMX2PY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMX2PY2
+SUMXMY2 | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::SUMXMY2
+SYD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::SYD
## T
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-T | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::test
-T.DIST | CATEGORY_STATISTICAL | **Not yet Implemented**
-T.DIST.2T | CATEGORY_STATISTICAL | **Not yet Implemented**
-T.DIST.RT | CATEGORY_STATISTICAL | **Not yet Implemented**
-T.INV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::inverse
-T.INV.2T | CATEGORY_STATISTICAL | **Not yet Implemented**
-T.TEST | CATEGORY_STATISTICAL | **Not yet Implemented**
-TAKE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\ChooseRowsEtc::take
-TAN | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::tan
-TANH | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trig\Tangent::tanh
-TBILLEQ | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::bondEquivalentYield
-TBILLPRICE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::price
-TBILLYIELD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill::yield
-TDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::distribution
-TEXT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::TEXTFORMAT
-TEXTAFTER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::after
-TEXTBEFORE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Extract::before
-TEXTJOIN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Concatenate::TEXTJOIN
-TEXTSPLIT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::split
-THAIDAYOFWEEK | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-THAIDIGIT | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-THAIMONTHOFYEAR | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-THAINUMSOUND | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-THAINUMSTRING | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-THAISTRINGLENGTH | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
-THAIYEAR | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-TIME | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Time::fromHMS
-TIMEVALUE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\TimeValue::fromString
-TINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StudentT::inverse
-TOCOL | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\TorowTocol::tocol
-TODAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Current::today
-TOROW | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\TorowTocol::torow
-TRANSPOSE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix::transpose
-TREND | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::TREND
-TRIM | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Trim::spaces
-TRIMMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages\Mean::trim
-TRUE | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean::TRUE
-TRUNC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Trunc::evaluate
-TTEST | CATEGORY_STATISTICAL | **Not yet Implemented**
-TYPE | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::type
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+T | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::RETURNSTRING
+TAN | CATEGORY_MATH_AND_TRIG | tan
+TANH | CATEGORY_MATH_AND_TRIG | tanh
+TBILLEQ | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLEQ
+TBILLPRICE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLPRICE
+TBILLYIELD | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLYIELD
+TDIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TDIST
+TEXT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TEXTFORMAT
+TEXTJOIN | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TEXTJOIN
+TIME | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::TIME
+TIMEVALUE | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::TIMEVALUE
+TINV | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TINV
+TODAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::DATENOW
+TRANSPOSE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::TRANSPOSE
+TREND | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TREND
+TRIM | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::TRIMSPACES
+TRIMMEAN | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::TRIMMEAN
+TRUE | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::TRUE
+TRUNC | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::TRUNC
+TTEST | CATEGORY_STATISTICAL | **Not yet Implemented**
+TYPE | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Functions::TYPE
## U
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-UNICHAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::character
-UNICODE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::code
-UNIQUE | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Unique::unique
-UPPER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CaseConvert::upper
-USDOLLAR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar::format
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+UNICHAR | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::CHARACTER
+UNICODE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::ASCIICODE
+UPPER | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::UPPERCASE
+USDOLLAR | CATEGORY_FINANCIAL | **Not yet Implemented**
## V
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-VALUE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::VALUE
-VALUETOTEXT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::valueToText
-VAR | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VAR
-VAR.P | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARP
-VAR.S | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VAR
-VARA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARA
-VARP | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARP
-VARPA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances::VARPA
-VDB | CATEGORY_FINANCIAL | **Not yet Implemented**
-VLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\VLookup::lookup
-VSTACK | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Vstack::vstack
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+VALUE | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData::VALUE
+VAR | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARFunc
+VAR.P | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARP
+VAR.S | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARFunc
+VARA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARA
+VARP | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARP
+VARPA | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::VARPA
+VDB | CATEGORY_FINANCIAL | **Not yet Implemented**
+VLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::VLOOKUP
## W
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-WEBSERVICE | CATEGORY_WEB | \PhpOffice\PhpSpreadsheet\Calculation\Web\Service::webService
-WEEKDAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::day
-WEEKNUM | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\Week::number
-WEIBULL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Weibull::distribution
-WEIBULL.DIST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\Weibull::distribution
-WORKDAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\WorkDay::date
-WORKDAY.INTL | CATEGORY_DATE_AND_TIME | **Not yet Implemented**
-WRAPCOLS | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
-WRAPROWS | CATEGORY_MATH_AND_TRIG | **Not yet Implemented**
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+WEEKDAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WEEKDAY
+WEEKNUM | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WEEKNUM
+WEIBULL | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::WEIBULL
+WORKDAY | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::WORKDAY
## X
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-XIRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic::rate
-XLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
-XMATCH | CATEGORY_LOOKUP_AND_REFERENCE | **Not yet Implemented**
-XNPV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic::presentValue
-XOR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations::logicalXor
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+XIRR | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::XIRR
+XNPV | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::XNPV
+XOR | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalXor
+
## Y
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-YEAR | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\DateParts::year
-YEARFRAC | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTimeExcel\YearFrac::fraction
-YIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
-YIELDDISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields::yieldDiscounted
-YIELDMAT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields::yieldAtMaturity
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+YEAR | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::YEAR
+YEARFRAC | CATEGORY_DATE_AND_TIME | \PhpOffice\PhpSpreadsheet\Calculation\DateTime::YEARFRAC
+YIELD | CATEGORY_FINANCIAL | **Not yet Implemented**
+YIELDDISC | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDDISC
+YIELDMAT | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDMAT
## Z
-Excel Function | Category | PhpSpreadsheet Function
--------------------------|--------------------------------|--------------------------------------
-Z.TEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::zTest
-ZTEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal::zTest
+Excel Function | Category | PhpSpreadsheet Function
+--------------------|--------------------------------|-------------------------------------------
+ZTEST | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical::ZTEST
diff --git a/docs/topics/Behind the Mask.md b/docs/topics/Behind the Mask.md
deleted file mode 100644
index ba77fcc4e9..0000000000
--- a/docs/topics/Behind the Mask.md
+++ /dev/null
@@ -1,837 +0,0 @@
-# Behind the Mask
-
-When we look at a spreadsheet in MS Excel, we normally see it neatly formatted so that it is easy for a human to read.
-
-Internally, that spreadsheet comprises a set of values that are normally either numbers or text (occasionally boolean `TRUE` or `FALSE`); or a formula that results in a number, text or boolean value. Unlike PHP, MS Excel doesn't differentiate between `integer` or `float`; but all numbers can be presented as integer or with decimals, as dates or percentages, as currency, even made to look like telephone numbers.
-A zero value can be made to look like `0` or `0.00`, like `-`, or even like a text string `zero`. Positive values can be displayed in one colour, negative values in another.
-
-
-Behind this Stock Portfolio table example, with the exception of the headings and the stock symbols, every value is a number; but each column is rendered in a manner that provides meaning to our human eye -
-`Purchase Date` as a day-month-year date; `Purchase Price` and `Current Price` as monetary values with a currency code; `Purchase Quantity` as an integer value and `Difference` as a float with 2 decimals; `% Return` as a percentage; and `Profit/Loss` as a monetary value with a currency code, thousands separator, and negative values highlighted in red; `Stdev` with 3 decimals -
-and all styled by using a Number Format Mask.
-
-## Reading a Cell Value
-
-PhpSpreadsheet provides three methods for reading a Cell value.
-If we use the Cell's `getValue()` method, we are retrieving the underlying value (or the formula) for that cell. If the Cell contains a formula, then we can use the `getCalculatedValue()` method to see the result of evaluating that formula. If we want to see the value as it is displayed in MS Excel, then we need to use `getFormattedValue()`.
-
-Reading Cells from the Worksheet shown above:
-```php
-var_dump($worksheet->getCell('C4')->getValue());
-var_dump($worksheet->getCell('C4')->getCalculatedValue());
-var_dump($worksheet->getCell('C4')->getFormattedValue());
-
-var_dump($worksheet->getCell('H4')->getValue());
-var_dump($worksheet->getCell('H4')->getCalculatedValue());
-var_dump($worksheet->getCell('H4')->getFormattedValue());
-```
-we see the different results for cell `C4` (a simple numeric value formatted as a Currency) and cell `H4` (a formula that evaluates to a numeric value, and formatted as a Currency):
-```
-float(26.19)
-float(26.19)
-string(9) "€ 26.19"
-
-string(8) "=$F4*$D4"
-float(-170)
-string(11) "€ -170.00"
-```
-Note that getting the formatted value will always evaluate a formula to render the result.
-
-### Reading a Cell's Formatting Mask
-
-PhpSpreadsheet also provides methods that allow us to look at the format mask itself:
-```php
-var_dump($worksheet->getCell('C4')
- ->getStyle()->getNumberFormat()->getFormatCode());
-
-var_dump($worksheet->getCell('H4')
- ->getStyle()->getNumberFormat()->getFormatCode());
-```
-and we can see the Format Masks for those cells:
-```
-string(20) "[$€-413]\ #,##0.00"
-
-string(48) "[$€-413]\ #,##0.00;[Red][$€-413]\ \-#,##0.00"
-```
-> **Note**: that the space and sign in the mask are non-breaking characters, so they are rendered to output as "\ " and "\-" respectively when var_dumped. This prevents breaking the displayed value across two lines.
-
-## Setting a Cell's Formatting Mask
-
-When you are using a spreadsheet application like MS Excel, the application will try to decide what Format Mask should be used for a cell as you enter the value, based on that value and your locale settings; and with varying degrees of success.
-If the value looks like a Currency, then it will be converted to a number and an appropriate Currency Mask set; similarly if you type something that looks like a percentage; and it is often a joke that Excel identifies many values as Dates (even if that was never the intent), and sets a Date Format Mask.
-The default Mask if no specific type can be identified from the value is "General".
-
-PhpSpreadsheet doesn't do this by default. If you enter a value in a cell, then it will not convert that value from a string containing a currency symbol to a number: it will remain a string. Nor will it change any existing Format Mask: and if that value is a new cell, then it will be assigned a default Format Mask of "General".
-It will convert a string value to a numeric if it looks like a number with or without decimals (but without leading zeroes), or in scientific format; but it still won't change the Format Mask.
-
-```php
-// Set Cell C21 using a formatted string value
-$worksheet->getCell('C20')->setValue('€ -1234.567');
-
-// The Cell value should be the string that we set
-var_dump($worksheet->getCell('C20')->getValue());
-// The Format Mask should be "General"
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode());
-// The formatted value should still be the string that we set
-var_dump($worksheet->getCell('C20')->getFormattedValue());
-
-// Set Cell C21 using a numeric value
-$worksheet->getCell('C21')->setValue('-1234.567');
-
-// The numeric string value should have been converted to a float
-var_dump($worksheet->getCell('C21')->getValue());
-// The Format Mask should be "General"
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode());
-var_dump($worksheet->getCell('C21')->getFormattedValue());
-
-// Change the Format Mask for C21 to a Currency mask
-$worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->setFormatCode('€ #,##0;€ -#,##0');
-
-// The float value should still be the same
-var_dump($worksheet->getCell('C21')->getValue());
-// The Format Mask should be the new mask that we set
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode());
-// The value should now be formatted as a Currency
-var_dump($worksheet->getCell('C21')->getFormattedValue());
-```
-giving
-```php
-string(13) "€ -1234.567"
-string(7) "General"
-string(13) "€ -1234.567"
-
-float(-1234.567)
-string(7) "General"
-string(9) "-1234.567"
-
-float(-1234.567)
-string(20) "€ #,##0;€ -#,##0"
-string(10) "€ -1,235"
-```
-
-If you wish to emulate the MS Excel behaviour, and automatically convert string values that represent Currency, Dates, Fractions, Percentages, etc. then the Advanced Value Binder attempts to identify these, to convert to a number, and to set an appropriate Format Mask.
-
-You can do this by changing the Value Binder, which will then apply every time you set a Cell value.
-```php
-// Old method using static property
-Cell::setValueBinder(new AdvancedValueBinder());
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet->setValueBinder(new AdvancedValueBinder());
-
-// Set Cell C21 using a formatted string value
-$worksheet->getCell('C20')->setValue('€ -12345.6789');
-
-// The Cell value is a float of -12345.6789
-var_dump($worksheet->getCell('C20')->getValue());
-// The format code is "[$€]#,##0.00_-"
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode());
-// The formatted value is "€-12,345.68 "
-var_dump($worksheet->getCell('C20')->getFormattedValue());
-```
-
-Or (since version 1.28.0) you can specify a Value Binder to use just for that one call to set the Cell's value.
-
-```php
-// Set Cell C21 using a formatted string value, but using a Value Binder
-$worksheet->getCell('C20')->setValue('€ -12345.6789', new AdvancedValueBinder());
-
-// The Cell value is a float of -12345.6789
-var_dump($worksheet->getCell('C20')->getValue());
-// The format code is "[$€]#,##0.00_-"
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode());
-// The formatted value is "€-12,345.68 "
-var_dump($worksheet->getCell('C20')->getFormattedValue());
-```
-While PhpSpreadsheet's Advanced Value Binder isn't as "sophisticated" as MS Excel at recognising formats that should be converted to numbers, or at setting a mask that exactly matches the entered value, it can simplify entering data from formatted strings; and is particularly useful when reading untyped or loosely formatted files like a CSV.
-
-> **Warning**: Remember that setting a Cell value explicitly bypasses the Value Binder, so you will always have to set the Format Mask manually if you are using `setValueExplicit()` to set Cell values.
-
-## Using Formatting Masks in the TEXT() Function
-
-We can also use Number Formatting Masks directly in Excel's `TEXT()` Function, without setting the mask for a Cell.
-
-```php
-$worksheet->getCell('A1')->setValue(12345.678);
-$worksheet->getCell('B1')
- ->setValue('#.00" Surplus";-#.00" Deficit";"Out of Stock"');
-$worksheet->getCell('C1')->setValue('=TEXT(A1,B1)');
-
-var_dump($worksheet->getCell('C1')->getCalculatedValue()); // 12,345.68 Surplus
-
-
-$worksheet->getCell('A2')->setValue(-12345.678);
-$worksheet->getCell('C2')
- ->setValue('=TEXT(A2,"#,##0.00"" Surplus"";-#,##0.00"" Deficit"";""Out of Stock""")');
-
-var_dump($worksheet->getCell('C2')->getCalculatedValue()); // -12,345.68 Deficit
-```
-Remember that you'll need to escape double quotes in the mask argument by double double-quoting them if you pass the mask directly as an string.
-It's generally easier to read if you store the mask as text in a cell, and then pass the cell reference as the mask argument.
-
-## Changing a Cell's Formatting Mask
-
-In PhpSpreadsheet we can change a Cell's Formatting Mask at any time just by setting a new FormatCode for that Cell.
-The library provides a number of "pre-defined" Masks as Constants in the `NumberFormat` class, prefixed with 'FORMAT_', but isn't limited to these values - the mask itself is just a string value - and the value passed to `setFormatCode()` can be any valid Excel Format Mask string.
-> **Note**: The Mask value isn't validated: it's up to you, as the developer, to ensure that you set a meaningful Mask value.
-
-And while Excel applies an initial Mask to every Cell when we enter a value (even if it's just the default "General"), we can still always change that Mask.
-This is managed through the "Number" block in the "Home" ribbon.
-
-
-
-This provides us with some simple options for increasing or decreasing the number of decimals displayed, if we want a thousands separator, a currency code to use, etc.
-
-But if we use the "pull down" for that block, we access the "Number" tab of "Format Cells" that provides a lot more options.
-
-
-
-This gives us access to a number of "Wizards" for different "Categories" of masking, as well as "Custom", which allows us to build our own masks.
-
-Since version 1.28.0, PhpSpreadsheet has also provided a set of "Wizards", allowing for the easier creation of Mask values for most Categories.
-
-## Mask Categories
-
-I'll describe "Custom" Mask values later in this article; but let's take a look at the "Wizard" options for each "Category" first.
-
-### General
-
-This is the default Mask, and is "adaptive".
-Numbers will appear with as many decimals as have been entered for the value (to the limit of a 9 or 10 digit display; additional decimals will be rounded), while very large or very small values will display in Scientific format.
-
-### Number
-
-Excel's Number "Wizard" allows you to specify the number of decimals, and whether to use a thousands separator (or not).
-It also offers a few ways to display negative values (with or without a sign, highlighted in red).
-
-
-
-A typical mask will look something like '0.00' (2 decimals, with no thousands separator) or '#,##0.000' (3 decimals with a thousands separator).
-
-The PhpSpreadsheet Number "Wizard" allows you to specify the number of decimals, and the use of a thousands separator.
-The defaults are 2 decimal places, and to use a thousands separator.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Number Wizard to build the Format Mask
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode((string) new Number(3, Number::WITH_THOUSANDS_SEPARATOR));
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode()); // "#,##0.000"
-var_dump($worksheet->getCell('C20')->getFormattedValue()); // "-12,345.679"
-```
-
-PhpSpreadsheet's "Wizard" doesn't yet offer options for displaying negative values; they will simply be masked so that they always display the sign.
-But alternative masking for negative values is an option that may be added in the future.
-
-### Currency
-
-The Currency "Wizard" in MS Excel has similar options to the Number "Wizard", but also requires that you specify a currency code.
-
-
-
-The "Symbol" dropdown provides a lot of locale-specific variants of the same currencies - for example '€ Netherlands', where the currency symbol is displayed before the value, and any negative sign appears before the currency "-€ 12,345.68"; or '€ France', where the symbol is displayed after the value "-12,345.68 €".
-
-The PhpSpreadsheet Currency "Wizard" allows you to specify the currency code, number of decimals, and the use of a thousands separator.
-In addition, optionally, you can also specify whether the currency symbol should be leading or trailing, and whether it should be separated from the value or not.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Currency Wizard to build the Format Mask
-$currencyMask = new Currency(
- '€',
- 2,
- Number::WITH_THOUSANDS_SEPARATOR,
- Currency::TRAILING_SYMBOL,
- Currency::SYMBOL_WITH_SPACING
-);
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($currencyMask);
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode()); // #,##0.00 €
-var_dump($worksheet->getCell('C20')->getFormattedValue()); // -12,345.68 €
-```
-A typical Currency mask might look something like '#,##0.00 €', with the currency symbol as a literal.
-
-The Currency Code itself may be a literal character, as here with the `€` symbol; or it can be wrapped in square braces with a `$` symbol to indicate that this is a currency and the next character as the currency symbol to use, and then (optionally) a locale code or an LCID (Locale ID) like `[$€-de-DE]` or `[$€-1031]`.
-
-I wouldn't recommend using LCIDs in your code, a locale code is a lot easier to recognise and understand; but if you do need to reference LCIDs, then you can find a list [here](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a).
-
-Alternatively, if you have PHP's `Intl` extension installed, you can specify a currency code and a locale code.
-If you use this option, then locale values must be a valid formatted locale string (e.g. `en-GB`, `fr`, `uz-Arab-AF`); and the Wizard will use the format defined in ICU (International Components for Unicode): any values that you provide for placement of the currency symbol, etc. will be ignored.
-The only argument that won't be ignored is an explicit value of 0 for the decimals, which will create a mask to display only major currency units.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C21')->setValue(-12345.67890);
-
-// Set Cell Style using the Currency Wizard to build the Format Mask for a locale
-$localeCurrencyMask = new Currency(
- '€',
- locale: 'de_DE'
-);
-$worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($localeCurrencyMask);
-
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode()); // #,##0.00 [$€-de-DE]
-var_dump($worksheet->getCell('C21')->getFormattedValue()); // -12,345.68 €
-```
-If we use the locale in the "Wizard", then a typical mask might look like '#,##0.00 [$€-de-DE]', with the currency wrapped in braces, a `$` to indicate that this is a localised value, and the locale included.
- > Note: The Wizard does not accept LCIDs.
-
-PhpSpreadsheet's "Wizard" doesn't yet offer options for displaying negative values; they will simply be masked so that they always display the sign.
-But alternative masking for negative values is an option that may be added in the future.
-
-### Accounting
-
-Excel's Accounting "Wizard" is like the Currency "Wizard", but without the options for presenting negative values.
-Presentation of zero and negative values is dependent on the currency and locale.
-
-
-
-The options available for the PhpSpreadsheet Accounting "Wizard" are identical to those of the Currency "Wizard"; although the generated Mask is different.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Accounting;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Accounting Wizard to build the Format Mask
-$currencyMask = new Accounting(
- '€',
- 2,
- Number::WITH_THOUSANDS_SEPARATOR,
- Currency::TRAILING_SYMBOL,
- Currency::SYMBOL_WITH_SPACING
-);
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($currencyMask);
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode()); // _-#,##0.00 €*_-
-var_dump($worksheet->getCell('C20')->getFormattedValue()); // -12,345.68 €
-```
-A typical Accounting mask might look something like '_-#,##0.00 €*_-', with the currency symbol as a literal; and with placement indicators like `_-`, that ensure the alignment of the currency symbols and decimal points of numbers in a column.
-
-At the moment, none of the PhpSpreadsheet Wizards provide different masks for zero and negative values; unless you have the PHP `Intl` extension enabled, and can use the locale to generate the Mask.
-As with using a locale with the Currency "Wizard", when you use a locale with the Accounting "Wizard" the locale value must be valid, and any additional options will be ignored.
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Accounting;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C21')->setValue(-12345.67890);
-
-// Set Cell Style using the Accounting Wizard to build the Format Mask for a locale
-$localeCurrencyMask = new Accounting(
- '€',
- locale: 'nl_NL'
-);
-$worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($localeCurrencyMask);
-
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode()); // [$€-nl-NL] #,##0.00;([$€-nl-NL] #,##0.00)
-var_dump($worksheet->getCell('C21')->getFormattedValue()); // (€ 12,345.68)
-```
-If we use the locale in the "Wizard", then a typical mask might look like '[$€-nl-NL] #,##0.00;([$€-nl-NL] #,##0.00)', with the currency wrapped in braces, with a `$` to indicate that this is a localised value, and the locale included.
-And in this case, there is masking for zero and for negative values, although without colour. An option to add colour to values is an option that may be added in a future release.
-
-> **Warning**: Not all versions of the ICU (International Components for Unicode) support Accounting formats, so even if your PHP does have 'Intl' enabled, it may still not allow the use of locale for generating an Accounting Mask.
-
-### Date
-
-When you use the Excel Date "Wizard", you can select a locale and you'll then be presented with a number of date format options that are appropriate for that locale.
-
-
-
-I've written in detail about Date Format Masks elsewhere in "The Dating Game"; but to summarise, here are the Mask codes used for Date formatting.
-
-| Code | Description | Example (January 3, 2023) |
-|-------|-------------------------------------|---------------------------------------|
-| m | Month number without a leading zero | 1 |
-| mm | Month number with a leading zero | 01 |
-| mmm | Month name, short form | Jan |
-| mmmm | Month name, full form | January |
-| mmmmm | Month as the first letter | J (stands for January, June and July) |
-| d | Day number without a leading zero | 3 |
-| dd | Day number with a leading zero | 03 |
-| ddd | Day of the week, short form | Tue |
-| dddd | Day of the week, full form | Tuesday |
-| yy | Year (last 2 digits) | 23 |
-| yyyy | Year (4 digits) | 2023 |
-
-
-There is currently no PhpSpreadsheet "Wizard" for Date Masks; but this will be introduced in the 1.29.0 release.
-
-### Time
-
-As with Dates, when you use the Excel Time "Wizard", you can select a locale and you'll then be presented with a number of time format options that are appropriate for that locale.
-
-
-
-I've written in detail about Time Format Masks elsewhere in "The Dating Game"; but to summarise, here are the Mask codes used for Time formatting.
-
-| Code | Description | Displays as |
-|--------|--------------------------------------------------------------------|-------------|
-| h | Hours without a leading zero | 0-23 |
-| hh | Hours with a leading zero | 00-23 |
-| m | Minutes without a leading zero | 0-59 |
-| mm | Minutes with a leading zero | 00-59 |
-| s | Seconds without a leading zero | 0-59 |
-| ss | Seconds with a leading zero | 00-59 |
-| AM/PM | Periods of the day (if omitted, 24-hour time format is used) | AM or PM |
-
-Excel also supports Masks for Time Durations, although there is no "Wizard" for this; but the following Mask codes can be used to display Durations.
-
-| Code | Description | Displays as |
-|---------|----------------------------------------------------------------|-------------|
-| [h]:mm | Elapsed time in hours | e.g. 25:02 |
-| [hh]:mm | Elapsed time in hours with a leading zero if less than 10 | e.g. 05:02 |
-| [mm]:ss | Elapsed time in minutes | e.g. 63:46 |
-| [m]:ss | Elapsed time in minutes with a leading zero if less than 10 | e.g. 03:46 |
-| [s] | Elapsed time in seconds | |
-| [ss] | Elapsed time in seconds with a leading zero if less than 10 | |
-
-There is currently no PhpSpreadsheet "Wizard" for Time Masks, or for Durations; but these will be introduced in the 1.29.0 release.
-
-### Percentage
-
-This is among the simplest of the Excel "Wizards", only allowing you to specify the number of decimals to be displayed.
-
-
-
-The Percentage mask looks like '0.00%'.
-
-Using the `%` code in a mask will multiply the value by 100 before rendering it, and it will always also display the `%` sign.
-
-The PhpSpreadsheet "Wizard" replicates this simple option; but also provides a locale option that allows locale-specific formatting, because there are a few locales where the percentage sign appears before the value rather than after it.
-As with all locale use for the PhpSpreadsheet "Wizard", this is dependent on having the `Intl` extension enabled.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Percentage;
-
-// Set Cell value
-$worksheet->getCell('C21')->setValue(-12345.67890);
-
-// Set Cell Style using the Percentage Wizard to build the Format Mask for a locale
-$localeCurrencyMask = new Percentage(
- locale: 'tr_TR'
-);
-$worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($localeCurrencyMask);
-
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode()); // %#,##0.00
-var_dump($worksheet->getCell('C21')->getFormattedValue()); // %-12,345.68
-```
-
-### Fraction
-
-MS Excel presents two different options for fractions: the first where the denominator is calculated internally to either 1, 2 or 3 digits; and the second (introduced only recently) where the denominator is fixed as 2, 4, 8 or 16.
-
-
-
-The Fraction mask looks like '# ?/???' where `#` indicates that the integer part of the value should be displayed, and then `?/???` to display the fraction with up to 3 digits in the denominator.
-The mask using a fixed-denominator looks like '# ?/16', with the denominator value replacing the variable `?`.
-
-If you use digit placeholders (`/??`) for the denominator, then Excel will calculate the lowest denominator that it can use for the fractional value. If you specify a fixed denominator (e.g. `/8`) then Excel will calculate the fraction in eighths.
-
-> **Note:** The internal renderer in PhpSpreadsheet does not consider the number of digits for the denominator, but will simply try to identify the lowest value denominator that it can use.
-
-There is currently no PhpSpreadsheet "Wizard" for Fraction Masks.
-
-### Scientific
-
-This is among the simplest of the Excel "Wizards", only allowing you to specify the number of decimals to be displayed.
-
-
-
-The Scientific mask looks like '0.00E+00'.
-
-> **Note**: The internal rendering used by PhpSpreadsheet will display only as many digits as necessary for the exponent; while the Excel mask specifies a minimum of 2 digits, with a leading zero if necessary.
-
-The PhpSpreadsheet "Wizard" replicates this simple option.
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Scientific;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Scientific Wizard to build the Format Mask
-$scientificMask = new Scientific(
- 4,
-);
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($scientificMask);
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()->getFormatCode()); // 0.0000E+00
-var_dump($worksheet->getCell('C20')->getFormattedValue()); // -1.2346E+4
-
-// Set Cell value
-$worksheet->getCell('C21')->setValue(-12345.67890);
-
-// Set Cell Style using the Scientific Wizard to build the Format Mask for a locale
-$localeScientificMask = new Scientific(
- 3,
- locale: 'nl_NL'
-);
-$worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()
- ->setFormatCode($localeScientificMask);
-
-var_dump($worksheet->getCell('C21')
- ->getStyle()->getNumberFormat()->getFormatCode()); // 0.000E+00
-var_dump($worksheet->getCell('C21')->getFormattedValue()); // -1.235E+4
-```
-
-If you specify a number of decimals to display, then the Scientific "Wizard" will apply that value, even when using a locale.
-
-### Text
-
-MS Excel's Text "Wizard" has no options, but simply sets a mask to `@`, meaning display the value exactly as it is entered.
-Unlike `General`, which is adaptive, `@` will not change the displayed value in any way, except in one exceptional case (see note below).
-Very large or very small values will not be displayed in Scientific format, and leading zeroes will be displayed.
-
->**Note:** If your cell contains Rich Text, then using `@` in a format mask will display it using the basic cell styling, ignoring the Rich Text styling.
-
-
-
-PhpSpreadsheet doesn't emulate this behaviour; it simply displays the value as PHP would render that value cast to a string, which mimics Excel's quirk with Rich Text values.
-
-There is no PhpSpreadsheet "Wizard" for Text Masks.
-
-### Special
-
-Excel's Special format "Wizard" is a recent introduction: select a locale, and then you may be offered a number of options for formatting values in a manner that is appropriate to that locale, such as US phone numbers, social security numbers, or zip codes; typically with separators between groups of digits.
-At this time, most locales have no special formats defined.
-
-
-
-There is no PhpSpreadsheet "Wizard" for Special Masks.
-
-## Custom Format Masks
-
-The Custom "Wizard" really isn't a Wizard at all, just an editing field that allows you to pre-populate from a list of common format masks before editing.
-
-
-
-It does mean that you need to understand the rules for defining masks when you use this.
-
-When you create custom number formats, you can specify up to four sections of format code.
-These sections of code must be separated by semicolons (`;`).
-
-### Sections for Composite Masks
-
-Sections of the mask define the formats for positive numbers, negative numbers, zero values, and text, in that order.
-
-
- 1. Format for Positive values
- 2. Format for Negative values
- 3. Format for Zero values
- 4. Format for Text
-
-If you specify only one section of format code, the code in that section is used for all numbers.
-If you specify two sections of format code, the first section of code is used for positive numbers and zeros, and the second section of code is used for negative numbers.
-If you specify a third section, then the first applies to positive values, the second to negative values, and the third to zero values.
-The fourth section only applies if the value is not numeric.
-
-If you skip code sections in the format mask, then you must include a semicolon for each of the missing sections.
-
-When you skip code sections in the format mask, then you must include a semicolon for each of the missing sections. Use `;` to indicate that a section exists, but with an empty mask; and that can be used to hide values that match the criteria for that section.
-
-
-
-> **Note:** Negative values aren't shown with a sign when we use the negative value section. If we want the value to display with a sign, then we need to include an explicit '-' character in the Mask for that section (";-0;").
-
-### Basic Masking Symbols
-
-Three basic masking symbols are used to display numbers, and they differ in the way that they display leading or trailing zeroes.
-The fourth basic masking symbol is the text placeholder, which can be used to wrap the cell value within additional formatting.
-
-| Code | Description | Examples |
-|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| 0 | Digit placeholder that displays insignificant zeros. | #.00 - always displays 2 decimal places.
If you type 5.5 in a cell, it will display as 5.50. |
-| # | Digit placeholder that represents optional digits and does not display extra zeros.
That is, if a number doesn't need a certain digit, it won't be displayed. | #.## - displays up to 2 decimal places.
If you type 5.5 in a cell, it will display as 5.5.
If you type 5.555, it will display as 5.56. |
-| ? | Digit placeholder that leaves a space for insignificant zeros on either side of the decimal point but doesn't display them. It is often used to align numbers in a column by decimal point. | #.??? - displays a maximum of 3 decimal places and aligns numbers in a column by decimal point. |
-| @ | Text placeholder | 0.00; -0.00; 0; [Red]@ - applies the red font colour for text values. |
-
-If a number entered in a cell has more digits to the right of the decimal point than there are placeholders in the format, the number is "rounded" to as many decimal places as there are placeholders.
-For example, if you have a value of `2.25` in a cell with '#.#' format, then the number will be rounded to 1 decimal, and will display as `2.3`.
-
-Digits to the left of the decimal point are always displayed regardless of the number of placeholders.
-For example, if the value in a cell is `202.25` with '#.#' format, the number will display as `202.3`.
-
-
-
-To display leading zeroes for a numeric value, you might create a mask like '0000', which will always display at least 4 digits, padding the value with leading zeroes if it is less than 1000.
-
-### Other Special Codes
-In addition to the masking symbols listed above, the following codes also enable special rendering of the value.
-
-| Code | Description | Example |
-|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
-| . (period) | Decimal point. | ##0.00?? |
-| , (comma) | Thousands Separator. A comma that follows a digit placeholder scales the number by a thousand. | #,##0 0.000, Described below. |
-| \ | Text Escape Character that displays the character that follows it. | ##0\° Described below. |
-| " " | Display any text that is enclosed in the double quotes. | ##0"°C" Described below. |
-| % | Multiplies the value stored in the cell by 100 and display it with the percentage sign. | Examples provided in the "Wizard" section above. |
-| / | Display the value as a fraction. | Examples provided in the "Wizard" section above. |
-| E | Display the value in Scientific Format. | Examples provided in the "Wizard" section above. |
-| _ (underscore) | Space pad to the width of the next character in the mask. It is commonly used in combination with parentheses to add left and right indents, `_(` and `_)` respectively. | Described below. |
-| * (asterisk) | Repeats the character that follows it until the width of the cell is filled. It is often used in combination with the space character to change alignment. | Described below. |
-
-Simple examples of using these codes for Percentages, Fractions and Scientific Format can be found in the descriptions of those "Wizards".
-The other codes are described in detail below.
-
-### Thousands Separator and Scaling
-
-To create an Excel custom number format with a thousands separator, include a comma (`,`) in the format code. For example:
-
- - #,### - display a thousands separator and no decimal places.
- - #,##0.00 - display a thousands separator and 2 decimal places.
-
-Microsoft Excel separates thousands by commas: if a comma is enclosed by any digit placeholders - the pound sign (`#`), question mark (`?`) or zero (`0`).
-But if no digit placeholder follows a comma, it scales the number by a thousand, two consecutive commas scale the number by a million, and so on.
-
-For example, if a cell format is '#.00,' and the cell value is `5000`, then the number `5.00` is displayed.
-
-
-
-### Formatting with Text
-
-If you want to include text in your format mask with numeric values, then there are two basic options.
-To add a single character, then you can prefix that character with a backslash ('\'), e.g. '#.00,\K' or '#.00,,\M'.
-
-
-
-You don't need the backslash ('\') prefix for the following list of characters:
-
-| Character | Description |
-|-----------|----------------------------------|
-| + and - | Plus and Minus Signs |
-| ( and ) | Left and Right Parenthesis |
-| : | Colon |
-| ^ | Caret |
-| ' | Apostrophe |
-| { and } | Curly Braces |
-| < and > | Less Than and Greater than Signs |
-| = | Equals Sign |
-| / | Forward Slash |
-| ! | Exclamation Mark |
-| & | Ampersand |
-| ~ | Tilde |
-| | Space Character |
-
-You can also use additional padding characters if you want to break a number into groups. For example, to display a number as a phone number, you might use a mask like '00-0000-0000' or '(++00) 00-0000-0000'.
-
-It's a common practise in Accounting formats to wrap negative values in brackets; so you might use '([$€-nl-NL] #,##0.00)' for that section of the mask.
-
-To add words or for phrases to the mask, you should wrap the text in quotes: e.g. '#.00" Surplus";-#.00" Deficit";"Out of Stock"'.
-
-
-
-### Indents, Spacing and Alignment
-
-If you're wrapping negative values in brackets, you might like like to align your positive values with your negative values on the decimal, then you need to apply indents to the positive values to match the width of the bracket characters.
-The underscore code (`_`) tells Excel to pad the display to the width of the next character in the mask, so '_)' would tell Excel to pad to the width of ')' character like '[$€-nl-NL] _(#,##0.00_);[$€-nl-NL] (#,##0.00)'.
-
-
-
-Accountants might also appreciate if the Currency symbols were also all aligned; so we can use the `*` code followed by a repeated character; and that will pad the width of the cell with the specified character. Typically, although not always, this will be a space character, '* '.
-
-
-
-Which aligns all our currency symbols to the left of the cell, while displaying the value right-aligned in the cell, and all the decimal points neatly aligned.
-
-The `*` code can also be used to change the alignment of a value in a cell. If we want text to be rendered right aligned, even though the cell is left aligned, we can use '* @' as the mask, and this will push the display to the right of the cell.
-
-
-
-Note that padding is not supported by PhpSpreadsheet's internal renderer for the cell's `getFormattedValue()` method, because the renderer is unaware of font or cell width, so it will simply add a single space in the formatted result. Nor will it change alignment in any way.
-
-### Colours
-
-You can use format masks to change the font colour for a certain value with a custom number format.
-e.g. '[Red]@'
-
-Masking supports the following 8 main colours.
-
- - Black
- - Red
- - Green
- - Blue
- - Cyan
- - Yellow
- - Magenta
- - White
-
-To specify the colour, just type one of those colour names in the appropriate section of your number format code, wrapped in square braces (e.g. '[red]').
-This colour code must be at the very start of the section, before any other formatting characters or instructions.
-The colour name is case-insensitive.
-
-If we wanted to show positive values in green and negative values in red we could apply different colours to the different sections of the mask, e.g. "[Green]#,##0.00;[Red]#,##0.00;0.00".
-
-> **Warning**: Colour masking doesn't apply when using Excel's `TEXT()` function; only when it is applied to a Cell's Format Mask.
-
-### Conditional Formatting
-
-Not to be confused with actual Conditional Formatting in MS Excel; but we can apply some limited condition checks in normal Cell Format Masks, and apply different masking based on those conditions.
-
-While by default the different sections are interpreted by Excel as positive, negative, zero and text, we can override these definitions with conditions.
-We do this by defining the condition for matching against the value inside square braces.
-
-
-
-The mask that we're using here is `[Red][<65]"Fail";[Blue]"Pass"`.
-This tells Excel to display the text "Fail" if the value in the Cell is less than 65, otherwise to display "Pass".
-
-The symbols allowed for comparison in Conditions are the standard mathematical comparison operators:
-
-| Symbol | Meaning |
-|--------|-----------------------|
-| \> | Greater than |
-| \>= | Greater than or Equal |
-| < | Less than |
-| <= | Less than or Equal |
-| = | Equal |
-| <\> | Not Equal |
-
-In this next example, we've created an additional condition, so we have three sections in the mask: the "Pass" grade is now any student that hasn't failed, but whose score is less than 85; the last section awards a grade of "Distinction" to any student whose score doesn't match the criteria for "Pass" or "Fail" (i.e. exceeds 85).
-`[Red][<65]"Fail";[Blue][<85]"Pass";"Distinction"`
-
-
-
-We do need to be careful about the order that we define the conditions, because Excel will apply the mask for the first condition that matches the Cell value.
-
-> **Note**: Conditional Formatting using the Number Mask will also work with the TEXT() Function, although not with colour highlighting.
-
-We can also use Conditional Formatting to display Lakh, the different grouping often found in India and the countries of that region.
-While the thousands separator normally represents grouping to powers of 3 (103, 106, 109, etc), the Lakh is 103, 105, 107, etc. and is written as `1,00,000`.
-After the first 1000, the comma separator is used to represent groups of 2 digits, not groups of 3 digits.
-150,000 rupees is 1.5 lakh rupees, and is written as `₹1,50,000` or `INR 1,50,000`.
-
-The mask used to represent lakh is:
-[>=10000000][$₹]##\,##\,##\,##0;[>=100000][$₹]##\,##\,##0;[$₹]##,##0
-
-Note that we're only using the `,` for thousands grouping in the final block, to represent values less than 100,000 where we would only display a single `,` as a thousands separator.
-For the `,` in higher values, we are displaying a string literal `,` identified as such by the '\' immediately before it in the mask.
-
-## Building Composite Masks using PhpSpreadsheet's Wizards
-
-Even though PhpSpreadsheet's Wizards don't yet support building sections with different masks for positive, negative, zero, and text, you can still create these using the Wizards as building blocks.
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Number;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Currency Wizard to build the Format Mask
-$currencyMask = new Currency(
- '€',
- 2,
- Number::WITH_THOUSANDS_SEPARATOR,
- Currency::TRAILING_SYMBOL,
- Currency::SYMBOL_WITH_SPACING
-);
-
-// Build the composite mask applying colours to the different sections
-$compositeCurrencyMask = [
- '[Green]' . $currencyMask,
- '[Red]' . $currencyMask,
- $currencyMask,
-];
-
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode(implode(';', $compositeCurrencyMask));
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->getFormatCode()); // [Green]#,##0.00 €;[Red]#,##0.00 €;#,##0.00 €
-```
-We repeat the mask that's generated by the "Wizard" for each section of the composite mask, adding the required colour to each section.
-
-If we've used a locale to build a mask, then we may already have multiple sections:
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Currency;
-
-// Set Cell value
-$worksheet->getCell('C20')->setValue(-12345.67890);
-
-// Set Cell Style using the Currency Wizard to build the Format Mask
-$currencyMask = new Currency(
- '€',
- locale: 'nl_NL'
-);
-
-// Split the generated mask into sections
-// This particular mask already has positive and negative value sections,
-// but does not have a zero value section
-// Other locales may only have a positive section; or may already have a zero section
-$currencyMaskSections = explode(';', $currencyMask);
-// Recreate the modified mask applying colours to the different sections
-$compositeCurrencyMask = [
- '[Green]' . $currencyMaskSections[0],
- '[Red]' . $currencyMaskSections[1] ?? $currencyMaskSections[0],
- $currencyMaskSections[2] ?? $currencyMaskSections[0],
-];
-
-$worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- ->setFormatCode(implode(';', $compositeCurrencyMask));
-
-var_dump($worksheet->getCell('C20')
- ->getStyle()->getNumberFormat()
- // [Green][$€-nl-NL] #,##0.00;[Red][$€-nl-NL] -#,##0.00;[$€-nl-NL] #,##0.00
- ->getFormatCode());
-```
-If the locale-generated mask already has a section defined, then we use that, otherwise we use the positive section (section 0) that will always exist as the base for each section.
-> **Warning:** You might need to add an explicit `-` for the negative section if that needs to be created.
-
-## Summary
-
-Even though Excel displays the formatted value in the grid, the underlying value in the cell is unchanged.
-The value being displayed as a date is still an Excel Serialized Timestamp, even though it is being displayed as '2023-02-28'; the student grade is still a number, even though it is being displayed as "Distinction"/"Pass"/"Fail"; and the cell that looks empty may not be as empty as you think.
-The edit bar still shows us the value in the cell, not the formatted value; and we can still use that underlying value in formulae.
-
-
-
-And we can even format the cell containing the result of that formula.
-
-Number format masks allow us to present the spreadsheet data in a format that makes it easy for the user to interpret; so they add a lot of value to the spreadsheets that we create.
-We just need to understand how to use them well to unlock that value.
diff --git a/docs/topics/Looping the Loop.md b/docs/topics/Looping the Loop.md
deleted file mode 100644
index 09fefe67ff..0000000000
--- a/docs/topics/Looping the Loop.md
+++ /dev/null
@@ -1,501 +0,0 @@
-# Looping the Loop
-
-PhpSpreadsheet uses a lot of memory to maintain the Spreadsheet model; but I regularly see developers loading a Spreadsheet file and then calling the `toArray()` methods so that they can loop through the rows and columns of a worksheet.
-PHP arrays are also notoriously memory-intensive, so creating a large array duplicating the data that is already in the Spreadsheet model is a very inefficient use of memory.
-Generally, unless we are always working with very small spreadsheets, we would want to avoid this.
-
-So in this article, I'm going to look at a number of different ways of iterating through a worksheet to access the row and cell data; at their limitations; and at some of the options that each provides.
-
-## Using `toArray()`
-
-Using a sample data file from Microsoft and available at https://go.microsoft.com/fwlink/?LinkID=521962, I can load up the file, call `toArray()` to return the worksheet data in an array, and iterate over the rows and cells of that array with the following code.
-
-```php
-$inputFileType = 'Xlsx';
-$inputFileName = __DIR__ . '/../Financial Sample.xlsx';
-
-$reader = IOFactory::createReader($inputFileType);
-$spreadsheet = $reader->load($inputFileName);
-$worksheet = $spreadsheet->getActiveSheet();
-
-$dataArray = $worksheet->toArray();
-
-foreach ($dataArray as $row) {
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
-}
-```
-
-The Financial Sample spreadsheet is fairly small, 701 rows (including a heading row) and 16 columns; and is predominantly numeric data.
-To simulate a larger worksheet, I've duplicated that data to give 7001 rows; but this is still a small worksheet as MS Excel xlsx files can contain 1 million rows in each of several worksheets.
-
-If we look at the timings and memory usage for this process with my extended MS Financial Sample spreadsheet:
-```
-Current memory usage: 47104 KB
-
-Call time to build array was 0.6603 seconds
-
-Call time to iterate array rows was 0.0130 seconds
-Current memory usage: 57344 KB
- Peak memory usage: 57344 KB
-```
-We can see that using `toArray()` increases memory usage by 10240KB (10MB): that is the memory used by the array for a relatively small worksheet (less than 120,000 cells).
-For larger worksheets, with more rows and columns, and with more text than numeric values, this memory overhead can grow significantly larger.
-
-And while iteration over the array is very quick, it still takes 0.6603 seconds to build the array before we can start iterating over those rows and cells.
-
----
-
-The `toArray()` method is easy to use: but not only is it increasing the memory overhead, especially with larger worksheets; but it also lacks flexibility.
-It provides limited control over how the data from each cell is returned in the array.
-It can return the raw cell value (which isn't particularly useful if the cell contains a formula, or if the value should be interpreted as a date); it can force PhpSpreadsheet to calculate formulae and return the calculated value; or it can return the formatted cell value (which includes calculating any formulae) so that date values are presented in a human-readable format, but which will also format numeric values with thousand separators where the cell style applies that.
-
-| Argument Name | DataType | Default | Purpose |
-|--------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| $nullValue | mixed | null | A value to be returned in the array if a cell doesn't exist. |
-| $calculateFormulas | boolean | false | Flag to indicate if formula values should be calculated before returning. |
-| $formatData | boolean | false | Flag to request that values should be formatting before returning. |
-| $returnCellRef | boolean | false | False - Return a simple enumerated array of rows and columns (indexed by number counting from zero) True - Return rows and columns indexed by their actual row and column IDs. |
-
-### Dealing with empty rows
-
-The example spreadsheet that I've used here is well behaved, with no empty rows. Empty rows can cause problems, even when working in Excel itself.
-
-Let's take a look at a worksheet of Sales Data, where we're missing the returns for a couple of months:
-
-
-
-If we're using MS Excel, and we hit `Ctrl-T` to create a table from this data, we might expect Excel to build that table from all rows up to `Dec`; but it won't, it will only build the table up to the next empty row.
-
-
-
-And unless we're careful, we might not even notice that the last few months of the year are omitted.
-So empty rows can create problems even in MS Excel itself; and we certainly need to have some way of identifying them when we're processing a worksheet using PhpSpreadsheet.
-
----
-
-While we're iterating through a spreadsheet with PhpSpreadsheet, we might want to avoid trying to process blank data if we reach a row that is empty; or we might want to terminate iterating when we encounter an empty row.
-
-If we've created an array from a worksheet, then an empty row will be a row where every cell/column entry has a null value (unless called specifying an alternative value using the `$nullValue` argument).
-
-We can filter the row to eliminate null values, then count the length of that filtered array: if there are no remaining cells, then the row is empty. We can then skip that row in our code using `continue`.
-
-```php
-foreach ($dataArray as $row) {
- // Check for empty rows
- if (count(array_filter($row, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
-}
-```
-
-Or if we want to terminate iterating when we encounter an empty row, use `break` rather than `continue`.
-
-```php
-foreach ($dataArray as $row) {
- // Check for empty rows
- if (count(array_filter($row, function ($value) {
- return $value !== null;
- })) === 0) {
- break; // Stop at the first empty row
- }
-
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
-}
-```
-
-Using `toArray()` won't change anything in the worksheet model: it won't modify values or create new cells.
-It will return a row/column entry for every cell that can exist, even if that cell doesn't exist in the worksheet, or is part of a merge range.
-> **Note**: It is possible for several cells in a merge range to have a value. Although MS Excel doesn't allow you to set data like this, the option is available in other Spreadsheet software, and if the file is saved as an xlsx file, then the data for those cells is retained in the file, even though only the top left cell of a merge range shows a value in MS Excel. In PhpSpreadsheet, accessing those cells (including using `toArray()`) will return the "hidden" value.
-
-One useful factor about returning an array of arrays is if we want to populate a data model from that row before persisting to a database, for example. We don't need to iterate the columns in that row, but can work directly with the column array for each row.
-
-```php
-class MonthlySales {
- private function __construct(
- public readonly string $month,
- public readonly array $sales,
- ) {}
-
- public static function fromExcel(array $values, array $headers): self {
- $month = array_shift($values);
- return new self($month, array_combine($headers, $values));
- }
-}
-
-$monthlySalesData = new MonthlySalesCollection();
-
-// Read from the header row of the worksheet
-$excelHeaderRow = ['Jones', 'Sorvino', 'Gupta', 'Choi'];
-
-$dataArray = $worksheet->toArray(formatData: true);
-foreach ($dataArray as $excelDataRow) {
- // Check for empty rows
- if (count(array_filter($excelDataRow, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- $monthlySalesData->add(MonthlySales::fromExcel(
- $excelDataRow,
- $excelHeaderRow
- ));
-}
-```
-We can pass the row array directly to the static `MonthlySales::fromExcel()` constructor for our data object, handling any validation and manipulation of the structure there, to map the Excel data row to that object properties, handling filtering within the business logic of the Monthly Sales object's static constructor.
-
----
-
-And remember that by default, `toArray()` returns a simple enumerated array of enumerated arrays, to reflect rows and columns. You can modify this using the `$returnCellRef` argument to the method: set `$returnCellRef` to true, and the array indexes will be the row number (with 1 as the first row) and the column address ('A', 'B', 'C', etc); which can be useful if you want to do some processing of the cells based on that column address.
-
-```php
-class MonthlySales {
- private function __construct(
- public readonly string $month,
- public readonly array $sales,
- ) {}
-
- public static function fromExcel(array $values, array $headers): self {
- $month = array_shift($values);
- $salesValues = [];
- foreach ($values as $column => $value) {
- // Ignore salespeople who have null sales values
- if ($value !== null) {
- $salesValues[$headers[$column]] = $value;
- }
- }
- return new self($month, $salesValues);
- }
-}
-
-$monthlySalesData = new MonthlySalesCollection();
-
-// Read from the header row of the worksheet
-$excelHeaderRow = [
- 'B' => 'Jones',
- 'C' => 'Sorvino',
- 'D' => 'Gupta',
- 'E' => 'Choi'
-];
-
-$dataArray = $worksheet->toArray(formatData: true, returnCellRef: true);
-foreach ($dataArray as $excelDataRow) {
- // Check for empty rows
- if (count(array_filter($excelDataRow, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- $monthlySalesData->add(MonthlySales::fromExcel(
- $excelDataRow,
- $excelHeaderRow
- ));
-}
-```
-
-## Using `rangeToArray()`
-
-The `toArray()` method uses information from the loaded file to identify the range of rows and columns to populate the array.
-`toArray()` uses two cached values to identify the range of cells to populate the array, values that are returned by the `getHighestRow()` and `getHighestColumn()` methods.
-
-But many worksheets do have trailing empty rows (or columns); and it is quite common for an Excel spreadsheet to have only a few rows or columns of data, but for the spreadsheet itself to claim that the highest row is 1,048,576 or that the highest column is XFD.
-Features such as Data Validation or Conditional Formatting that can also artificially inflate/increase the values returned by `getHighestRow()` and `getHighestColumn()` methods.
-
-If we use `toArray()` to build an array from the worksheet in this case, then it will build a 1,048,576x16,384 array, filled with null values, that will almost certainly exceed PHP's memory limits, and take a long time to do so.
-And if we do have enough memory to build the array, we will still be iterating over a lot more array entries than we want. Even if we're skipping empty rows, we're still testing every row to see if it's empty.
-Where possible, it's better to specify the limit of rows and columns that we want to use to build an array, and PhpSpreadsheet provides the `rangeToArray()` for that purpose.
-
-One option to reduce a large array using a lot of PHP memory would be to run a loop using `rangeToArray()` to build smaller arrays for blocks of perhaps 100 rows at a time.
-This will still take a while to run if we have a lot of trailing empty rows, but it won't exceed PHP's memory limits.
-
-```php
-$startRow = 1;
-$batchSize = 100;
-while ($startRow <= $maxRow) {
- $endRow = min($startRow + $batchSize, $maxRow);
- $dataArray = $worksheet->rangeToArray("A{$startRow}:{$maxColumn}{$endRow}");
- $startRow += $batchSize;
-
- foreach ($dataArray as $row) {
- // Check for empty rows
- if (count(array_filter($row, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
- }
-}
-```
-
-Alternatively, we can identify the highest row and highest column that actually contain cell data using the `getHighestDataRow()` and `getHighestDataColumn()` methods. This allows us to specify a range to pass to the `rangeToArray()` method.
-
-```php
-$maxDataRow = $worksheet->getHighestDataRow();
-$maxDataColumn = $worksheet->getHighestDataColumn();
-
-$dataArray = $worksheet->rangeToArray("A1:{$maxDataColumn}{$maxDataRow}");
-
-foreach ($dataArray as $row) {
- // Check for empty rows
- if (count(array_filter($row, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
-}
-```
-
-There might still be some empty rows in this array, so we still want to test for empty rows; but we won't have any trailing empty rows at the end of our data, so the iteration will terminate at the end of our specified row range, when we know we have no further data.
-
-And if there is a row or two of column headers that we want to ignore, we can modify the specified range to exclude them by adjusting the starting row of the range (e.g. `"A3:{$maxDataColumn}{$maxDataRow}"`);
-
-Because we're only building the array for a specified range of rows and columns, the array that the method builds will often be smaller than the array created by `toArray()`, using less memory; and it will often be faster iterating just the subset of rows that we've requested.
-
-
-A combination of these approaches - batching and using the 'getHighestDataRow()' value, will be more memory-efficient, and possibly faster, than using 'toArray()'.
-```php
-$startRow = 1;
-$batchSize = 100;
-while ($startRow <= $maxDataRow) {
- $endRow = min($startRow + $batchSize, $maxDataRow);
- $dataArray = $worksheet->rangeToArray("A{$startRow}:{$maxDataColumn}{$endRow}");
- $startRow += $batchSize;
-
- foreach ($dataArray as $row) {
- // Check for empty rows
- if (count(array_filter($row, function ($value) {
- return $value !== null;
- })) === 0) {
- continue; // Ignore empty rows
- }
-
- foreach ($row as $cellValue) {
- // Do something with the cell data here.
- }
- }
-}
-```
-How does this approach compare with using 'toArray()' in terms of memory and speed? Here are the details for using `rangeToArray()` with a batched approach:
-```
-Current memory usage: 47104 KB
-
-Call time to batch iterate array rows was 0.6844 seconds
- Current memory usage: 47104 KB
- Peak memory usage: 49152 KB
-```
-While the total time is 0.6844 seconds, that included building the smaller batched arrays, so its speed is comparable to the total time of 0.6733 seconds using `toArray()`.
-But a peak memory usage of 49,152KB compared with the 57,344KB used by `toArray()` make this approach a lot more memory efficient.
-
-Like `toArray()`, `rangeToArray()` is easy to use, but it has the same limitations for flexibility. It provides the same limited control over how the data from each cell is returned in the array as `toArray()`.
-The same additional arguments that can be provided for the `toArray()` method can also be provided to `rangeToArray()`.
-
-
-## Using `rangeToArrayYieldRows()`
-
-Since v2.1.0 the worksheet method `rangeToArrayYieldRows()` is available.
-It allows you to iterate over all sheet's rows with little memory consumption,
-while obtaining each row as an array:
-
-```php
-$rowGenerator = $sheet->rangeToArrayYieldRows(
- 'A1:' . $sheet->getHighestDataColumn() . $sheet->getHighestDataRow(),
- null,
- false,
- false
-);
-foreach ($rowGenerator as $row) {
- echo $row[0] . ' | ' . $row[1] . "\n";
-}
-```
-
-See `samples/Reader2/23_iterateRowsYield.php`.
-
-
-## Using Iterators
-
-You don't need to build an array from the worksheet to loop through the rows and columns and do whatever processing you need; you can loop through the rows and columns in the Worksheet directly and more efficiently using PhpSpreadsheet's built-in iterators.
-
-And this also gives a lot more flexibility in how you can present the cell values, because the iterator will return the Cell itself, not a representation of its value. You can read its value, check its style, identify if it is part of a merge range.
-
-```php
-$rowIterator = $worksheet->getRowIterator();
-foreach ($rowIterator as $row) {
- $columnIterator = $row->getCellIterator();
- foreach ($columnIterator as $cell) {
- // Do something with the cell here.
- }
-}
-```
-
-Let's look at the memory usage and timings for using PhpSpreadsheet's Iterators, as we did for building and iterating through the array.
-
-```
-Current memory usage: 47104 KB
-
-Call time to iterate rows was 0.0930 seconds
- Current memory usage: 47104 KB
- Peak memory usage: 47104 KB
-```
-
-Using the PhpSpreadsheet Iterators isn't as fast as iterating over an array; but it doesn't have the time or memory overheads of actually building that array from the worksheet.
-Using the same example spreadsheet, it only took 0.0130 seconds to iterate every cell of that array, but 0.6603 seconds to build the array, a total of 0.6733 seconds; but using the Iterator has performed the equivalent task in just 0.0930 seconds; about 7 times faster and without the increased memory overhead of the array.
-
-### Dealing with empty rows
-
-As, when we were iterating over the array, we might want to identify empty rows so that we can avoid trying to process them. The Row Iterator provides a method to identify empty rows.
-
-```php
-$rowIterator = $worksheet->getRowIterator();
-foreach ($rowIterator as $row) {
- if ($row->isEmpty()) { // Ignore empty rows
- continue;
- }
-
- $columnIterator = $row->getCellIterator();
- foreach ($columnIterator as $cell) {
- // Do something with the cell here.
- }
-}
-```
-
-One additional feature when using the Iterator to determine whether a row is empty or not is that we can set our own rules to define "empty".
-The default rule is if there is no entry for the Cell in the Cell Collection.
-If we also want to skip any Cell that contains a null value, then we can pass an argument using the pre-defined constant `CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL`.
-If we also want to skip any Cell that contains an empty string, then we can pass an argument using the pre-defined constant `CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL`.
-
-And we can combine those rules:
-```php
-if ($row->isEmpty(
- CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL |
- CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL)
- ) { // Ignore empty rows
- continue;
-}
-```
-
-Since PhpSpreadsheet 1.27.0, we can take this empty test one step further.
-If we look at a slightly modified version of the Sales Data worksheet, rows 7 and 10 have no sales data, but they aren't empty because there is a month value in column A.
-
-
-
-But we can tell the `isEmpty()` method to only check if a specified range of columns is empty in a row.
-
-```php
-if ($row->isEmpty(startColumn: 'B', endColumn: 'E') {
- // Ignore empty rows where columns B to E are empty values
- // even though there is a value in Column A.
- continue;
-}
-```
-
----
-
-Like `toArray()`, the Iterators use the `getHighestRow()` and `getHighestColumn()` methods to identify the maximum row and column values for iterating; so it can still iterate over a lot of trailing empty rows and columns.
-But that is just a default behaviour.
-Similarly to `rangeToArray()` we can specify a range of rows, and a range of columns to iterate.
-
-```php
-$maxDataRow = $worksheet->getHighestDataRow();
-$maxDataColumn = $worksheet->getHighestDataColumn();
-
-$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);
-foreach ($rowIterator as $row) {
- if ($row->isEmpty()) { // Ignore empty rows
- continue;
- }
-
- $columnIterator = $row->getCellIterator('A', $maxDataColumn);
- foreach ($columnIterator as $cell) {
- // Do something with the cell here.
- }
-}
-```
-
-and if we have heading rows at the top of the worksheet that we want to ignore:
-```php
-$rowIterator = $worksheet->getRowIterator(3, $maxDataRow);
-```
-
-And if we want to return only cells that aren't empty in the row, then we can tell the Cell Iterator to skip empty cells.
-
-```php
-$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);
-foreach ($rowIterator as $row) {
- $columnIterator = $row->getCellIterator();
- $columnIterator->setIterateOnlyExistingCells(true);
- foreach ($columnIterator as $cell) {
- // Do something with the cell here.
- }
-}
-```
-
-Alongside the speed and memory benefits, another big advantage of using the Iterators (Row and Cell, or Column and Cell) is that we get direct access to the cell itself. We can look at its value, its style; we can identify if it is a formula, or formatted as a date/time, whether it is part of a merge range: we can choose exactly what we want to do with it.
-
----
-
-One drawback of the Cell Iterator is that it will create a new cell if none exists (by default) unless we're skipping empty cells.
-Until PhpSpreadsheet 1.27.0, the Cell Iterator would always create a new Cell if one didn't exist in the Cell Collection when it was required to access it. And this can lead to increasing memory consumption.
-
-PhpSpreadsheet 1.27.0 introduced the option to return a null value rather than to create and return a new Cell.
-
-```php
-$rowIterator = $worksheet->getRowIterator(1, $maxDataRow);
-foreach ($rowIterator as $row) {
- $columnIterator = $row->getCellIterator();
- $columnIterator->setIfNotExists(CellIterator::IF_NOT_EXISTS_RETURN_NULL);
- foreach ($columnIterator as $cell) {
- if ($cell !== null) {
- // Do something with the cell here.
- }
- }
-}
-```
-
-The default Iterator behaviour is still to create a new Cell, to retain backward compatibility; but the option to return a null value instead of a new empty cell now exists.
-> **Note**: This default behaviour is likely to be reversed with the eventual release of PhpSpreadsheet 2.0, with a null value as the default return, but with the option to create a new empty cell.
-
-## Summary of Performance and Benefits
-
-So here is a quick summary of timing and memory usage for the three different approaches to iterating through the rows and cells of the 7000 row sample worksheet.
-
-Memory usage is adjusted for the 47,104 KB baseline of the loaded file.
-
-| Approach | Total Time (s) | Memory (KB) |
-|------------------------|----------------|-------------|
-| toArray() | 0.6733 | 10,240 |
-| rangeToArray (Batched) | 0.6844 | 2,048 |
-| Iterators | 0.0930 | 0 |
-
-These figures are all based on a well-formed spreadsheet, with no trailing empty rows, or empty rows within the dataset.
-Empty rows within a dataset can be identified by all three approaches, although only Iterators have a built-in method to identify an empty row.
-
-Using `toArray()` is not good for controlling memory usage, especially if there are trailing empty rows, so it should generally be avoided; but both `rangeToArray()` and the Iterators can exclude trailing rows by setting their scope based on the `getHighestDataRow()` and `getHighestDataColumn()` values.
-
-Batching rows with `rangeToArray()` is useful for keeping memory usage under control if you want to work with arrays.
-
-But using the Iterators is significantly faster than either "array" approach, with no memory overhead (especially if using the option of a null return for Cells that don't exist that was made available in PhpSpreadsheet 1.27.0); and as the Iterators return the Cell object rather than simply a cell value, they provide a lot more flexibility in how to process that cell.
-The flexibility to configure the definition of an empty row may also be useful to developers using this approach to iterating through a worksheet.
-
-## Conclusions
-
-While it might require a little more userland code by developers using PhpSpreadsheet; because they are faster, have no additional memory overhead, and provide more flexibility, Iterators are the recommended approach for looping through the rows (and cells) of a worksheet.
-
diff --git a/docs/topics/The Dating Game.md b/docs/topics/The Dating Game.md
deleted file mode 100644
index 5b0c2812ff..0000000000
--- a/docs/topics/The Dating Game.md
+++ /dev/null
@@ -1,303 +0,0 @@
-# The Dating Game
-
-Date and Time values are stored in different ways in spreadsheet files, depending on the file format; but internally when working in Excel the cell always contains a numeric value, representing the number of days since a baseline date, and formatted to appear as a human-readable date using a "Number Format Mask". This number is sometimes referred to as a serialized Excel date or timestamp.
-
-## Dates
-
-That baseline date is normally 1st January 1900, although it can be 1st January 1904 (if the original spreadsheet file was created using the Mac version of MS Excel). Excel maintains a flag in the file indicating which baseline should be used; for file formats that don't provide this flag (such as .slk or .csv), the calendar defaults to the 1900 baseline.
-
-
-Note that the baseline date itself is day 1; so strictly speaking, the base date 0 is '1899-12-31': Excel considers any value between 0 and 1 as purely a time value, trying to display 0 using a date format mask like 'yyyy-mm-dd' will show an invalid date like '1900-01-00' rather than '1899-12-31', but when using a time format mask like 'hh:mm:ss' it will appear as '00:00:00' (midnight). Values less than 0 are invalid as dates or as times, so a negative value in a cell with a date "Number Format Mask" will display as '############' in Excel.
-
-Open/Libre Office and Gnumeric don't have this limitation, and negative date/timestamp values are recognised and formatted correctly; but it is recommended that you don't rely on this when working with PhpSpreadsheet.
-
-To write a date in a cell using PhpSpreadsheet, we need to calculate the serialized Excel datestamp for that date. Methods to do this are available in the Shared\Date class, which provides a number of methods for conversion between different date options typically used in PHP applications (Unix timestamp, PHP DateTime objects and some recognisable formatted strings) and the Excel serialized value; and vice versa.
-
- - Shared\Date::convertIsoDate()
- - Converts a date/time in [ISO-8601 standard format](https://en.wikipedia.org/wiki/ISO_8601) to an Excel serialized timestamp
- - Shared\Date::PHPToExcel()
- - Converts a Unix timestamp, a PHP DateTime object, or a recognisable formatted string to an Excel serialized timestamp
- - Shared\Date::dateTimeToExcel()
- - Converts a Unix timestamp to an Excel serialized timestamp
- - Shared\Date::timestampToExcel()
- - Converts a PHP DateTime object to an Excel serialized timestamp
- - Shared\Date::formattedPHPToExcel()
- - Converts year, month, day, hour, minute, and second to an Excel serialized timestamp
- - Shared\Date::excelToDateTimeObject()
- - Converts an Excel serialized timestamp to a PHP DateTime object
- - Shared\Date::excelToTimestamp()
- - Converts an Excel serialized timestamp to a Unix timestamp.
- - The use of Unix timestamps, and therefore this function, is discouraged: they are not Y2038-safe on a 32-bit system, and have no timezone info.
-
-We probably also want to set the number format mask for the cell so that it will be displayed as a human-readable date.
-```php
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
-use PhpOffice\PhpSpreadsheet\Shared\Date as SharedDate;
-
-// Create new Spreadsheet object
-$spreadsheet = new Spreadsheet();
-$worksheet = $spreadsheet->getActiveSheet();
-
-// Calculate today's date as an Excel serialized timestamp
-$today = SharedDate::PHPToExcel(new DateTime('today'));
-
-$data = [
- ['Formatted Date', 'Numeric Value'],
- ['=C2', 1],
- ['=C3', 2],
- ['=C4', $today],
-];
-
-// Write our data to the worksheet
-$worksheet->fromArray($data, null, 'B1');
-
-// Display values in column B as human-readable dates
-$worksheet->getStyle('B2:B4')->getNumberFormat()->setFormatCode('yyyy-mm-dd');
-// Set some additional styling
-$worksheet->getStyle('B1:C1')->getFont()->setBold(true);
-$worksheet->getColumnDimension('B')->setAutoSize(true);
-```
-
-## Times
-
-Dates are always the integer part of the value (1, 2, 44943): the fractional part of the value is used to represent the time as a fraction of the day. So a value of 0.5 is 12:00 midday; 0.25 is 06:00 in the morning and 0.75 is 18:00 in the evening.
-
-
-A float value greater than 1, like 44943.5 is considered as a datetime value: 12:00 (midday) on the 17th of January 2023.
-
-As with dates, to write a time value to a cell in PhpSpreadsheet, we write the numeric value for that time (or date/time) to the cell, and then apply a number format mask to the cell so that it will be displayed in a human-readable format.
-```php
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
-use PhpOffice\PhpSpreadsheet\Shared\Date as SharedDate;
-
-// Create new Spreadsheet object
-$spreadsheet = new Spreadsheet();
-$worksheet = $spreadsheet->getActiveSheet();
-
-// Calculate today's date as an Excel serialized timestamp
-$today = SharedDate::PHPToExcel(new DateTime('today'));
-
-$data = [
- ['Formatted Time', 'Numeric Value'],
- ['=C2', 0],
- ['=C3', 0.25],
- ['=C4', 0.5],
- ['=C5', 0.75],
- ['=C6', $today + 0.5],
-];
-
-// Write our data to the worksheet
-$worksheet->fromArray($data, null, 'B1', true);
-
-// Display values in column B as human-readable dates
-$worksheet->getStyle('B2:B5')->getNumberFormat()->setFormatCode('hh:mm:ss');
-$worksheet->getStyle('B6')->getNumberFormat()->setFormatCode('yyyy-mm-dd hh:mm:ss');
-// Set some additional styling
-$worksheet->getStyle('B1:C1')->getFont()->setBold(true);
-$worksheet->getColumnDimension('B')->setAutoSize(true);
-```
-
-The same `Shared\Date` functions that convert between Excel dates and Unix Timestamps or PHP DateTime objects can also be used to convert time values.
-
-## Dates/Times and Value Binders
-
-It is a standing joke that MS Excel tries to identify date and time values as you are entering data in Excel, and often treats any value as a possible date, converting it to an Excel serialized timestamp and applying date/time formatting, even though that may not have been what was intended.
-
-
-Any change to a cell value in PhpSpreadsheet that isn't made using the setCellValueExplicit() method is passed through a "Value Binder", which triggers additional settings for that cell.
-
-> **Note**: dates and times maintained in true spreadsheet format files are always correctly identified in the file, and setCellValueExplicit() is used to store those values, with the formatting mask defined in that file. However, non-spreadsheet files such as .csv don't identify dates/times, so the Value Binder behaviour applies when loading those files.
-
-
-The Default Value Binder attempts to identify the datatype of the value and sets the cell datatype accordingly: and if you pass a string value like '2023-01-18 12:15:00' then the Default Value Binder will simply treat it as a string, and set it accordingly.
-
-However, if you choose to use the Advanced Value Binder, then that contains logic which looks more closely at those string values, and tries to determine if they are likely to be formatted dates or times, and in that regard it emulates Excel's behaviour. If the string value looks like a date or time, then it is converted to a serialized Excel date/timestamp, and an appropriate format mask is set for that cell.
-
-While the logic of this isn't perfect, I'd like to believe that it is less error-prone than Excel's own logic; but it won't necessarily recognise ambiguous formats and values correctly like '1/7/2023' as dates. (Is that the 1st of July? Or the 7th of January?)
-
-## Reading Dates and Times from cells
-
-When we read the value of a cell that contains a Date/Time value, we are only reading a number (the Excel serialized timestamp); it is only the Number Format Mask that allows us to say whether that number is simply a number, or is meant to be a Date/Time value.
-
-PhpSpreadsheet provides a number of methods to identify whether a Number Format Mask represents a Date/Time format mask, or whether a Cell is formatted as a Date/Time.
-
-- Shared\Date::isDateTimeFormat()
- - Identifies if a NumberFormat Style object is an Excel Date/Time style format mask.
-- Shared\Date::isDateTimeFormatCode()
- - Identifies if the string value of a Number Format mask is an Excel Date/Time style format mask.
-- Shared\Date::isDateTime()
- - Identifies if a Cell is styled with a Number Format mask is an Excel Date/Time style format mask.****
-
-These functions allow you to identify whether a cell value should be converted to a Unix Timestamp or PHP DateTime object (using one of the conversion functions provided in `Shared\Date`) for processing in your script, or for formatting as a Date/Time value.
-
-## Date Arithmetic
-
-Because dates and times are just numeric values in MS Excel, this makes date/time arithmetic very easy to calculate: to count the number of days (or a duration) between two dates, we can use a simple subtraction.
-
-
-Similarly, we can add date/time values like adding a duration to a start date to calculate an end date.
-
-
-## Excel Date Functions
-
-MS Excel provides a number of functions that will return a date or a time value. It also recognises when one of these functions is the "outer" function in a formula, so the final result will always be a serialized date/time value, and sets an appropriate format mask for that value.
-
-This behaviour is not replicated in PhpSpreadsheet. If you set a formula for a cell through your code that will return a date or time value, then you will also need to set the format mask for that cell manually.
-
-## Formatting Options
-
-PhpSpreadsheet provides a number of built-in format code constants for dates and times in the NumberFormat class, matching those defined in the OfficeOpenXML specification, but you can always just set the format to any valid Excel formatting string, the equivalent of setting a custom date format in Excel.
-
-### Dates
-
-When setting up a custom date format in Excel, you can use the following codes.
-
-| Code | Description | Example (January 3, 2023) |
-|-------|-------------------------------------|---------------------------------------|
-| m | Month number without a leading zero | 1 |
-| mm | Month number with a leading zero | 01 |
-| mmm | Month name, short form | Jan |
-| mmmm | Month name, full form | January |
-| mmmmm | Month as the first letter | J (stands for January, June and July) |
-| d | Day number without a leading zero | 3 |
-| dd | Day number with a leading zero | 03 |
-| ddd | Day of the week, short form | Tue |
-| dddd | Day of the week, full form | Tuesday |
-| yy | Year (last 2 digits) | 23 |
-| yyyy | Year (4 digits) | 2023 |
-
-### Times
-
-When setting up a custom time format in Excel, you can use the following codes.
-
-| Code | Description | Displays as |
-|--------|--------------------------------------------------------------------|-------------|
-| h | Hours without a leading zero | 0-23 |
-| hh | Hours with a leading zero | 00-23 |
-| m | Minutes without a leading zero | 0-59 |
-| mm | Minutes with a leading zero | 00-59 |
-| s | Seconds without a leading zero | 0-59 |
-| ss | Seconds with a leading zero | 00-59 |
-| AM/PM | Periods of the day (if omitted, 24-hour time format is used) | AM or PM |
-> **Warning**
-MS Excel allows any separator character between hours/minutes/seconds; PhpSpreadsheet currently requires a colon (`:`) to correctly distinguish minutes from months when rendering a time format within PHP code, although it will correctly write the format to file if any other separator character is used.
-
-### Duration (Elapsed Time)
-
-Excel also supports formatting a value as a duration; a total number of hours, minutes or seconds rather than a time of day.
-
-| Code | Description | Displays as |
-|---------|----------------------------------------------------------------|-------------|
-| [h]:mm | Elapsed time in hours | e.g. 25:02 |
-| [hh]:mm | Elapsed time in hours with a leading zero if less than 10 | e.g. 05:02 |
-| [mm]:ss | Elapsed time in minutes | e.g. 63:46 |
-| [m]:ss | Elapsed time in minutes with a leading zero if less than 10 | e.g. 03:46 |
-| [s] | Elapsed time in seconds | |
-| [ss] | Elapsed time in seconds with a leading zero if less than 10 | |
-
-If you want to display an elapsed time in days, then you can use a normal date mask like `d h:mm` (without month or year), with the limitation that it will not exceed 31 days.
-
-### Localisation
-
-#### Built-in Formats
-
-Some of the Excel built-in format masks are locale-aware.
-
-
-Those locale-aware formats are highlighted with a * in Excel's drop-down lists for Date and Time, and will adapt when viewed in MS Excel, based on the locale settings of that local PC.
-
-PhpSpreadsheet is not locale-aware, so it will not render these formats as locale-formats, just as generic Date/Time formats; and localisation will be not be saved when writing to a spreadsheet file.
-
-#### Custom Formats
-
-When you're displaying a date/time using a format mask that isn't locale-aware in MS Excel, the locale settings for Excel are applied. So if you're displaying a month or day name, these will appear in the appropriate language for the locale of your PC.
-
-
-You can force the display for a specific locale by prefixing the format mask with a locale setting, so that Excel will render it using the appropriate language. The locale code should be enclosed in [square brackets] and preceded with the dollar sign ($) and a dash (-).
-
-In this example, I'm forcing Dutch Netherlands by prefixing the mask with `[$-nl-NL]`. As an alternative, I could also have used the Windows LCID for that locale (`[$-413]`).
-
-
-Because PhpSpreadsheet is not locale-aware, displaying the formatted value for that cell in your PHP script won't show the locale date/time, only a generic date/time; but it will still be written correctly when the file is saved (as a spreadsheet format) for Excel to render correctly and in the appropriate language.
-
-If you need this, then you can find a list of Windows LCID values [here](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/a29e5c28-9fb9-4c49-8e43-4b9b8e733a05)
-
-## Summary Example
-
-Let's summarise some of this information with a script that will build a project timesheet for a week of work on that project.
-
-I'll keep the basic data in arrays for simplicity.
-```php
-// In a real application, we might read this data from a database to build a project timesheet
-$projectHeading = [['Project', 'PhpSpreadsheet - The Dating Game']];
-$weekHeading = [
- ['Week', '=ISOWEEKNUM(D3)', 'Start Date', '=DATE(2023,1,16)'],
- ['Day', 'Start Time', 'End Time', 'Hours Worked'],
-];
-
-$timesheetData = [
- ['2023-01-16', '17:25', '20:15'],
- ['2023-01-16', '20:50', '23:35'],
- ['2023-01-17', '18:10', '19:35'],
- ['2023-01-17', '20:10', '22:15'],
- ['2023-01-17', '22:35', '23:45'],
- ['2023-01-18', '09:15', '11:25'],
-];
-```
-Because I've used string values for the dates and times, I'm going to use the Advanced Value Binder to populate the worksheet.
-The Binder will also format the time values in columns B and C; but I want to override the Binder formatting for date values in column A; and I'm using an Excel formula for the "start date" value in cell D3, so I have to set the format manually for that.
-```php
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
-use PhpOffice\PhpSpreadsheet\Cell\Cell;
-use PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder;
-use PhpOffice\PhpSpreadsheet\Style\Alignment;
-
-// Create new Spreadsheet object
-$spreadsheet = new Spreadsheet();
-$worksheet = $spreadsheet->getActiveSheet();
-// Use the Advanced Value Binder so that our string date/time values will be automatically converted
-// to Excel serialized date/timestamps
-// Old method using static property
-Cell::setValueBinder(new AdvancedValueBinder());
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet->setValueBinder(new AdvancedValueBinder());
-
-// Write our data to the worksheet
-$worksheet->fromArray($projectHeading);
-$worksheet->fromArray($weekHeading, null, 'A3');
-
-// Let Excel calculate the duration for each timesheet entry
-$row = 4;
-foreach ($timesheetData as $timesheetEntry) {
- ++$row;
- $worksheet->fromArray($timesheetEntry, null, "A{$row}");
- $worksheet->setCellValue("D{$row}", "=C{$row} - B{$row}");
-}
-$totalRow = $row + 2;
-$worksheet->setCellValue("D{$totalRow}", "=SUM(D4:D{$row})");
-$worksheet->setCellValue("E{$totalRow}", 'Total Hours');
-```
-And then the final formatting:
-```php
-// Display values in column A as human-readable dates
-$worksheet->getStyle("A5:A{$row}")->getNumberFormat()->setFormatCode('dd (ddd)');
-// Display values in column D as human-readable durations
-$worksheet->getStyle("D5:D{$totalRow}")->getNumberFormat()->setFormatCode('[h]:mm');
-
-// Set some additional styling
-$worksheet->getStyle('D3')->getNumberFormat()->setFormatCode('yyyy-mm-dd');
-$worksheet->getStyle('A1')->getFont()->setBold(true);
-$worksheet->getStyle('A3:D4')->getFont()->setBold(true);
-$worksheet->getStyle("A5:A{$row}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
-$worksheet->getColumnDimension('D')->setAutoSize(true);
-$worksheet->getStyle("E{$totalRow}")->getFont()->setBold(true);
-```
-
-And the resulting spreadsheet will look something like:
-
-
-## Final Notes
-
-MS Excel is not Timezone aware, nor does it have any logic for handling Daylight Savings.
-
-Excel functions like the NOW() function return the serialized timestamp of the current date and time. The date and time are provided by the operating system, and that determines, according to the time zone and date of the year if Daylight Saving Time is in effect. So functions like NOW() include any DST offset, because it is automatically included by the OS.
diff --git a/docs/topics/accessing-cells.md b/docs/topics/accessing-cells.md
index a9fe3695de..f14e2bde46 100644
--- a/docs/topics/accessing-cells.md
+++ b/docs/topics/accessing-cells.md
@@ -2,24 +2,21 @@
Accessing cells in a Spreadsheet should be pretty straightforward. This
topic lists some of the options to access a cell.
-For all of these, the cell can be accessed by coordinate (e.g. `B3`),
-by an array of column index (where A is 1) and row (e.g. `[2, 3]`),
-or as a CellAddress object (e.g. `new CellAddress('B3', /* optional */ $worksheet)`.
-## Setting a cell value
+## Setting a cell value by coordinate
-Setting a cell value can be done using the worksheet's
+Setting a cell value by coordinate can be done using the worksheet's
`setCellValue()` method.
-```php
+``` php
// Set cell A1 with a string value
$spreadsheet->getActiveSheet()->setCellValue('A1', 'PhpSpreadsheet');
// Set cell A2 with a numeric value
-$spreadsheet->getActiveSheet()->setCellValue([1, 2], 12345.6789);
+$spreadsheet->getActiveSheet()->setCellValue('A2', 12345.6789);
// Set cell A3 with a boolean value
-$spreadsheet->getActiveSheet()->setCellValue(new CellAddress('A3'), TRUE);
+$spreadsheet->getActiveSheet()->setCellValue('A3', TRUE);
// Set cell A4 with a formula
$spreadsheet->getActiveSheet()->setCellValue(
@@ -31,66 +28,12 @@ $spreadsheet->getActiveSheet()->setCellValue(
Alternatively, you can retrieve the cell object, and then call the
cell’s `setValue()` method:
-```php
+``` php
$spreadsheet->getActiveSheet()
->getCell('B8')
->setValue('Some value');
```
-### Creating a new Cell
-
-If you make a call to `getCell()`, and the cell doesn't already exist, then
-PhpSpreadsheet will create that cell for you.
-
-### BEWARE: Cells and Styles assigned to variables as a Detached Reference
-
-As an "in-memory" model, PHPSpreadsheet can be very demanding of memory,
-particularly when working with large spreadsheets. One technique used to
-reduce this memory overhead is cell caching, so cells are actually
-maintained in a collection that may or may not be held in memory while you
-are working with the spreadsheet. Because of this, a call to `getCell()`
-(or any similar method) returns the cell data, and sets a cell pointer to that cell in the collection.
-While this is not normally an issue, it can become significant
-if you assign the result of a call to `getCell()` to a variable. Any
-subsequent calls to retrieve other cells will change that pointer, although
-the cell object will still retain its data values.
-This is also true when assigning a variable to the result of `getStyle()`.
-
-What does this mean? Consider the following code:
-
-```php
-$spreadSheet = new Spreadsheet();
-$workSheet = $spreadSheet->getActiveSheet();
-
-// Set details for the formula that we want to evaluate, together with any data on which it depends
-$workSheet->fromArray(
- [1, 2, 3],
- null,
- 'A1'
-);
-
-$cellC1 = $workSheet->getCell('C1');
-echo 'Value: ', $cellC1->getValue(), '; Address: ', $cellC1->getCoordinate(), PHP_EOL;
-
-$cellA1 = $workSheet->getCell('A1');
-echo 'Value: ', $cellA1->getValue(), '; Address: ', $cellA1->getCoordinate(), PHP_EOL;
-
-echo 'Value: ', $cellC1->getValue(), '; Address: ', $cellC1->getCoordinate(), PHP_EOL;
-```
-
-The call to `getCell('C1')` returns the cell at `C1` containing its value (`3`),
-together with its link to the collection (used to identify its
-address/coordinate `C1`). The subsequent call to access cell `A1`
-modifies the value of `$cellC1`, detaching its link to the collection.
-
-So when we try to display the value and address a second time, we can display
-its value, but trying to display its address/coordinate will throw an
-exception because that link has been set to null.
-
-__Note:__ There are some internal methods that will fetch other cells from the
-collection, and this too will detach the link to the collection from any cell
-that you might have assigned to a variable.
-
## Excel DataTypes
MS Excel supports 7 basic datatypes:
@@ -112,11 +55,6 @@ values beginning with `=` will be converted to a formula. Strings that
aren't numeric, or that don't begin with a leading `=` will be treated
as genuine string values.
-Note that a numeric string that begins with a leading zero (that isn't
-immediately followed by a decimal separator) will not be converted to a
-numeric, so values like phone numbers (e.g. `01615991375``will remain as
-strings).
-
This "conversion" is handled by a cell "value binder", and you can write
custom "value binders" to change the behaviour of these "conversions".
The standard PhpSpreadsheet package also provides an "advanced value
@@ -145,37 +83,8 @@ Formats handled by the advanced value binder include:
- When strings contain a newline character (`\n`), then the cell styling is
set to wrap.
-Basically, it attempts to mimic the behaviour of the MS Excel GUI.
-
-You can read more about value binders [later in this section of the
-documentation](#using-value-binders-to-facilitate-data-entry).
-
-### Setting a formula in a Cell
-
-As stated above, if you store a string value with the first character an `=`
-in a cell. PHPSpreadsheet will treat that value as a formula, and then you
-can evaluate that formula by calling `getCalculatedValue()` against the cell.
-
-There may be times though, when you wish to store a value beginning with `=`
-as a string, and that you don't want PHPSpreadsheet to evaluate as though it
-was a formula.
-
-To do this, you need to "escape" the value by setting it as "quoted text".
-
-```php
-// Set cell A4 with a formula
-$spreadsheet->getActiveSheet()->setCellValue(
- 'A4',
- '=IF(A3, CONCATENATE(A1, " ", A2), CONCATENATE(A2, " ", A1))'
-);
-$spreadsheet->getActiveSheet()->getCell('A4')
- ->getStyle()->setQuotePrefix(true);
-```
-
-Then, even if you ask PHPSpreadsheet to return the calculated value for cell
-`A4`, it will return `=IF(A3, CONCATENATE(A1, " ", A2), CONCATENATE(A2, " ", A1))`
-as a string, and not try to evaluate the formula.
-
+You can read more about value binders later in this section of the
+documentation.
### Setting a date and/or time value in a cell
@@ -184,7 +93,7 @@ point value), and a number format mask is used to show how that value
should be formatted; so if we want to store a date in a cell, we need to
calculate the correct Excel timestamp, and set a number format mask.
-```php
+``` php
// Get the current date/time and convert to an Excel date/time
$dateTimeNow = time();
$excelDateValue = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel( $dateTimeNow );
@@ -219,7 +128,7 @@ behaviour.
Firstly, you can set the datatype explicitly as a string so that it is
not converted to a number.
-```php
+``` php
// Set cell A8 with a numeric value, but tell PhpSpreadsheet it should be treated as a string
$spreadsheet->getActiveSheet()->setCellValueExplicit(
'A8',
@@ -231,7 +140,7 @@ $spreadsheet->getActiveSheet()->setCellValueExplicit(
Alternatively, you can use a number format mask to display the value
with leading zeroes.
-```php
+``` php
// Set cell A9 with a numeric value
$spreadsheet->getActiveSheet()->setCellValue('A9', 1513789642);
// Set a number format mask to display the value as 11 digits with leading zeroes
@@ -245,7 +154,7 @@ $spreadsheet->getActiveSheet()->getStyle('A9')
With number format masking, you can even break up the digits into groups
to make the value more easily readable.
-```php
+``` php
// Set cell A10 with a numeric value
$spreadsheet->getActiveSheet()->setCellValue('A10', 1513789642);
// Set a number format mask to display the value as 11 digits with leading zeroes
@@ -268,7 +177,7 @@ writers (Xlsx and Xls).
It is also possible to set a range of cell values in a single call by
passing an array of values to the `fromArray()` method.
-```php
+``` php
$arrayData = [
[NULL, 2010, 2011, 2012],
['Q1', 12, 15, 21],
@@ -291,7 +200,7 @@ If you pass a 2-d array, then this will be treated as a series of rows
and columns. A 1-d array will be treated as a single row, which is
particularly useful if you're fetching an array of data from a database.
-```php
+``` php
$rowArray = ['Value1', 'Value2', 'Value3', 'Value4'];
$spreadsheet->getActiveSheet()
->fromArray(
@@ -308,7 +217,7 @@ If you have a simple 1-d array, and want to write it as a column, then
the following will convert it into an appropriately structured 2-d array
that can be fed to the `fromArray()` method:
-```php
+``` php
$rowArray = ['Value1', 'Value2', 'Value3', 'Value4'];
$columnArray = array_chunk($rowArray, 1);
$spreadsheet->getActiveSheet()
@@ -322,13 +231,13 @@ $spreadsheet->getActiveSheet()

-## Retrieving a cell value
+## Retrieving a cell value by coordinate
To retrieve the value of a cell, the cell should first be retrieved from
the worksheet using the `getCell()` method. A cell's value can be read
using the `getValue()` method.
-```php
+``` php
// Get the value from cell A1
$cellValue = $spreadsheet->getActiveSheet()->getCell('A1')->getValue();
```
@@ -340,7 +249,7 @@ value rather than the formula itself, then use the cell's
`getCalculatedValue()` method. This is further explained in
[the calculation engine](./calculation-engine.md).
-```php
+``` php
// Get the value from cell A4
$cellValue = $spreadsheet->getActiveSheet()->getCell('A4')->getCalculatedValue();
```
@@ -349,18 +258,49 @@ Alternatively, if you want to see the value with any cell formatting
applied (e.g. for a human-readable date or time value), then you can use
the cell's `getFormattedValue()` method.
-```php
+``` php
// Get the value from cell A6
$cellValue = $spreadsheet->getActiveSheet()->getCell('A6')->getFormattedValue();
```
+## Setting a cell value by column and row
+
+Setting a cell value by coordinate can be done using the worksheet's
+`setCellValueByColumnAndRow()` method.
+
+``` php
+// Set cell A5 with a string value
+$spreadsheet->getActiveSheet()->setCellValueByColumnAndRow(1, 5, 'PhpSpreadsheet');
+```
+
+**Note:** that column references start with `1` for column `A`.
+
+## Retrieving a cell value by column and row
+
+To retrieve the value of a cell, the cell should first be retrieved from
+the worksheet using the `getCellByColumnAndRow()` method. A cell’s value can
+be read again using the following line of code:
+
+``` php
+// Get the value from cell B5
+$cellValue = $spreadsheet->getActiveSheet()->getCellByColumnAndRow(2, 5)->getValue();
+```
+
+If you need the calculated value of a cell, use the following code. This
+is further explained in [the calculation engine](./calculation-engine.md).
+
+``` php
+// Get the value from cell A4
+$cellValue = $spreadsheet->getActiveSheet()->getCellByColumnAndRow(1, 4)->getCalculatedValue();
+```
+
## Retrieving a range of cell values to an array
It is also possible to retrieve a range of cell values to an array in a
single call using the `toArray()`, `rangeToArray()` or
`namedRangeToArray()` methods.
-```php
+``` php
$dataArray = $spreadsheet->getActiveSheet()
->rangeToArray(
'C3:E5', // The worksheet range that we want to retrieve
@@ -387,7 +327,7 @@ cells within a row.
Below is an example where we read all the values in a worksheet and
display them in a table.
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$reader->setReadDataOnly(TRUE);
$spreadsheet = $reader->load("test.xlsx");
@@ -400,10 +340,8 @@ foreach ($worksheet->getRowIterator() as $row) {
$cellIterator = $row->getCellIterator();
$cellIterator->setIterateOnlyExistingCells(FALSE); // This loops through all cells,
// even if a cell value is not set.
- // For 'TRUE', we loop through cells
- // only when their value is set.
- // If this method is not called,
- // the default value is 'false'.
+ // By default, only cells that have a value
+ // set will be iterated.
foreach ($cellIterator as $cell) {
echo '
' .
$cell->getValue() .
@@ -414,25 +352,16 @@ foreach ($worksheet->getRowIterator() as $row) {
echo '' . PHP_EOL;
```
-Note that we have set the cell iterator's `setIterateOnlyExistingCells()`
-to FALSE. This makes the iterator loop all cells within the worksheet
-range, even if they have not been set.
-
-The cell iterator will create a new empty cell in the worksheet if it
-doesn't exist; return a `null` as the cell value if it is not set in
-the worksheet; although we can also tell it to return a null value
-rather than returning a new empty cell.
-Setting the cell iterator's `setIterateOnlyExistingCells()` to `false`
-will loop all cells in the worksheet that can be available at that
-moment. If this is then set to create new cells if required, then it
-will likely increase memory usage!
-Only use it if it is intended to loop all cells that are possibly
-available; otherwise use the option to return a null value if a cell
-doesn't exist, or iterate only the cells that already exist.
-
-It is also possible to call the Row object's `isEmpty()` method to
-determine whether you need to instantiate the Cell Iterator for that
-Row.
+Note that we have set the cell iterator's
+`setIterateOnlyExistingCells()` to FALSE. This makes the iterator loop
+all cells within the worksheet range, even if they have not been set.
+
+The cell iterator will return a `null` as the cell value if it is not
+set in the worksheet. Setting the cell iterator's
+`setIterateOnlyExistingCells()` to `false` will loop all cells in the
+worksheet that can be available at that moment. This will create new
+cells if required and increase memory usage! Only use it if it is
+intended to loop all cells that are possibly available.
### Looping through cells using indexes
@@ -445,22 +374,22 @@ loops.
Below is an example where we read all the values in a worksheet and
display them in a table.
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$reader->setReadDataOnly(TRUE);
$spreadsheet = $reader->load("test.xlsx");
$worksheet = $spreadsheet->getActiveSheet();
// Get the highest row and column numbers referenced in the worksheet
-$highestRow = $worksheet->getHighestDataRow(); // e.g. 10
-$highestColumn = $worksheet->getHighestDataColumn(); // e.g 'F'
+$highestRow = $worksheet->getHighestRow(); // e.g. 10
+$highestColumn = $worksheet->getHighestColumn(); // e.g 'F'
$highestColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($highestColumn); // e.g. 5
echo '
' . PHP_EOL;
Alternatively, you can take advantage of PHP's "Perl-style" character
incrementors to loop through the cells by coordinate:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$reader->setReadDataOnly(TRUE);
$spreadsheet = $reader->load("test.xlsx");
$worksheet = $spreadsheet->getActiveSheet();
// Get the highest row number and column letter referenced in the worksheet
-$highestRow = $worksheet->getHighestDataRow(); // e.g. 10
-$highestColumn = $worksheet->getHighestDataColumn(); // e.g 'F'
+$highestRow = $worksheet->getHighestRow(); // e.g. 10
+$highestColumn = $worksheet->getHighestColumn(); // e.g 'F'
// Increment the highest column letter
-++$highestColumn;
+$highestColumn++;
echo '
' . "\n";
for ($row = 1; $row <= $highestRow; ++$row) {
@@ -512,20 +441,20 @@ types of entered data using a cell's `setValue()` method (the
Optionally, the default behaviour of PhpSpreadsheet can be modified,
allowing easier data entry. For example, a
`\PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder` class is available.
-It automatically converts percentages, numbers in scientific format, and
+It automatically converts percentages, number in scientific format, and
dates entered as strings to the correct format, also setting the cell's
style information. The following example demonstrates how to set the
value binder in PhpSpreadsheet:
-```php
-// Older method using static property
+``` php
+/** PhpSpreadsheet */
+require_once 'src/Boostrap.php';
+
+// Set value binder
\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
-// Create new Spreadsheet object
-$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
-// Preferred method using dynamic property since 3.4.0
+// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
-$spreadsheet->setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
// ...
// Add some data, resembling some different data types
@@ -538,54 +467,8 @@ $spreadsheet->getActiveSheet()->setCellValue('A5', 'Date/time value:');
$spreadsheet->getActiveSheet()->setCellValue('B5', '21 December 1983');
```
-Alternatively, a `\PhpOffice\PhpSpreadsheet\Cell\StringValueBinder` class is available
-if you want to preserve all content as strings. This might be appropriate if you
-were loading a file containing values that could be interpreted as numbers (e.g. numbers
-with leading sign such as international phone numbers like `+441615579382`), but that
-should be retained as strings (non-international phone numbers with leading zeroes are
-already maintained as strings).
-
-By default, the StringValueBinder will cast any datatype passed to it into a string. However, there are a number of settings which allow you to specify that certain datatypes shouldn't be cast to strings, but left "as is":
-
-```php
-// Set value binder
-$stringValueBinder = new \PhpOffice\PhpSpreadsheet\Cell\StringValueBinder();
-$stringValueBinder->setNumericConversion(false)
- ->setSetIgnoredErrors(true) // suppresses "number stored as text" indicators
- ->setBooleanConversion(false)
- ->setNullConversion(false)
- ->setFormulaConversion(false);
-// Older method using static property
-\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( $stringValueBinder );
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
-$spreadsheet->setValueBinder( $stringValueBinder );
-```
-
-You can override the current binder when setting individual cell values by specifying a different Binder to use in the Cell's `setValue()` or the Worksheet's `setCellValue()` methods.
-```php
-$spreadsheet = new Spreadsheet();
-// Old method using static property
-Cell::setValueBinder(new AdvancedValueBinder());
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet->setValueBinder(new AdvancedValueBinder());
-
-$value = '12.5%';
-
-$cell = $spreadsheet->getActiveSheet()->getCell('A1');
-// Value will be set as a number 0.125 with a format mask '0.00%'
-$cell->setValue($value); // Using the Advanced Value Binder
-
-$cell = $spreadsheet->getActiveSheet()->getCell('A2');
-// Value will be set as a string '12.5%' with a format mask 'General'
-$cell->setValue($value, new StringValueBinder()); // Overriding the Advanced Value Binder
-```
-
-
-### Creating your own value binder
-
-Creating your own value binder is relatively straightforward. When more specialised
-value binding is required, you can implement the
-`\PhpOffice\PhpSpreadsheet\Cell\IValueBinder` interface or extend the existing
+**Creating your own value binder is easy.** When advanced value binding
+is required, you can implement the
+`\PhpOffice\PhpSpreadsheet\Cell\IValueBinder` interface or extend the
`\PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder` or
`\PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder` classes.
diff --git a/docs/topics/architecture.md b/docs/topics/architecture.md
index 1c544ef746..0295d672d8 100644
--- a/docs/topics/architecture.md
+++ b/docs/topics/architecture.md
@@ -43,7 +43,7 @@ PhpSpreadsheet supports fluent interfaces in most locations. This means
that you can easily "chain" calls to specific methods without requiring
a new PHP statement. For example, take the following code:
-```php
+``` php
$spreadsheet->getProperties()->setCreator("Maarten Balliauw");
$spreadsheet->getProperties()->setLastModifiedBy("Maarten Balliauw");
$spreadsheet->getProperties()->setTitle("Office 2007 XLSX Test Document");
@@ -55,7 +55,7 @@ $spreadsheet->getProperties()->setCategory("Test result file");
This can be rewritten as:
-```php
+``` php
$spreadsheet->getProperties()
->setCreator("Maarten Balliauw")
->setLastModifiedBy("Maarten Balliauw")
diff --git a/docs/topics/autofilters.md b/docs/topics/autofilters.md
index a802836971..66321ee9dc 100644
--- a/docs/topics/autofilters.md
+++ b/docs/topics/autofilters.md
@@ -42,7 +42,7 @@ column, such as "Equals a red cell color" or "Larger than 150".
To set an autoFilter on a range of cells.
-```php
+``` php
$spreadsheet->getActiveSheet()->setAutoFilter('A1:E20');
```
@@ -56,7 +56,7 @@ developer to avoid such errors.
If you want to set the whole worksheet as an autofilter region
-```php
+``` php
$spreadsheet->getActiveSheet()->setAutoFilter(
$spreadsheet->getActiveSheet()
->calculateWorksheetDimension()
@@ -65,13 +65,6 @@ $spreadsheet->getActiveSheet()->setAutoFilter(
This enables filtering, but does not actually apply any filters.
-After setting the range, you can change it so that the end row is the
-last row used on the worksheet:
-
-```php
-$spreadsheet->getActiveSheet()->getAutoFilter()->setRangeToMaxRow();
-```
-
## Autofilter Expressions
PHPEXcel 1.7.8 introduced the ability to actually create, read and write
@@ -81,7 +74,7 @@ will extend this to other formats.
To apply a filter expression to an autoFilter range, you first need to
identify which column you're going to be applying this filter to.
-```php
+``` php
$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
$columnFilter = $autoFilter->getColumn('C');
```
@@ -106,8 +99,6 @@ results are unpredictable.
Other filter expression types (such as cell colour filters) are not yet
supported.
-String comparisons in filters are case-insensitive.
-
### Simple filters
In MS Excel, Simple Filters are a dropdown list of all values used in
@@ -122,10 +113,8 @@ will be hidden.
To create a filter expression, we need to start by identifying the
filter type. In this case, we're just going to specify that this filter
is a standard filter.
-*Please note that Excel regards only tests for equal as a standard filter;
-all others, including tests for not equal, must be supplied as custom filters.*
-```php
+``` php
$columnFilter->setFilterType(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER
);
@@ -138,7 +127,7 @@ When creating a simple filter in PhpSpreadsheet, you only need to
specify the values for "checked" columns: you do this by creating a
filter rule for each value.
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
@@ -163,7 +152,7 @@ standard filters are always treated as being joined by an OR condition.
If you want to create a filter to select blank cells, you would use:
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
@@ -181,7 +170,7 @@ within a year, or individual days within each month.
DateGroup filters are still applied as a Standard Filter type.
-```php
+``` php
$columnFilter->setFilterType(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER
);
@@ -192,7 +181,7 @@ for "checked" columns as an associative array of year. month, day, hour
minute and second. To select a year and month, you need to create a
DateGroup rule identifying the selected year and month:
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
@@ -240,7 +229,7 @@ either an AND or an OR.
We start by specifying a Filter type, this time a CUSTOMFILTER.
-```php
+``` php
$columnFilter->setFilterType(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER
);
@@ -251,7 +240,7 @@ And then define our rules.
The following shows a simple wildcard filter to show all column entries
beginning with the letter `U`.
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
@@ -262,21 +251,20 @@ $columnFilter->createRule()
);
```
-MS Excel uses `*` as a wildcard to match any number of characters, and `?`
-as a wildcard to match a single character. `U*` equates to "begins with
-a 'U'"; `*U` equates to "ends with a 'U'"; and `*U*` equates to
-"contains a 'U'".
-Note that PhpSpreadsheet recognizes wildcards only for equal/not-equal tests.
+MS Excel uses \* as a wildcard to match any number of characters, and ?
+as a wildcard to match a single character. 'U\*' equates to "begins with
+a 'U'"; '\*U' equates to "ends with a 'U'"; and '\*U\*' equates to
+"contains a 'U'"
-If you want to match explicitly against `*` or `?`, you can
-escape it with a tilde `~`, so `?~**` would explicitly match for `*`
-as the second character in the cell value, followed by any
+If you want to match explicitly against a \* or a ? character, you can
+escape it with a tilde (\~), so ?\~\*\* would explicitly match for a \*
+character as the second character in the cell value, followed by any
number of other characters. The only other character that needs escaping
-is the `~` itself.
+is the \~ itself.
To create a "between" condition, we need to define two rules:
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
@@ -301,9 +289,9 @@ This defined two rules, filtering numbers that are `>= -20` OR `<=
20`, so we also need to modify the join condition to reflect AND rather
than OR.
-```php
-$columnFilter->setJoin(
- \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND
+``` php
+$columnFilter->setAndOr(
+ \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_COLUMN_ANDOR_AND
);
```
@@ -332,21 +320,21 @@ column at a time.
Again, we start by specifying a Filter type, this time a DYNAMICFILTER.
-```php
+``` php
$columnFilter->setFilterType(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER
);
```
When defining the rule for a dynamic filter, we don't define a value (we
-can simply set that to null string) but we do specify the dynamic filter
+can simply set that to NULL) but we do specify the dynamic filter
category.
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
- '',
+ NULL,
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
)
->setRuleType(
@@ -432,7 +420,7 @@ column at a time.
We start by specifying a Filter type, this time a DYNAMICFILTER.
-```php
+``` php
$columnFilter->setFilterType(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER
);
@@ -440,7 +428,7 @@ $columnFilter->setFilterType(
Then we create the rule:
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT,
@@ -456,7 +444,7 @@ This will filter the Top 5 percent of values in the column.
To specify the lowest (bottom 2 values), we would specify a rule of:
-```php
+``` php
$columnFilter->createRule()
->setRule(
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,
@@ -502,7 +490,7 @@ If you wish to execute your filter from within a script, you need to do
this manually. You can do this using the autofilters `showHideRows()`
method.
-```php
+``` php
$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
$autoFilter->showHideRows();
```
@@ -510,31 +498,14 @@ $autoFilter->showHideRows();
This will set all rows that match the filter criteria to visible, while
hiding all other rows within the autofilter area.
-Excel allows you to explicitly hide a row after applying a filter even
-if the row wasn't hidden by the filter. However, if a row is hidden *before*
-applying the filter, and the filter is applied, the row will no longer be hidden.
-This can make a difference during PhpSpreadsheet save, since PhpSpreadsheet
-will apply the filter during save if it hasn't been previously applied,
-or if the filter criteria have changed since it was last applied.
-Note that an autofilter read in from an existing spreadsheet is assumed to have been applied.
-Also note that changing the data in the columns being filtered
-does not result in reevaluation in either Excel or PhpSpreadsheet.
-If you wish to re-apply all filters in the spreadsheet
-(possibly just before save):
-```php
-$spreadsheet->reevaluateAutoFilters(false);
-```
-You can specify `true` rather than `false` to adjust the filter ranges
-on each sheet so that they end at the last row used on the sheet.
-
### Displaying Filtered Rows
Simply looping through the rows in an autofilter area will still access
-every row, whether it matches the filter criteria or not. To selectively
+ever row, whether it matches the filter criteria or not. To selectively
access only the filtered rows, you need to test each row’s visibility
settings.
-```php
+``` php
foreach ($spreadsheet->getActiveSheet()->getRowIterator() as $row) {
if ($spreadsheet->getActiveSheet()
->getRowDimension($row->getRowIndex())->getVisible()) {
diff --git a/docs/topics/calculation-engine.md b/docs/topics/calculation-engine.md
index ca628c0a7c..f1d1c2c127 100644
--- a/docs/topics/calculation-engine.md
+++ b/docs/topics/calculation-engine.md
@@ -10,12 +10,10 @@ formula calculation capabilities. A cell can be of a value type
which can be evaluated). For example, the formula `=SUM(A1:A10)`
evaluates to the sum of values in A1, A2, ..., A10.
-Calling `getValue()` on a cell that contains a formula will return the formula itself.
-
To calculate a formula, you can call the cell containing the formula’s
method `getCalculatedValue()`, for example:
-```php
+``` php
$spreadsheet->getActiveSheet()->getCell('E11')->getCalculatedValue();
```
@@ -24,24 +22,6 @@ with PhpSpreadsheet, it evaluates to the value "64":

-Calling `getCalculatedValue()` on a cell that doesn't contain a formula will simply return the value of that cell; but if the cell does contain a formula, then PhpSpreadsheet will evaluate that formula to calculate the result.
-
-There are a few useful mehods to help identify whether a cell contains a formula or a simple value; and if a formula, to provide further information about it:
-
-```php
-$spreadsheet->getActiveSheet()->getCell('E11')->isFormula();
-```
-will return a boolean true/false, telling you whether that cell contains a formula or not, so you can determine if a call to `getCalculatedVaue()` will need to perform an evaluation.
-
-For more details on working with array formulas, see the [the recipes documentationn](./recipes.md/#array-formulas).
-
-When writing a formula to a cell, formulas should always be set as they would appear in an English version of Microsoft Office Excel, and PhpSpreadsheet handles all formulas internally in this format. This means that the following rules hold:
-
- - Decimal separator is `.` (period)
- - Function argument separator is `,` (comma)
- - Matrix row separator is `;` (semicolon)
- - English function names must be used
-
Another nice feature of PhpSpreadsheet's formula parser, is that it can
automatically adjust a formula when inserting/removing rows/columns.
Here's an example:
@@ -52,7 +32,7 @@ You see that the formula contained in cell E11 is "SUM(E4:E9)". Now,
when I write the following line of code, two new product lines are
added:
-```php
+``` php
$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);
```
@@ -63,35 +43,6 @@ inserted 2 new rows), changed to "SUM(E4:E11)". Also, the inserted cells
duplicate style information of the previous cell, just like Excel's
behaviour. Note that you can both insert rows and columns.
-If you want to "anchor" a specific cell for a formula, then you prefix the column and/or the row with a `$` symbol, exactly as you would in MS Excel itself.
-So if a formula contains "SUM(E$4:E9)", and you insert 2 new rows after row 1, the formula will be adjusted to read "SUM(E$4:E11)", with the `$` fixing row 4 as the start of the range.
-
-
-
-## Calculation Cache
-
-Once the Calculation engine has evaluated the formula in a cell, the result
-will be cached, so if you call `getCalculatedValue()` a second time for the
-same cell, the result will be returned from the cache rather than evaluating
-the formula a second time. This helps boost performance, because evaluating
-a formula is an expensive operation in terms of performance and speed.
-
-However, there may be times when you don't want this, perhaps you've changed
-the underlying data and need to re-evaluate the same formula with that new
-data.
-
-```php
-Calculation::getInstance($spreadsheet)->disableCalculationCache();
-```
-
-Will disable calculation caching, and flush the current calculation cache.
-
-If you want only to flush the cache, then you can call
-
-```php
-Calculation::getInstance($spreadsheet)->clearCalculationCache();
-```
-
## Known limitations
There are some known limitations to the PhpSpreadsheet calculation
@@ -104,11 +55,6 @@ formula calculation is subject to PHP's language characteristics.
Not all functions are supported, for a comprehensive list, read the
[function list by name](../references/function-list-by-name.md).
-#### Array arguments for Function Calls in Formulas
-
-While most of the Excel function implementations now support array arguments, there are a few that should accept arrays as arguments but don't do so.
-In these cases, the result may be a single value rather than an array; or it may be a `#VALUE!` error.
-
#### Operator precedence
In Excel `+` wins over `&`, just like `*` wins over `+` in ordinary
@@ -116,7 +62,7 @@ algebra. The former rule is not what one finds using the calculation
engine shipped with PhpSpreadsheet.
- [Reference for Excel](https://support.office.com/en-us/article/Calculation-operators-and-precedence-in-Excel-48be406d-4975-4d31-b2b8-7af9e0e2878a)
-- [Reference for PHP](https://php.net/manual/en/language.operators.php)
+- [Reference for PHP](http://php.net/manual/en/language.operators.php)
#### Formulas involving numbers and text
@@ -128,7 +74,7 @@ formula is evaluated as 3 instead of evaluating as an error. This also
causes the Excel document being generated as containing unreadable
content.
-- [Reference for this behaviour in PHP](https://php.net/manual/en/language.types.string.php#language.types.string.conversion)
+- [Reference for this behaviour in PHP](http://php.net/manual/en/language.types.string.php#language.types.string.conversion)
#### Formulas don’t seem to be calculated in Excel2003 using compatibility pack?
@@ -136,10 +82,6 @@ This is normal behaviour of the compatibility pack, Xlsx displays this
correctly. Use `\PhpOffice\PhpSpreadsheet\Writer\Xls` if you really need
calculated values, or force recalculation in Excel2003.
-#### PAD (Precision As Displayed) Not Supported
-
-There are no plans to support Precision As Displayed.
-
## Handling Date and Time Values
### Excel functions that return a Date and Time value
@@ -152,7 +94,7 @@ date values by calling the
`\PhpOffice\PhpSpreadsheet\Calculation\Functions::setReturnDateType()`
method:
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Calculation\Functions::setReturnDateType($returnDateType);
```
@@ -168,7 +110,7 @@ if an invalid value is passed in for the return date type).
The `\PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType()`
method can be used to determine the current value of this setting:
-```php
+``` php
$returnDateType = \PhpOffice\PhpSpreadsheet\Calculation\Functions::getReturnDateType();
```
@@ -183,7 +125,7 @@ number of seconds from the PHP/Unix base date. The PHP/Unix base date
(0) is 00:00 UST on 1st January 1970. This value can be positive or
negative: so a value of -3600 would be 23:00 hrs on 31st December 1969;
while a value of +3600 would be 01:00 hrs on 1st January 1970. This
-gives 32-bit PHP a date range of between 14th December 1901 and 19th January
+gives PHP a date range of between 14th December 1901 and 19th January
2038.
#### PHP `DateTime` Objects
@@ -206,7 +148,7 @@ It is possible for scripts to change the calendar used for calculating
Excel date values by calling the
`\PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar()` method:
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar($baseDate);
```
@@ -221,7 +163,7 @@ if an invalid value is passed in).
The `\PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar()` method can
be used to determine the current value of this setting:
-```php
+``` php
$baseDate = \PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar();
```
@@ -343,19 +285,6 @@ and false is failure (e.g. an invalid DateTimeZone value was passed.)
These functions support a timezone as an optional second parameter.
This applies a specific timezone to that function call without affecting the default PhpSpreadsheet Timezone.
-### Calculating Value of Date/Time Read From Spreadsheet
-
-Nothing special needs to be done to interpret Date/Time values entered directly into a spreadsheet. They will have been stored as numbers with an appropriate number format set for the cell. However, depending on their value, they may have been stored as either integer or float values. If that is a problem, you can force `getCalculatedValue` to return float rather than int depending on the number format used for the cell.
-
-```php
-// All fields with Date, Time, or DateTime styles returned as float.
-\PhpOffice\PhpSpreadsheet\Cell\Cell::setCalculateDateTimeType(\PhpOffice\PhpSpreadsheet\Cell\Cell::CALCULATE_DATE_TIME_FLOAT);
-// All fields with Time or DateTime styles returned as float.
-\PhpOffice\PhpSpreadsheet\Cell\Cell::setCalculateDateTimeType(\PhpOffice\PhpSpreadsheet\Cell\Cell::CALCULATE_TIME_FLOAT);
-// Default - fields with Date, Time, or DateTime styles returned as they had been stored.
-\PhpOffice\PhpSpreadsheet\Cell\Cell::setCalculateDateTimeType(\PhpOffice\PhpSpreadsheet\Cell\Cell::CALCULATE_DATE_TIME_ASIS);
-```
-
## Function Reference
### Database Functions
@@ -400,7 +329,7 @@ This is the statistical mean.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -468,7 +397,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -503,7 +432,7 @@ has not yet been implemented in PhpSpreadsheet.
#### DCOUNTA
-The DCOUNTA function returns the count of cells that aren’t blank in a
+The DCOUNT function returns the count of cells that aren’t blank in a
column of a list or database and that match conditions that you specify.
##### Syntax
@@ -539,7 +468,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -610,7 +539,7 @@ in which you specify a condition for the column.
#### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -678,7 +607,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -746,7 +675,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -814,7 +743,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -883,7 +812,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -952,7 +881,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -1020,7 +949,7 @@ in which you specify a condition for the column.
##### Examples
-```php
+``` php
$database = [
[ 'Tree', 'Height', 'Age', 'Yield', 'Profit' ],
[ 'Apple', 18, 20, 14, 105.00 ],
@@ -1121,7 +1050,7 @@ or an Excel timestamp value (real), depending on the value of
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Year')
->setCellValue('A2', 'Month')
->setCellValue('A3', 'Day');
@@ -1136,7 +1065,7 @@ $retVal = $worksheet->getCell('D1')->getCalculatedValue();
// $retVal = 1230681600
```
-```php
+``` php
// We're going to be calling the same cell calculation multiple times,
// and expecting different return values, so disable calculation cacheing
\PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->setCalculationCacheEnabled(FALSE);
@@ -1217,7 +1146,7 @@ the third parameter.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Year')
->setCellValue('A2', 'Month')
->setCellValue('A3', 'Day');
@@ -1255,7 +1184,7 @@ $retVal = $worksheet->getCell('D6')->getCalculatedValue();
// $retVal = 30
```
-```php
+``` php
$date1 = 1193317015; // PHP timestamp for 25-Oct-2007
$date2 = 1449579415; // PHP timestamp for 8-Dec-2015
@@ -1326,7 +1255,7 @@ or an Excel timestamp value (real), depending on the value of
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String');
->setCellValue('A2', '31-Dec-2008')
->setCellValue('A3', '31/12/2008')
@@ -1348,7 +1277,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
// $retVal = 39813.0 for all cases
```
-```php
+``` php
// We're going to be calling the same cell calculation multiple times,
// and expecting different return values, so disable calculation cacheing
\PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->setCalculationCacheEnabled(FALSE);
@@ -1418,7 +1347,7 @@ This is an integer ranging from 1 to 31.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String')
->setCellValue('A2', '31-Dec-2008')
->setCellValue('A3', '14-Feb-2008');
@@ -1433,7 +1362,7 @@ $retVal = $worksheet->getCell('B3')->getCalculatedValue();
// $retVal = 14
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'DAYOFMONTH'],
['25-Dec-2008']
@@ -1491,7 +1420,7 @@ day year.
##### Examples
-```php
+``` php
$worksheet->setCellValue('B1', 'Start Date')
->setCellValue('C1', 'End Date')
->setCellValue('A2', 'Year')
@@ -1516,7 +1445,7 @@ $retVal = $worksheet->getCell('E4')->getCalculatedValue();
// $retVal = 1557
```
-```php
+``` php
$date1 = 37655.0; // Excel timestamp for 25-Oct-2007
$date2 = 39233.0; // Excel timestamp for 8-Dec-2015
@@ -1576,7 +1505,7 @@ or an Excel timestamp value (real), depending on the value of
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String')
->setCellValue('A2', '1-Jan-2008')
->setCellValue('A3', '29-Feb-2008');
@@ -1595,7 +1524,7 @@ $retVal = $worksheet->getCell('B3')->getCalculatedValue();
// $retVal = 39141.0 (28-Feb-2007)
```
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Calculation\Functions::setReturnDateType(
\PhpOffice\PhpSpreadsheet\Calculation\Functions::RETURNDATE_EXCEL
);
@@ -1649,7 +1578,7 @@ or an Excel timestamp value (real), depending on the value of
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String')
->setCellValue('A2', '1-Jan-2000')
->setCellValue('A3', '14-Feb-2009');
@@ -1666,7 +1595,7 @@ $retVal = $worksheet->getCell('B3')->getCalculatedValue();
// $retVal = 39507.0 (29-Feb-2008)
```
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Calculation\Functions::setReturnDateType(
\PhpOffice\PhpSpreadsheet\Calculation\Functions::RETURNDATE_EXCEL
);
@@ -1708,7 +1637,7 @@ This is an integer ranging from 0 to 23.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Time String')
->setCellValue('A2', '31-Dec-2008 17:30')
->setCellValue('A3', '14-Feb-2008 4:20 AM')
@@ -1728,7 +1657,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
// $retVal = 16
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'HOUROFDAY'],
['09:30']
@@ -1766,7 +1695,7 @@ This is an integer ranging from 0 to 59.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Time String')
->setCellValue('A2', '31-Dec-2008 17:30')
->setCellValue('A3', '14-Feb-2008 4:20 AM')
@@ -1786,7 +1715,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
// $retVal = 45
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'MINUTE'],
['09:30']
@@ -1824,7 +1753,7 @@ This is an integer ranging from 1 to 12.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String');
$worksheet->setCellValue('A2', '31-Dec-2008');
$worksheet->setCellValue('A3', '14-Feb-2008');
@@ -1839,7 +1768,7 @@ $retVal = $worksheet->getCell('B3')->getCalculatedValue();
// $retVal = 2
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'MONTHOFYEAR'],
['14-July-2008']
@@ -1894,10 +1823,10 @@ The number of working days between startDate and endDate.
##### Examples
-```php
+``` php
```
-```php
+``` php
```
##### Notes
@@ -1927,10 +1856,10 @@ or an Excel timestamp value (real), depending on the value of
##### Examples
-```php
+``` php
```
-```php
+``` php
```
##### Notes
@@ -1964,7 +1893,7 @@ This is an integer ranging from 0 to 59.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Time String')
->setCellValue('A2', '31-Dec-2008 17:30:20')
->setCellValue('A3', '14-Feb-2008 4:20 AM')
@@ -1984,7 +1913,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
// $retVal = 59
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'SECOND'],
['09:30:17']
@@ -2049,7 +1978,7 @@ value of method.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String')
->setCellValue('A2', '31-Dec-2008')
->setCellValue('A3', '14-Feb-2008');
@@ -2068,7 +1997,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
// $retVal = 2
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'WEEKDAY'],
['14-July-2008']
@@ -2113,7 +2042,7 @@ This is an integer year value.
##### Examples
-```php
+``` php
$worksheet->setCellValue('A1', 'Date String')
->setCellValue('A2', '17-Jul-1982')
->setCellValue('A3', '16-Apr-2009');
@@ -2128,7 +2057,7 @@ $retVal = $worksheet->getCell('B3')->getCalculatedValue();
// $retVal = 2009
```
-```php
+``` php
$retVal = call_user_func_array(
['\PhpOffice\PhpSpreadsheet\Calculation\Functions', 'YEAR'],
['14-July-2001']
diff --git a/docs/topics/conditional-formatting.md b/docs/topics/conditional-formatting.md
deleted file mode 100644
index 735215c628..0000000000
--- a/docs/topics/conditional-formatting.md
+++ /dev/null
@@ -1,791 +0,0 @@
-# Conditional Formatting
-
-## Introduction
-
-In addition to standard cell formatting options, most spreadsheet software provides an option known as Conditional Formatting, which allows formatting options to be set based on the value of a cell.
-
-The cell's standard formatting defines most style elements that will always be applied, such as the font face and size; but Conditional Formatting allows you to override some elements of that cell style such as number format mask; font colour, bold, italic and underlining; borders; and fill colour and pattern.
-
-Conditional Formatting can be applied to individual cells, or to a range of cells.
-
-### Example
-
-As a simple example in MS Excel itself, if we wanted to highlight all cells in the range A1:A10 that contain values greater than 80, start by selecting the range of cells.
-
-
-
-On the Home tab, in the "Styles" group, click "Conditional Formatting". This allows us to select an Excel Wizard to guide us through the process of creating a Conditional Rule and defining a Style for that rule.
-
-
-
-Click "Highlight Cells Rules", then "Greater Than".
-
-
-
-Enter the value "80" in the prompt box; and either select one of the pre-defined formatting style (or create a custom style from there).
-
-
-
-Then click "OK". The rule is immediately applied to the selected range of cells, highlighting all those with a value greater than 80 in the chosen style.
-
-
-
-Any change to the value of a cell within that range will immediately check the rule, and automatically apply the new styling if it applies.
-
-
-
-If we wanted to set up the same Conditional Formatting rule in PHPSpreadsheet, we would do so using the following code:
-
-```php
-$conditional = new \PhpOffice\PhpSpreadsheet\Style\Conditional();
-$conditional->setConditionType(\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS);
-$conditional->setOperatorType(\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHAN);
-$conditional->addCondition(80);
-$conditional->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKGREEN);
-$conditional->getStyle()->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);
-$conditional->getStyle()->getFill()->getStartColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_GREEN);
-
-$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A1:A10')->getConditionalStyles();
-$conditionalStyles[] = $conditional;
-
-$spreadsheet->getActiveSheet()->getStyle('A1:A10')->setConditionalStyles($conditionalStyles);
-```
-
-Depending on the Rules that we might want to apply for a Condition, sometimes an "operator Type" is required, sometimes not (and not all Operator Types are appropriate for all Condition Types); sometimes a "Condition" is required (or even several conditions), sometimes not, and sometimes it must be a specific Excel formula expression.
-Creating conditions manually requires a good knowledge of when these different properties need to be set, and with what type of values.
-This isn't something that an end-user developer should be expected to know.
-
-So - to eliminate this need for complex and arcane knowledge - since PHPSpreadsheet verson 1.22.0 there is also a series of Wizards that can assist with creating Conditional Formatting rules, and which are capable of setting the appropriate operators and conditions (including the sometimes complex Excel formula expressions) for a Conditional Rule:
-
-```php
-$wizardFactory = new \PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard('A1:A10');
-$wizard = $wizardFactory->newRule(\PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard::CELL_VALUE);
-$wizard->greaterThan(80);
-$wizard->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKGREEN);
-$wizard->getStyle()->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);
-$wizard->getStyle()->getFill()->getStartColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_GREEN);
-
-$conditional = $wizard->getConditional();
-```
-The Wizards know which operator types match up with condition types, and provide more meaningful method names for operators, and they build expressions and formulae when required; and also work well with an IDE such as PHPStorm.
-
----
-
-Note that `$conditionalStyles` is an array: it is possible to apply several conditions to the same range of cells. If we also wanted to highlight values that were less than 10 in the A1:A10 range, we can add a second style rule.
-
-In Excel, we would do this by selecting the range again, and going through the same process, this time selecting the "Highlight Cells Rules", then "Less Than" from the "Conditional Styles" menu, entering the value "10" in the prompt box, and selecting the appropriate style.
-
-In PHPSpreadsheet, we would do:
-
-```php
-$conditional2 = new \PhpOffice\PhpSpreadsheet\Style\Conditional();
-$conditional2->setConditionType(\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS);
-$conditional2->setOperatorType(\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHAN);
-$conditional2->addCondition(10);
-$conditional2->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKRED);
-$conditional2->getStyle()->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);
-$conditional2->getStyle()->getFill()->getStartColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_RED);
-
-$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('A1:A10')->getConditionalStyles();
-$conditionalStyles[] = $conditional2;
-
-$spreadsheet->getActiveSheet()->getStyle('A1:A10')->setConditionalStyles($conditionalStyles);
-```
-or again, using the Wizard:
-```php
-$wizardFactory = new \PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard('A1:A10');
-$wizard = $wizardFactory->newRule(\PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard::CELL_VALUE);
-$wizard->lessThan(10);
-$wizard->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKGREEN);
-$wizard->getStyle()->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);
-$wizard->getStyle()->getFill()->getStartColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_GREEN);
-
-$conditional = $wizard->getConditional();
-```
-
-
-### Order of Evaluating Multiple Rules/Conditions
-
-`$conditionalStyles` is an array, which not only represents multiple conditions that can be applied to a cell (or range of cells), but also the order in which they are checked. Some spreadsheet programs stop processing conditions once they find a match. On the other hand, MS Excel will check each of those conditions in turn in the order they are defined. It will stop checking only if it finds a matching rule that specifies 'stop if true'; however, if it finds conflicting matches with conflicting formatting (e.g. both set a background fill color but use different choices), the first match wins. In either case, this means that the order of checking conditions can be important.
-
-Consider the following. We have one condition that checks if a cell value is between -2 and 2, styling the fill color of the cell in yellow if that condition matches; and a second condition that checks if the cell value is equal to 0, styling the fill color of the cell in red if that matches.
- - Yellow if value is between -2 and 2
- - Red if value equals 0
-
-If they are evaluated in the order I've described above, and the cell has a value of 0, then the first rule will match (because 0 is between -2 and 2), and the cell will be styled in yellow, and no further conditions will be checked. So the rule that styles the cell in red if the value is 0 will never be assessed, even though that would also match (and is probably what we actually wanted, otherwise why have an explicit rule defined for that condition).
-
-
-
-If the rule order is reversed
- - Red if value equals 0
- - Yellow if value is between -2 and 2
-
-then the cell containing the value 0 will be rendered in red, because that is the first matching condition; and the formatting in the other condition conflicts with this, so is discarded.
-
-
-
-So when you have multiple conditions where the rules might "overlap", the order of these is important.
-
-If the cell matches multiple conditions, Excel (but not most other spreadsheet programs) will apply non-conflicting styles from each match. So, for the example above, if we wanted a match of 0 to have a different *font* color rather than a different *fill* color, Excel can honor both.
-
-
-
-Here is the same spreadsheet opened in LibreOffice - cell A4 has only the first conditional style applied to it. (You would see the same if you checked 'Stop if True' in Excel.) If you want the spreadsheet to appear the same in both Excel and LibreOffice, you would need to use more complicated conditions.
-
-
-
-PhpSpreadsheet supports the setting of [Stop If True](#stop-if-true-and-no-format-set).
-
-
-### Reader/Writer Support
-
-Currently, the following Conditional Types are supported for the following Readers and Writers:
-
-MS Excel | Conditional Type | Readers | Writers
----|---|---|---
-| Cell Value | Conditional::CONDITION_CELLIS | Xlsx | Xlsx, Xls, Html
-Specific Text | Conditional::CONDITION_CONTAINSTEXT | Xlsx | Xlsx, Html
- | Conditional::CONDITION_NOTCONTAINSTEXT | Xlsx | Xlsx, Html
- | Conditional::CONDITION_BEGINSWITH | Xlsx | Xlsx, Html
- | Conditional::CONDITION_ENDSWITH | Xlsx | Xlsx, Html
-Dates Occurring | Conditional::CONDITION_TIMEPERIOD | Xlsx | Xlsx, Html
-Blanks | Conditional::CONDITION_CONTAINSBLANKS | Xlsx | Xlsx, Html
-No Blanks | Conditional::CONDITION_NOTCONTAINSBLANKS | Xlsx | Xlsx, Html
-Errors | Conditional::CONDITION_CONTAINSERRORS | Xlsx | Xlsx, Html
-No Errors | Conditional::CONDITION_NOTCONTAINSERRORS | Xlsx | Xlsx, Html
-Duplicates/Unique | Conditional::CONDITION_DUPLICATES | Xlsx | Xlsx, Html
- | Conditional::CONDITION_UNIQUE | Xlsx | Xlsx, Html
-Use a formula | Conditional::CONDITION_EXPRESSION | Xlsx | Xlsx, Xls, Html
-Data Bars | Conditional::CONDITION_DATABAR | Xlsx | Xlsx, Html
-Colour Scales | Conditional::COLORSCALE | Xlsx | Html
-
-To enable conditional formatting for Html writer, use:
-
-```php
- $writer = new HtmlWriter($spreadsheet);
- $writer->setConditionalFormatting(true);
-```
-
-The following Conditional Types are currently not supported by any Readers or Writers:
-
-MS Excel | Conditional Type
----|---
-Above/Below Average | ?
-Top/Bottom Items | ?
-Top/Bottom %age | ?
-Icon Sets | ?
-
-Unsupported types will by ignored by the Readers, and cannot be created through PHPSpreadsheet.
-
-
-## Wizards
-
-While the Wizards don't simplify defining the Conditional Style itself; they do make it easier to define the conditions (the rules) where that style will be applied.
-MS Excel itself has wizards to guide the creation of Conditional Formatting rules and styles.
-
-
-
-The Wizard Factory allows us to retrieve the appropriate Wizard for the CF Rule that we want to apply.
-Most of those that have already been defined fall under the "Format only cells that contain" category.
-MS Excel provides a whole series of different types of rule, each of which has it's own formatting and logic.
-The Wizards try to replicate this logic and behaviour, similar to Excel's own "Formatting Rule" helper wizard.
-
-MS Excel | Wizard Factory newRule() Type Constant | Wizard Class Name
----|---|---
-Cell Value | Wizard::CELL_VALUE | CellValue
-Specific Text | Wizard::TEXT_VALUE | TextValue
-Dates Occurring | Wizard::DATES_OCCURRING | DateValue
-Blanks | Wizard::BLANKS | Blanks
-No Blanks | Wizard::NOT_BLANKS | Blanks
-Errors | Wizard::ERRORS | Errors
-No Errors | Wizard::NOT_ERRORS | Errors
-
-Additionally, Wizards also exists for "Format only unique or duplicate values", and for "Use a formula to determine which cells to format":
-
-MS Excel | Wizard Factory newRule() Type Constant | Wizard Class Name
----|---|---
-Duplicates/Unique | Wizard::DUPLICATES or Wizard::UNIQUE | Duplicates
-Use a formula | Wizard::EXPRESSION or Wizard::FORMULA | Expression
-
-There is currently no Wizard for Data Bars, even though this Conditional Type is supported by the Xlsx Reader and Writer.
-
----
-
-We instantiate the Wizard Factory, passing in the cell range where we want to apply Conditional Formatting rules; and can then call the `newRule()` method, passing in the type of Conditional Rule that we want to create in order to return the appropriate Wizard:
-
-```php
-$wizardFactory = new \PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard('C3:E5');
-$wizard = $wizardFactory->newRule(\PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard::CELL_VALUE);
-```
-You can, of course, instantiate the Wizard that you want directly, rather than using the factory; but still remember to pass in the cell range.
-```php
-$wizard = new \PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard\CellValue('C3:E5');
-```
-
-That Wizard then provides methods allowing us to define the rule, setting the operator and the values that we want to compare for that rule.
-Note that not all rules require values, or even operators, but the individual Wizards provide whatever is necessary; and this document lists all options available for every Wizard.
-
-Once we have used the Wizard to define the conditions and values that we want; and have defined a style using the `setStyle()` method, then we call the Wizard's `getConditional()` method to return a Conditional object that can be added to the array of Conditional Styles that we pass to `setConditionalStyles()`.
-
-
-### CellValue Wizard
-
-For the `CellValue` Wizard, we always need to provide an operator and a value; and for the "between" and "notBetween" operators, we need to provide two values to specify a range.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_CELLIS | Wizard::CELL_VALUE | Conditional::OPERATOR_EQUAL | equals()
-| | Conditional::OPERATOR_NOTEQUAL | notEquals()
-| | Conditional::OPERATOR_GREATERTHAN | greaterThan()
-| | Conditional::OPERATOR_GREATERTHANOREQUAL | greaterThanOrEqual()
-| | Conditional::OPERATOR_LESSTHAN | lessThan()
-| | Conditional::OPERATOR_LESSTHANOREQUAL | lessThanOrEqual()
-| | Conditional::OPERATOR_BETWEEN | between()
-| | Conditional::OPERATOR_NOTBETWEEN | notBetween()
-| | | and() | Used to provide the second operand for `between()` and `notBetween()
-
-A single operator call is required for every rule (except `between()` and `notBetween`, where the Wizard also provides `and()`); and providing a value is mandatory for all operators.
-The values that we need to provide for each operator can be numeric, boolean or string literals (even NULL); cell references; or formulae.
-
-So to set the rule using an operator, we would make a call like:
-```php
-$wizard->lessThan(10);
-```
-or when setting a `between()` or `notBetween()` rule, we can make use of the fluent interface with the `and()` method to set the range of values:
-```php
-$wizard->between(-10)->and(10);
-```
-Providing a second value using `and()` is mandatory for a `between()` or `notBetween()` range.
-
-To retrieve the Conditional, to add it to our `$conditionalStyles` array, we call the Wizard's `getConditional()` method.
-```php
-$conditional = $wizard->getConditional();
-$conditionalStyles = [$conditional];
-```
-or simply
-```php
-$conditionalStyles[] = $wizard->getConditional();
-```
-
-Putting it all together, we can use a block of code like (using pre-defined Style objects):
-```php
-$cellRange = 'A2:E5';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\CellValue $cellWizard */
-$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);
-
-$cellWizard->equals(0)
- ->setStyle($yellowStyle);
-$conditionalStyles[] = $cellWizard->getConditional();
-
-$cellWizard->greaterThan(0)
- ->setStyle($greenStyle);
-$conditionalStyles[] = $cellWizard->getConditional();
-
-$cellWizard->lessThan(0)
- ->setStyle($redStyle);
-$conditionalStyles[] = $cellWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($cellWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-You can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L81 "Conditional Formatting - Simple Example") for the repo.
-
-
-
-
-#### Value Types
-
-When we need to provide a value for an operator, that value can be numeric, boolean or string literals (even NULL); cell references; or even an Excel formulae.
-
-##### Literals
-
-If the value is a literal (even a string literal), we simply need to pass the value; the Wizard will ensure that strings are correctly quoted when we get the Conditional from the Wizard.
-
-```php
-$wizard->equals('Hello World');
-```
-If you weren't using the Wizard, but were creating the Conditional directly, you would need to remember to wrap this value in quotes yourself (`'"Hello World"'`)
-
-However, a cell reference or a formula are also string data, so we need to tell the Wizard if the value that we are passing in isn't just a string literal value, but should be treated as a cell reference or as a formula.
-
-##### Cell References
-
-If we want to use the value from cell `H9` in our rule; then we need to pass a value type of `VALUE_TYPE_CELL` to the operator, in addition to the cell reference itself.
-
-```php
-$wizard->equals('$H$9', Wizard::VALUE_TYPE_CELL);
-```
-
-
-
-You can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L103 "Conditional Formatting - Basic Comparisons") for the repo.
-
-Note that we are passing the cell as an absolute cell reference, "pinned" (with the `$` symbol) for both the row and the column.
-
-In this next example, we need to use relative cell references, so that the comparison will match the value in column `A` against the values in columns `B` and `C` for each row in our range (`A18:A20`); ie, test if the value in `A18` is between the values in `B18` and `C18`, test if the value in `A19` is between the values in `B19` and `C19`, etc.
-
-
-
-```php
-$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)
- ->and('$C1', Wizard::VALUE_TYPE_CELL)
- ->setStyle($greenStyle);
-```
-
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/01_Basic_Comparisons.php#L126 "Conditional Formatting - Basic Comparisons") for the repo.
-
-In this case, we "pin" the column for the address; but leave the row "unpinned".
-Notice also that we treat the first cell in our range as cell `A1`: the relative row number will be adjusted automatically to match our defined range; that is, the range that we specified when we instantiated the Wizard (passed in through the Wizard Factory) when we make the call to `getConditional()`.
-
-##### Formulae
-
-It is also possible to set the value/operand as an Excel formula expression, not simply a literal value or a cell reference.
-Again, we do need to specify that the value is a Formula.
-
-```php
-$cellRange = 'C26:C28';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\CellValue $cellWizard */
-$cellWizard = $wizardFactory->newRule(Wizard::CELL_VALUE);
-
-$cellWizard->equals('CONCATENATE($A1," ",$B1)', Wizard::VALUE_TYPE_FORMULA)
- ->setStyle($yellowStyle);
-$conditionalStyles[] = $cellWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($cellWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-
-You can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/02_Text_Comparisons.php#L209 "Conditional Formatting - Text Comparisons") for the repo.
-
-When the formula contains cell references, we again need to be careful with pinning to absolute columns/rows; and when unpinned, we reference based on the top-left cell of the range being cell `A1` when we define the formula.
-Here we're defining the formula as `CONCATENATE($A1," ",$B1)`, so we're "pinning" the column references for columns `A` and `B`; but leaving the row unpinned (explicitly set to start from row 1), which is then adjusted to the conditional range when we get the Conditional from the Wizard, and adjusted to the individual rows within that range when MS Excel displays the results.
-
-
-
-
-### TextValue Wizard
-
-While we can use the `CellValue` Wizard to do basic string comparison rules, the `TextValue` Wizard provides rules for comparing parts of a string value.
-
-For the `TextValue` Wizard, we always need to provide an operator and a value. As with the `CellValue` Wizard, values can be literals (but should always be string literals), cell references, or formula.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_CONTAINSTEXT | Wizard::TEXT_VALUE | Conditional::OPERATOR_CONTAINSTEXT | contains()
-Conditional::CONDITION_NOTCONTAINSTEXT | Wizard::TEXT_VALUE | Conditional::OPERATOR_NOTCONTAINS | doesNotContain()
-| | | doesntContain() | synonym for `doesNotContain()`
-Conditional::CONDITION_BEGINSWITH | Wizard::TEXT_VALUE | Conditional::OPERATOR_BEGINSWITH | beginsWith()
-| | | startsWith() | synonym for `beginsWith()`
-Conditional::CONDITION_ENDSWITH | Wizard::TEXT_VALUE | Conditional::OPERATOR_ENDSWITH | endsWith()
-
-The Conditional actually uses a separate "Condition Type" for each option, each with its own "Operator Type", and the condition should be an Excel formula (not simply the string value to check), and with a custom `text` attribute. The Wizard should make it a lot easier to create these conditional rules.
-
-To create a Conditional rule manually, you would need to do something like:
-```php
-$cellRange = 'A14:B16';
-$conditionalStyles = [];
-$conditional = new Conditional();
-// Remember to use the correct Condition Type
-$conditional->setConditionType(Conditional::CONDITION_CONTAINSTEXT);
-// Remember to use the correct Operator Type
-$conditional->setOperatorType(Conditional::OPERATOR_CONTAINSTEXT);
-// Remember to set the text attribute
-// Remember to wrap the string literal
-$conditional->setText('"LL"');
-// Remember that the condition should be the first element in an array
-// Remember that we need a specific formula for this Conditional
-// Remember to wrap the string literal
-// Remember to use the top-left cell of the range that we want to apply this rule to
-$conditional->setConditions(['NOT(ISERROR(SEARCH("LL",A14)))']);
-$conditional->setStyle($greenStyle);
-
-$conditionalStyles[]
-
-$spreadsheet->getActiveSheet()
- ->getStyle($cellRange)
- ->setConditionalStyles($conditionalStyles);
-```
-But using the Wizard, the same Conditional rule can be created by:
-```php
-$cellRange = 'A14:B16';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\TextValue $textWizard */
-$textWizard = $wizardFactory->newRule(Wizard::TEXT_VALUE);
-
-$textWizard->contains('LL')
- ->setStyle($greenStyle);
-$conditionalStyles[] = $textWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($textWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-You can find an example that demonstrates this in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/02_Text_Comparisons.php#L149 "Conditional Formatting - Text Comparisons") for the repo.
-
-
-
-There are also examples in that file for `notContains()`, `beginsWith()` and `endsWith()` comparisons; using literal text, and with cell references.
-
-The actual Excel Expressions used (and that you would need to set manually if you were defining the Conditional yourself rather than using the Wizard) are listed below:
-
-Conditional Type | Condition Expression
----|---
-Conditional::CONDITION_CONTAINSTEXT | NOT(ISERROR(SEARCH(``,``)))
-Conditional::CONDITION_NOTCONTAINSTEXT | ISERROR(SEARCH(``,``))
-Conditional::CONDITION_BEGINSWITH | LEFT(``,LEN(``))=``
-Conditional::CONDITION_ENDSWITH | RIGHT(``,LEN(``))=``
-
-The `` always references the top-left cell in the range of cells for this Conditional Formatting Rule.
-The `` should be wrapped in double quotes (`"`) for string literals; but unquoted if it is a value stored in a cell reference, or a formula.
-The `TextValue` Wizard handles defining these expressions for you.
-
-As with the operand for the `CellValue` Wizard, you can specify the value passed to `contains()`, `doesNotContain()`, `beginsWith()` and `endsWith()` as a cell reference, or as a formula; and if you do so, then you need to pass a second argument to those methods specifying `Wizard::VALUE_TYPE_CELL` or `Wizard::VALUE_TYPE_FORMULA`.
-The same rules also apply to "pinning" cell references as described above for the `CellValue` Wizard.
-
-```php
-$textWizard->beginsWith('$D$1', Wizard::VALUE_TYPE_CELL)
- ->setStyle($yellowStyle);
-```
-
-### DateValue Wizard
-
-For the `DateValue` Wizard, we always need to provide an operator; but no value is required.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_TIMEPERIOD | Wizard::DATES_OCCURRING | Conditional::TIMEPERIOD_TODAY | today()
-| | Conditional::TIMEPERIOD_YESTERDAY | yesterday()
-| | Conditional::TIMEPERIOD_TOMORROW | tomorrow()
-| | Conditional::TIMEPERIOD_LAST_7_DAYS | last7Days()
-| | | lastSevenDays() | synonym for `last7Days()`
-| | Conditional::TIMEPERIOD_LAST_WEEK | lastWeek()
-| | Conditional::TIMEPERIOD_THIS_WEEK | thisWeek()
-| | Conditional::TIMEPERIOD_NEXT_WEEK | nextWeek()
-| | Conditional::TIMEPERIOD_LAST_MONTH | lastMonth()
-| | Conditional::TIMEPERIOD_THIS_MONTH | thisMonth()
-| | Conditional::TIMEPERIOD_NEXT_MONTH | nextMonth()
-
-The Conditional has no actual "Operator Type", and the condition/value should be an Excel formula, and with a custom `timePeriod` attribute. The Wizard should make it a lot easier to create these condition rules.
-
-
-
-The above image shows a grid that demonstrate each of the possible Date Occurring rules, and was generated using [the code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/05_Date_Comparisons.php#L118 "Conditional Formatting - Dates Occurring Comparisons")
-
-Typical sample code wod look something like:
-```php
-$wizardFactory = new Wizard("E2:E19");
-/** @var Wizard\DateValue $dateWizard */
-$dateWizard = $wizardFactory->newRule(Wizard::DATES_OCCURRING);
-$conditionalStyles = [];
-
-$dateWizard->last7Days()
- ->setStyle($yellowStyle);
-
-$conditionalStyles[] = $dateWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($dateWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-
-The actual Excel Expressions used (and that you would need to set manually if you were defining the Conditional yourself rather than using the Wizard) are listed below:
-
-timePeriod Attribute | Condition Expression
----|---
-today | FLOOR(``,1)=TODAY()-1
-yesterday | FLOOR(``,1)=TODAY()
-tomorrow | FLOOR(``,1)=TODAY()+1
-last7Days | AND(TODAY()-FLOOR(``,1)<=6,FLOOR(``,1)<=TODAY())
-lastWeek | AND(TODAY()-ROUNDDOWN(``,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(``,0)<(WEEKDAY(TODAY())+7))
-thisWeek | AND(TODAY()-ROUNDDOWN(``,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(``,0)-TODAY()<=7-WEEKDAY(TODAY()))
-nextWeek | AND(ROUNDDOWN(``,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(``,0)-TODAY()<(15-WEEKDAY(TODAY())))
-lastMonth | AND(MONTH(``)=MONTH(EDATE(TODAY(),0-1)),YEAR(``)=YEAR(EDATE(TODAY(),0-1)))
-thisMonth | AND(MONTH(``)=MONTH(TODAY()),YEAR(``)=YEAR(TODAY()))
-nextMonth | AND(MONTH(``)=MONTH(EDATE(TODAY(),0+1)),YEAR(``)=YEAR(EDATE(TODAY(),0+1)))
-
-The `` always references the top-left cell in the range of cells for this Conditional Formatting Rule.
-
-
-### Blanks Wizard
-
-This Wizard is used to define a simple boolean state rule, to determine whether a cell is blank or not blank.
-Whether created using the Wizard Factory with a rule type of `Wizard::BLANKS` or `Wizard::NOT_BLANKS`, the same `Blanks` Wizard is returned.
-The only difference is that in the one case the rule state is pre-set for `CONDITION_CONTAINSBLANKS`, in the other it is pre-set for `CONDITION_NOTCONTAINSBLANKS`.
-However, you can switch between the two rules using the `isBlank()` and `notBlank()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_CONTAINSBLANKS | Wizard::BLANKS | - | isBlank() | Default state
-| | | notBlank()
-| | | isEmpty() | Synonym for `isBlank()`
-| | | notEmpty() | Synonym for `notBlank()`
-Conditional::CONDITION_NOTCONTAINSBLANKS | Wizard::NOT_BLANKS | - | notBlank()| Default state
-| | | isBlank()
-| | | isEmpty() | Synonym for `isBlank()`
-| | | notEmpty() | Synonym for `notBlank()`
-
-The following code shows the same Blanks Wizard being used to create both Blank and Non-Blank Conditionals, using a pre-defined `$redStyle` Style object for Blanks, and a pre-defined `$greenStyle` Style object for Non-Blanks.
-```php
-$cellRange = 'A2:B3';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\Blanks $blanksWizard */
-$blanksWizard = $wizardFactory->newRule(Wizard::BLANKS);
-
-$blanksWizard->setStyle($redStyle);
-$conditionalStyles[] = $blanksWizard->getConditional();
-
-$blanksWizard->notBlank()
- ->setStyle($greenStyle);
-$conditionalStyles[] = $blanksWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($blanksWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/03_Blank_Comparisons.php#L58 "Conditional Formatting - Blank Comparisons") for the repo.
-
-
-
-No operand/value is required for the Blanks Wizard methods; but the Conditional that is returned contains a defined expression with an Excel formula:
-
-Blanks Type | Condition Expression
----|---
-isBlank() | LEN(TRIM(``))=0
-notBlank() | LEN(TRIM(``))>0
-
-The `` always references the top-left cell in the range of cells for this Conditional Formatting Rule.
-
-
-### Errors Wizard
-
-Like the `Blanks` Wizard, this Wizard is used to define a simple boolean state rule, to determine whether a cell with a formula value results in an error or not.
-Whether created using the Wizard Factory with a rule type of `Wizard::ERRORS` or `Wizard::NOT_ERRORS`, the same `Errors` Wizard is returned.
-The only difference is that in the one case the rule state is pre-set for `CONDITION_CONTAINSERRORS`, in the other it is pre-set for `CONDITION_NOTCONTAINSERRORS`.
-However, you can switch between the two rules using the `isError()` and `notError()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_CONTAINSERRORS | Wizard::ERRORS | - | isError() | Default state
-| | | notError()
-Conditional::CONDITION_NOTCONTAINSERRORS | Wizard::NOT_ERRORS | - | notError()| Default state
-| | | isError()
-
-The following code shows the same Errors Wizard being used to create both Error and Non-Error Conditionals, using a pre-defined `$redStyle` Style object for Errors, and a pre-defined `$greenStyle` Style object for Non-Errors.
-```php
-$cellRange = 'C2:C6';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\Errors $errorsWizard */
-$errorsWizard = $wizardFactory->newRule(Wizard::ERRORS);
-
-$errorsWizard->setStyle($redStyle);
-$conditionalStyles[] = $errorsWizard->getConditional();
-
-$errorsWizard->notError()
- ->setStyle($greenStyle);
-$conditionalStyles[] = $errorsWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($errorsWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/04_Error_Comparisons.php#L62 "Conditional Formatting - Error Comparisons") for the repo.
-
-
-
-No operand/value is required for the Errors Wizard methods; but the Conditional that is returned contains a defined expression with an Excel formula:
-
-Blanks Type | Condition Expression
----|---
-isError() | ISERROR(``)
-notError() | NOT(ISERROR(``))
-
-The `` always references the top-left cell in the range of cells for this Conditional Formatting Rule.
-
-
-### Duplicates/Unique Wizard
-
-This Wizard is used to define a simple boolean state rule, to determine whether a cell value matches any other cells with the same value within the conditional cell range, or if the value is unique in that range of cells.
-It only has any meaning if it is applied to a range of cells, not to an individual cell.
-Whether created using the Wizard Factory with a rule type of `Wizard::DUPLICATES` or `Wizard::UNIQUE`, the same `Duplicates` Wizard is returned.
-The only difference is that in the one case the rule state is pre-set for `CONDITION_DUPLICATES`, in the other it is pre-set for `CONDITION_UNIQUE`.
-However, you can switch between the two rules using the `duplicates()` and `unique()` methods; and it is only at the point when you call `getConditional()` that a Conditional will be returned based on the current state of the Wizard.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_DUPLICATES | Wizard::DUPLICATES | - | duplicates() | Default state
-| | | unique()
-Conditional::CONDITION_UNIQUE | Wizard::UNIQUE | - | unique()| Default state
-| | | duplicates()
-
-The following code shows the same Duplicates Wizard being used to create both Blank and Non-Blank Conditionals, using a pre-defined `$redStyle` Style object for Blanks, and a pre-defined `$greenStyle` Style object for Non-Blanks.
-```php
-$cellRange = 'A2:E6';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\Duplicats $duplicatesWizard */
-$duplicatesWizard = $wizardFactory->newRule(Wizard::DUPLICATES);
-
-$duplicatesWizard->setStyle($redStyle);
-$conditionalStyles[] = $duplicatesWizard->getConditional();
-
-$duplicatesWizard->unique()
- ->setStyle($greenStyle);
-$conditionalStyles[] = $duplicatesWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($duplicatesWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/06_Duplicate_Comparisons.php#L66 "Conditional Formatting - Duplicate/Unique Comparisons") for the repo.
-
-
-
-Duplicates/Uniques Conditions are only identified by a Condition Type in Excel, with no operator and no expression.
-
-
-### Expression Wizard
-
-The `Expression` Wizard expects to be provided with an Expression, an MS Excel formula that evaluates to either false or true.
-
-Condition Type | Wizard Factory newRule() Type Constant | Conditional Operator Type | Wizard Methods | Notes
----|---|---|---|---
-Conditional::CONDITION_EXPRESSION | Wizard::EXPRESSION or Wizard::FORMULA | - | expression() | The argument is an Excel formula that evaluates to true or false
- | | | | formula() | Synonym for `expression()`
-
-Just as a simple example, here's a code snippet demonstrating expressions to determine if a cell contains an odd or an even number value:
-```php
-$cellRange = 'A2:C11';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\Expression $expressionWizard */
-$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);
-
-$expressionWizard->expression('ISODD(A1)')
- ->setStyle($greenStyle);
-$conditionalStyles[] = $expressionWizard->getConditional();
-
-$expressionWizard->expression('ISEVEN(A1)')
- ->setStyle($yellowStyle);
-$conditionalStyles[] = $expressionWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($expressionWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L87 "Conditional Formatting - Odd/Even Expression Comparisons") for the repo.
-
-
-
-As a more complicated example, let's look at a Sales Grid, and use conditional formatting to highlight sales in the "USA" region:
-
-```php
-$greenStyleMoney = clone $greenStyle;
-$greenStyleMoney->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_ACCOUNTING_USD);
-
-$cellRange = 'A17:D22';
-$conditionalStyles = [];
-$wizardFactory = new Wizard($cellRange);
-/** @var Wizard\Expression $expressionWizard */
-$expressionWizard = $wizardFactory->newRule(Wizard::EXPRESSION);
-
-$expressionWizard->expression('$C1="USA"')
- ->setStyle($greenStyleMoney);
-$conditionalStyles[] = $expressionWizard->getConditional();
-
-$spreadsheet->getActiveSheet()
- ->getStyle($expressionWizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L107 "Conditional Formatting - Sales Grid Expression Comparisons") for the repo.
-
-
-
-Or we could apply multiple comparisons in the same expression, so to check for all sales for the "USA" region in "Q4", combining them using an Excel `AND()`:
-```php
-$expressionWizard->expression('AND($C1="USA",$D1="Q4")')
- ->setStyle($greenStyleMoney);
-```
-This example can also be found in the [code samples](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/samples/ConditionalFormatting/07_Expression_Comparisons.php#L121 "Conditional Formatting - Sales Grid Expression Comparisons") for the repo.
-
-
-
-## General Notes
-
-### Stop If True, and No Format Set
-
-Normally, Excel continues to check even after it finds a match. To tell it to stop once a match is found, 'stop if true' should be specified:
-```php
-$conditional->setStopIfTrue(true);
-```
-
-Sometimes you want a matched cell to just show its unconditional format. This is most useful in conjunction with 'stop if true'.
-```php
-$conditional->setNoFormatSet(true);
-```
-
-### Changing the Cell Range
-
-If you want to apply the same Conditional Rule/Style to several different areas on your spreadsheet, then you can do this using the `setCellRange()` method between calls to `getConditional()`.
-
-```php
-$wizardFactory = new Wizard();
-/** @var Wizard\CellValue $wizard */
-$wizard = $wizardFactory->newRule(Wizard::CELL_VALUE);
-
-// Apply the wizard conditional to cell range A2:A10
-$cellRange = 'A2:A10';
-$conditionalStyles = [];
-$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)
- ->and('$C1', Wizard::VALUE_TYPE_CELL)
- ->setStyle($greenStyle);
-
-$spreadsheet->getActiveSheet()
- ->getStyle($wizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-
-// Apply the same wizard conditional to cell range E2:E10
-$cellRange = 'E2:E10';
-$wizard->setCellRange($cellRange);
-$conditionalStyles = [];
-$wizard->between('$B1', Wizard::VALUE_TYPE_CELL)
- ->and('$C1', Wizard::VALUE_TYPE_CELL)
- ->setStyle($greenStyle);
-
-$spreadsheet->getActiveSheet()
- ->getStyle($wizard->getCellRange())
- ->setConditionalStyles($conditionalStyles);
-```
-
-Because we use cell `A1` as the baseline cell for relative references, the Wizard is able to handle the necessary adjustments for cell references and formulae to match the range of cells that it is being applied to when `getConditional()` is called, so it returns the correct expression.
-
-### Converting a Conditional to a Wizard
-
-If you already have a `Conditional` object; you can create a Wizard from that Conditional to manipulate it using all the benefits of the Wizard before using that to create a new version of the Conditional:
-
-```php
-$wizard = Wizard\CellValue::fromConditional($conditional, '$A$3:$E$8');
-$wizard->greaterThan(12.5);
-
-$newConditional = $wizard->getConditional();
-```
-This is ok if you know what type of Conditional you want to convert; but it will throw an Exception if the Conditional is not of an appropriate type (ie. not a `cellIs`).
-
-If you don't know what type of Conditional it is, then it's better to use the Wizard Factory `fromConditional()` method instead; and then test what type of Wizard object is returned:
-```php
-$wizard = Wizard::fromConditional($conditional, '$A$3:$E$8');
-if ($wizard instanceof Wizard\CellValue) {
- $wizard->greaterThan(12.5);
-
- $newConditional = $wizard->getConditional();
-}
-```
diff --git a/docs/topics/creating-spreadsheet.md b/docs/topics/creating-spreadsheet.md
index 3a82623edf..dceafe4b7c 100644
--- a/docs/topics/creating-spreadsheet.md
+++ b/docs/topics/creating-spreadsheet.md
@@ -20,7 +20,7 @@ Details of the different spreadsheet formats supported, and the options
available to read them into a Spreadsheet object are described fully in
the [Reading Files](./reading-files.md) document.
-```php
+``` php
$inputFileName = './sampleData/example1.xls';
/** Load $inputFileName to a Spreadsheet object **/
@@ -32,7 +32,7 @@ $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName);
If you want to create a new workbook, rather than load one from file,
then you simply need to instantiate it as a new Spreadsheet object.
-```php
+``` php
/** Create a new Spreadsheet Object **/
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
```
@@ -53,7 +53,7 @@ then you also need to "break" these cyclic references before doing so.
PhpSpreadsheet provides the `disconnectWorksheets()` method for this
purpose.
-```php
+``` php
$spreadsheet->disconnectWorksheets();
unset($spreadsheet);
```
diff --git a/docs/topics/defined-names.md b/docs/topics/defined-names.md
deleted file mode 100644
index d62b06fee2..0000000000
--- a/docs/topics/defined-names.md
+++ /dev/null
@@ -1,593 +0,0 @@
-# Defined Names
-
-There are two types of Defined Names in MS Excel and other Spreadsheet formats: Named Ranges and Named Formulae. Between them, they can add a lot of power to your Spreadsheets, but they need to be used correctly.
-
-Working examples for all the code shown in this document can be found in the `/samples/DefinedNames` folder.
-
-## Named Ranges
-
-A Named Range provides a name reference to a cell or a range of cells. You can then reference that cell or cells by that name within a formula.
-
-As an example, I'll create a simple Calculator that adds Tax to a Price.
-
-```php
-// Set up some basic data
-$worksheet
- ->setCellValue('A1', 'Tax Rate:')
- ->setCellValue('B1', '=19%')
- ->setCellValue('A3', 'Net Price:')
- ->setCellValue('B3', 12.99)
- ->setCellValue('A4', 'Tax:')
- ->setCellValue('A5', 'Price including Tax:');
-
-// Define named ranges
-$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('TAX_RATE', $worksheet, '=$B$1') );
-$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('PRICE', $worksheet, '=$B$3') );
-
-// Reference that defined name in a formula
-$worksheet
- ->setCellValue('B4', '=PRICE*TAX_RATE')
- ->setCellValue('B5', '=PRICE*(1+TAX_RATE)');
-
-echo sprintf(
- 'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',
- $worksheet->getCell('B1')->getCalculatedValue(),
- $worksheet->getCell('B3')->getValue(),
- $worksheet->getCell('B4')->getCalculatedValue(),
- $worksheet->getCell('B5')->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/SimpleNamedRange.php`
-
-This makes formulae in the generated spreadsheet easier to understand when viewing it them MS Excel. Using these Named Ranges (providing meaningful human-readable names for cells) makes the purpose of the formula immediately clear. We don't need to look for cell `B2` to see what it is, the name tells us.
-
-And, if the Tax Rate changes to 16%, then we only need to change the value in cell `B1` to the new Tax rate (`=16%`), or if we want to calculate the Tax Charges for a different net price, that will immediately be reflected in all the calculations that reference those Named Ranges. No matter whereabouts in the worksheet I used that Named Range, it always references the value in cell `B1`.
-
-In fact, because we were required to specify a worksheet when we defined the name, that name is available from any worksheet within the spreadsheet, and always means cell `B2` in this worksheet (but see the notes on Named Range Scope below).
-
-### Absolute Named Ranges
-
-In the above example, when I define the Named Range values (e.g. `'=$B$1'`), I used a `$` before both the row and the column. This made the Named Range an Absolute Reference.
-
-Another example:
-```php
-// Set up some basic data for a timesheet
-$worksheet
- ->setCellValue('A1', 'Charge Rate/hour:')
- ->setCellValue('B1', '7.50')
- ->setCellValue('A3', 'Date')
- ->setCellValue('B3', 'Hours')
- ->setCellValue('C3', 'Charge');
-
-// Define named range using an absolute cell reference
-$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );
-
-$workHours = [
- '2020-0-06' => 7.5,
- '2020-0-07' => 7.25,
- '2020-0-08' => 6.5,
- '2020-0-09' => 7.0,
- '2020-0-10' => 5.5,
-];
-
-// Populate the Timesheet
-$startRow = 4;
-$row = $startRow;
-foreach ($workHours as $date => $hours) {
- $worksheet
- ->setCellValue("A{$row}", $date)
- ->setCellValue("B{$row}", $hours)
- ->setCellValue("C{$row}", "=B{$row}*CHARGE_RATE");
- $row++;
-}
-$endRow = $row - 1;
-
-++$row;
-$worksheet
- ->setCellValue("B{$row}", "=SUM(B{$startRow}:B{$endRow})")
- ->setCellValue("C{$row}", "=SUM(C{$startRow}:C{$endRow})");
-
-
-echo sprintf(
- 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',
- $worksheet->getCell("B{$row}")->getCalculatedValue(),
- $worksheet->getCell('B1')->getValue(),
- $worksheet->getCell("C{$row}")->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/AbsoluteNamedRange.php`
-
-Because the Named Range `CHARGE_RATE` is defined as an Absolute cell reference, then it always references cell `B2` no matter where it is referenced in a formula in the spreadsheet.
-
-### Relative Named Ranges
-
-The previous example showed a simple timesheet using an Absolute Reference for the Charge Rate, used to calculate our billed charges to client.
-
-The use of `B{$row}` in our formula (at least it will appear as an actual cell reference in MS Excel if we save the file and open it) requires a bit of mental agility to remember that column `B` is our hours for that day. Why can't we use another Named Range called something like `HOURS_PER_DAY` to make the formula more easily readable and meaningful.
-
-But if we used an Absolute Named Range for `HOURS_PER_DAY`, then we'd need a different Named Range for each day (`MONDAY_HOURS_PER_DAY`, `TUESDAY_HOURS_PER_DAY`, etc), and a different formula for each day of the week; if we kept a monthly timesheet, we would have to defined a different Named Range for every day of the month... and that's a lot more trouble than it's worth, and quickly becomes unmanageable.
-
-This is where Relative Named Ranges are very useful.
-
-```php
-// Set up some basic data for a timesheet
-$worksheet
- ->setCellValue('A1', 'Charge Rate/hour:')
- ->setCellValue('B1', '7.50')
- ->setCellValue('A3', 'Date')
- ->setCellValue('B3', 'Hours')
- ->setCellValue('C3', 'Charge');
-
-// Define named ranges
-// CHARGE_RATE is an absolute cell reference that always points to cell B1
-$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );
-// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used
-$spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1') );
-
-$workHours = [
- '2020-0-06' => 7.5,
- '2020-0-07' => 7.25,
- '2020-0-08' => 6.5,
- '2020-0-09' => 7.0,
- '2020-0-10' => 5.5,
-];
-
-// Populate the Timesheet
-$startRow = 4;
-$row = $startRow;
-foreach ($workHours as $date => $hours) {
- $worksheet
- ->setCellValue("A{$row}", $date)
- ->setCellValue("B{$row}", $hours)
- ->setCellValue("C{$row}", "=HOURS_PER_DAY*CHARGE_RATE");
- $row++;
-}
-$endRow = $row - 1;
-
-++$row;
-$worksheet
- ->setCellValue("B{$row}", "=SUM(B{$startRow}:B{$endRow})")
- ->setCellValue("C{$row}", "=SUM(C{$startRow}:C{$endRow})");
-
-
-echo sprintf(
- 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',
- $worksheet->getCell("B{$row}")->getCalculatedValue(),
- $worksheet->getCell('B1')->getValue(),
- $worksheet->getCell("C{$row}")->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/RelativeNamedRange.php`
-
-The difference in the cell definition for `HOURS_PER_DAY` (`'=$B1'`) is that we have a `$` in front of the column `B`, but not in front of the row number. The `$` makes the column absolute: no matter where in the worksheet we use this name, it always references column `B`. Without a `$`in front of the row number, we make the row number relative, relative to the row where the name appears in a formula, so it effectively replaces the `1` with its own row number when it executes the calculation.
-
-When it is used in the formula in row 4, then it references cell `B4`, when it appears in row 5, it references cell `B5`, and so on. Using a Relative Named Range, we can use the same Named Range to refer to cells in different rows (and/or different columns), so we can re-use the same Named Range to refer to different cells relative to the row (or column) where we use them.
-
----
-
-Named Ranges aren't limited to a single cell, but can point to a range of cells. A common use case might be to provide a series of column totals at the bottom of a dataset. Let's take our timesheet, and modify it just slightly to use a Relative column range for that purpose.
-
-I won't replicate the entire code from the previous example, because I'm only changing a few lines; but we just replace the block:
-```php
-++$row;
-$worksheet
- ->setCellValue("B{$row}", "=SUM(B{$startRow}:B{$endRow})")
- ->setCellValue("C{$row}", "=SUM(C{$startRow}:C{$endRow})");
-```
-with:
-```php
-// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
-$spreadsheet->addNamedRange( new NamedRange('COLUMN_DATA_VALUES', $worksheet, "=A\${$startRow}:A\${$endRow}") );
-
-++$row;
-$worksheet
- ->setCellValue("B{$row}", "=SUM(COLUMN_DATA_VALUES)")
- ->setCellValue("C{$row}", "=SUM(COLUMN_DATA_VALUES)");
-```
-`/samples/DefinedNames/RelativeNamedRange2.php`
-
-Now that I've specified column as relative in the definition of `COLUMN_DATA_VALUES` with an address of column `A`, and the rows are absolute. When the same Relative Named Range is used in column `B`,it references cells in column `B` rather than `A`; and when it is used in column `C`, it references cells in column `C`.
-
-While we still have a piece of code (`"=A\${$startRow}:A\${$endRow}"`) that isn't easily human-readable, when we open the generated spreadsheet in MS Excel, the displayed formula in for the cells for the totals is immediately understandable.
-
-### Named Range Scope
-
-Whenever we define a Named Range, we are required to specify a worksheet, and that name is then available from any worksheet within the spreadsheet, and always means that cell or cell range in the specified worksheet.
-
-```php
-// Set up some basic data for a timesheet
-$worksheet
- ->setCellValue('A1', 'Charge Rate/hour:')
- ->setCellValue('B1', '7.50');
-
-// Define a global named range on the first worksheet for our Charge Rate
-// CHARGE_RATE is an absolute cell reference that always points to cell B1
-// Because it is defined globally, it will still be usable from any worksheet in the spreadsheet
-$spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1') );
-
-// Create a second worksheet as our client timesheet
-$worksheet = $spreadsheet->addSheet(new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet($spreadsheet, 'Client Timesheet'));
-
-// Define named ranges
-// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used
-$spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1') );
-
-// Set up some basic data for a timesheet
-$worksheet
- ->setCellValue('A1', 'Date')
- ->setCellValue('B1', 'Hours')
- ->setCellValue('C1', 'Charge');
-
-$workHours = [
- '2020-0-06' => 7.5,
- '2020-0-07' => 7.25,
- '2020-0-08' => 6.5,
- '2020-0-09' => 7.0,
- '2020-0-10' => 5.5,
-];
-
-// Populate the Timesheet
-$startRow = 2;
-$row = $startRow;
-foreach ($workHours as $date => $hours) {
- $worksheet
- ->setCellValue("A{$row}", $date)
- ->setCellValue("B{$row}", $hours)
- ->setCellValue("C{$row}", "=HOURS_PER_DAY*CHARGE_RATE");
- $row++;
-}
-$endRow = $row - 1;
-
-// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
-$spreadsheet->addNamedRange( new NamedRange('COLUMN_DATA_VALUES', $worksheet, "=A\${$startRow}:A\${$endRow}") );
-
-++$row;
-$worksheet
- ->setCellValue("B{$row}", "=SUM(COLUMN_DATA_VALUES)")
- ->setCellValue("C{$row}", "=SUM(COLUMN_DATA_VALUES)");
-
-echo sprintf(
- 'Worked %.2f hours at a rate of %s - Charge to the client is %.2f',
- $worksheet->getCell("B{$row}")->getCalculatedValue(),
- $chargeRateCellValue = $spreadsheet
- ->getSheetByName($spreadsheet->getNamedRange('CHARGE_RATE')->getWorksheet()->getTitle())
- ->getCell($spreadsheet->getNamedRange('CHARGE_RATE')->getCellsInRange()[0])->getValue(),
- $worksheet->getCell("C{$row}")->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/ScopedNamedRange.php`
-
-Even though `CHARGE_RATE` references a cell on a different worksheet, because is set as global (the default) it is accessible from any worksheet in the spreadsheet. so when we reference it in formulae on the second timesheet worksheet, we are able to access the value from that first worksheet and use it in our calculations.
-
----
-
-However, a Named Range can be locally scoped so that it is only available when referenced from a specific worksheet, or it can be globally scoped. This means that you can use the same Named Range name with different values on different worksheets.
-
-Building further on our timesheet, perhaps we use a different worksheet for each client, and we use the same hourly rate when billing most of our clients; but for one particular client (perhaps doing work for a friend) we use a lower rate.
-
-```php
-$clients = [
- 'Client #1 - Full Hourly Rate' => [
- '2020-0-06' => 2.5,
- '2020-0-07' => 2.25,
- '2020-0-08' => 6.0,
- '2020-0-09' => 3.0,
- '2020-0-10' => 2.25,
- ],
- 'Client #2 - Full Hourly Rate' => [
- '2020-0-06' => 1.5,
- '2020-0-07' => 2.75,
- '2020-0-08' => 0.0,
- '2020-0-09' => 4.5,
- '2020-0-10' => 3.5,
- ],
- 'Client #3 - Reduced Hourly Rate' => [
- '2020-0-06' => 3.5,
- '2020-0-07' => 2.5,
- '2020-0-08' => 1.5,
- '2020-0-09' => 0.0,
- '2020-0-10' => 1.25,
- ],
-];
-
-foreach ($clients as $clientName => $workHours) {
- $worksheet = $spreadsheet->addSheet(new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet($spreadsheet, $clientName));
-
- // Set up some basic data for a timesheet
- $worksheet
- ->setCellValue('A1', 'Charge Rate/hour:')
- ->setCellValue('B1', '7.50')
- ->setCellValue('A3', 'Date')
- ->setCellValue('B3', 'Hours')
- ->setCellValue('C3', 'Charge');
- ;
-
- // Define named ranges
- // CHARGE_RATE is an absolute cell reference that always points to cell B1
- $spreadsheet->addNamedRange( new NamedRange('CHARGE_RATE', $worksheet, '=$B$1', true) );
- // HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used
- $spreadsheet->addNamedRange( new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1', true) );
-
- // Populate the Timesheet
- $startRow = 4;
- $row = $startRow;
- foreach ($workHours as $date => $hours) {
- $worksheet
- ->setCellValue("A{$row}", $date)
- ->setCellValue("B{$row}", $hours)
- ->setCellValue("C{$row}", "=HOURS_PER_DAY*CHARGE_RATE");
- $row++;
- }
- $endRow = $row - 1;
-
- // COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
- $spreadsheet->addNamedRange( new NamedRange('COLUMN_TOTAL', $worksheet, "=A\${$startRow}:A\${$endRow}", true) );
-
- ++$row;
- $worksheet
- ->setCellValue("B{$row}", "=SUM(COLUMN_TOTAL)")
- ->setCellValue("C{$row}", "=SUM(COLUMN_TOTAL)");
-}
-$spreadsheet->removeSheetByIndex(0);
-
-// Set the reduced charge rate for our special client
-$worksheet
- ->setCellValue("B1", 4.5);
-
-foreach ($spreadsheet->getAllSheets() as $worksheet) {
- echo sprintf(
- 'Worked %.2f hours for "%s" at a rate of %.2f - Charge to the client is %.2f',
- $worksheet->getCell("B{$row}")->getCalculatedValue(),
- $worksheet->getTitle(),
- $worksheet->getCell('B1')->getValue(),
- $worksheet->getCell("C{$row}")->getCalculatedValue()
- ), PHP_EOL;
-}
-```
-`/samples/DefinedNames/ScopedNamedRange2.php`
-
-Now we are creating three worksheets for each of three different clients. Because each Named Range is linked to a worksheet, we need to create three sets of Named Ranges, so that we don't simply reference the cells on only one of the worksheets; but because we are locally scoping them (note the extra boolean argument used when we define the Named Ranges) we can use the same names on each worksheet, and they will reference the correct cells when we use them in our formulae on that worksheet.
-
-When Named Ranges are being evaluated, the logic looks first to see if there is a locally scoped Named Range defined for the current worksheet. If there is, then that is the Named Range that will be used in the calculation. If no locally scoped Named Range with that name is found, the logic then looks to see if there is a globally scoped Named Range definition, and will use that if it is found. If no Named Range of the required name is found scoped to the current worksheet, or globally scoped, then a `#NAME` error will be returned.
-
-## Named Formulae
-
-A Named Formula is a stored formula, or part of a formula, that can be referenced in cells by name, and re-used in many different places within the spreadsheet.
-
-As an example, I'll modify the simple Tax Calculator that I created as my example for Named Ranges.
-
-```php
-// Add some Named Formulae
-// The first to store our tax rate
-$spreadsheet->addNamedFormula(new NamedFormula('TAX_RATE', $worksheet, '=19%'));
-// The second to calculate the Tax on a Price value (Note that `PRICE` is defined later as a Named Range)
-$spreadsheet->addNamedFormula(new NamedFormula('TAX', $worksheet, '=PRICE*TAX_RATE'));
-
-// Set up some basic data
-$worksheet
- ->setCellValue('A1', 'Tax Rate:')
- ->setCellValue('B1', '=TAX_RATE')
- ->setCellValue('A3', 'Net Price:')
- ->setCellValue('B3', 19.99)
- ->setCellValue('A4', 'Tax:')
- ->setCellValue('A5', 'Price including Tax:');
-
-// Define a named range that we can use in our formulae
-$spreadsheet->addNamedRange(new NamedRange('PRICE', $worksheet, '=$B$3'));
-
-// Reference the defined formulae in worksheet formulae
-$worksheet
- ->setCellValue('B4', '=TAX')
- ->setCellValue('B5', '=PRICE+TAX');
-
-echo sprintf(
- 'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f',
- $worksheet->getCell('B1')->getCalculatedValue(),
- $worksheet->getCell('B3')->getValue(),
- $worksheet->getCell('B4')->getCalculatedValue(),
- $worksheet->getCell('B5')->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/SimpleNamedFormula.php`
-
-There are a few points to note here:
-
-Firstly. we are actually storing the tax rate in a named formula (`TAX_RATE`) rather than as a cell value. When we display the tax rate in cell `B1`, we are really storing an instruction for MS Excel to evaluate the formula and display the result in that cell.
-
-Then we are using a Named Formula `TAX` that references both another Named Formula (`TAX_RATE`) and a Named Range (`PRICE`) and executes a calculation using them both (`PRICE * TAX_RATE`).
-
-Finally, we are using the formula `TAX` in two different contexts. Once to display the tax value (in cell `B4`); and a second time as part of another formula (`PRICE + TAX`) in cell `B5`.
-
----
-
-Named Formulae aren't just restricted tosimple mathematics, but can include MS EXcel functions as well to provide a lot of flexibility; and they can reference values on other worksheets.
-
-```php
-$worksheet = $spreadsheet->setActiveSheetIndex(0);
-setYearlyData($worksheet,'2019', $data2019);
-$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));
-setYearlyData($worksheet,'2020', $data2020);
-$worksheet = $spreadsheet->addSheet(new Worksheet($spreadsheet));
-setYearlyData($worksheet,'2020', [], 'GROWTH');
-
-function setYearlyData(Worksheet $worksheet, string $year, $yearlyData, ?string $title = null) {
- // Set up some basic data
- $worksheetTitle = $title ?: $year;
- $worksheet
- ->setTitle($worksheetTitle)
- ->setCellValue('A1', 'Month')
- ->setCellValue('B1', $worksheetTitle === 'GROWTH' ? 'Growth' : 'Sales')
- ->setCellValue('C1', $worksheetTitle === 'GROWTH' ? 'Profit Growth' : 'Margin')
- ->setCellValue('A2', Date::stringToExcel("{$year}-01-01"));
- for ($row = 3; $row <= 13; ++$row) {
- $worksheet->setCellValue("A{$row}", "=NEXT_MONTH");
- }
-
- if (!empty($yearlyData)) {
- $worksheet->fromArray($yearlyData, null, 'B2');
- } else {
- for ($row = 2; $row <= 13; ++$row) {
- $worksheet->setCellValue("B{$row}", "=GROWTH");
- $worksheet->setCellValue("C{$row}", "=PROFIT_GROWTH");
- }
- }
-
- $worksheet->getStyle('A1:C1')
- ->getFont()->setBold(true);
- $worksheet->getStyle('A2:A13')
- ->getNumberFormat()
- ->setFormatCode('mmmm');
- $worksheet->getStyle('B2:C13')
- ->getNumberFormat()
- ->setFormatCode($worksheetTitle === 'GROWTH' ? '0.00%' : '_-€* #,##0_-');
-}
-
-// Add some Named Formulae
-// The first to store our tax rate
-$spreadsheet->addNamedFormula(new NamedFormula('NEXT_MONTH', $worksheet, "=EDATE(OFFSET(\$A1,-1,0),1)"));
-$spreadsheet->addNamedFormula(new NamedFormula('GROWTH', $worksheet, "=IF('2020'!\$B1=\"\",\"-\",(('2020'!\$B1/'2019'!\$B1)-1))"));
-$spreadsheet->addNamedFormula(new NamedFormula('PROFIT_GROWTH', $worksheet, "=IF('2020'!\$C1=\"\",\"-\",(('2020'!\$C1/'2019'!\$C1)-1))"));
-
-for ($row = 2; $row<=7; ++$row) {
- $month = $worksheet->getCell("A{$row}")->getFormattedValue();
- $growth = $worksheet->getCell("B{$row}")->getFormattedValue();
- $profitGrowth = $worksheet->getCell("C{$row}")->getFormattedValue();
-
- echo "Growth for {$month} is {$growth}, with a Profit Growth of {$profitGrowth}", PHP_EOL;
-}
-```
-`/samples/DefinedNames/CrossWorksheetNamedFormula.php`
-
-Here we're creating two Named Formulae that both use the `IF()` function, and that compare values on two different worksheets, and calculate the percentage difference between the two. We're also creating a Named Formula that uses the `OFFSET()` function to reference the cell immediately above the current Relative cell reference.
-
-## Combining Named Ranges and Formulae
-
-For a slightly more complex example combining Named Ranges and Named Formulae, we can build on our client timesheet.
-
-```php
-// Set up some basic data for a timesheet
-$worksheet
- ->setCellValue('A1', 'Charge Rate/hour:')
- ->setCellValue('B1', '7.50')
- ->setCellValue('A3', 'Date')
- ->setCellValue('B3', 'Hours')
- ->setCellValue('C3', 'Charge');
-
-// Define named ranges
-// CHARGE_RATE is an absolute cell reference that always points to cell B1
-$spreadsheet->addNamedRange(new NamedRange('CHARGE_RATE', $worksheet, '=$B$1'));
-// HOURS_PER_DAY is a relative cell reference that always points to column B, but to a cell in the row where it is used
-$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));
-// Set up the formula for calculating the daily charge
-$spreadsheet->addNamedFormula(new NamedFormula('DAILY_CHARGE', null, '=HOURS_PER_DAY*CHARGE_RATE'));
-// Set up the formula for calculating the column totals
-$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_TOTALS', null, '=SUM(COLUMN_DATA_VALUES)'));
-
-
-$workHours = [
- '2020-0-06' => 7.5,
- '2020-0-07' => 7.25,
- '2020-0-08' => 6.5,
- '2020-0-09' => 7.0,
- '2020-0-10' => 5.5,
-];
-
-// Populate the Timesheet
-$startRow = 4;
-$row = $startRow;
-foreach ($workHours as $date => $hours) {
- $worksheet
- ->setCellValue("A{$row}", $date)
- ->setCellValue("B{$row}", $hours)
- ->setCellValue("C{$row}", '=DAILY_CHARGE');
- ++$row;
-}
-$endRow = $row - 1;
-
-// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
-$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, "=A\${$startRow}:A\${$endRow}"));
-
-++$row;
-$worksheet
- ->setCellValue("B{$row}", '=COLUMN_TOTALS')
- ->setCellValue("C{$row}", '=COLUMN_TOTALS');
-
-echo sprintf(
- 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',
- $worksheet->getCell("B{$row}")->getCalculatedValue(),
- $worksheet->getCell('B1')->getValue(),
- $worksheet->getCell("C{$row}")->getCalculatedValue()
-), PHP_EOL;
-```
-`/samples/DefinedNames/NamedFormulaeAndRanges.php`
-
-The main point to notice in this example is that you must specify a Worksheet for Named Ranges, but that it isn't required for Named Formulae; in fact, specifying a Worksheet for named Formulae can lead to MS Excel errors when a saved file is opened. Generally, it is far safer to specify a null Worksheet value when creating a Named Formula, unless it references cell values explicitly, or you wish to scope it to that Worksheet.
-
-It also doesn't matter what order we define our Named Ranges and Formulae, even when some are dependent on others: this only matters when we try to use them in a cell calculation, or when we save the file; and as long as every Defined Name has been defined at that point, then it isn't important. In this case, we couldn't define `COLUMN_DATA_VALUES` until we new the range of rows that it needed to contain; but we could still define the `COLUMN_TOTALS` formula before that.
-
-## Additional Comments
-
-### Helper
-
-In all the examples so far, we have explicitly used the `NamedRange` and `NamedFormula` classes, and the Spreadsheet's `addNamedRange()` and `addNamedFormula()` methods, e.g.
-```php
-$spreadsheet->addNamedRange(new NamedRange('HOURS_PER_DAY', $worksheet, '=$B1'));
-```
-However, this can lead to errors if we accidentally set a formula value for a Named Range, or a range value for a Named Formula.
-
-As a helper, the DefinedName class provides a static method that can identify whether the value expression is a Range or a Formula, and instantiate the appropriate class.
-```php
-$this->spreadsheet->addDefinedName(
- DefinedName::createInstance('FOO', $this->spreadsheet->getSheetByName('Sheet #2'), '=16%', true)
-);
-```
-
-### Naming Names
-
-The names that you assign to Defined Name must follow the following set of rules:
- - The first character of a name must be one of the following characters:
- - letter (including UTF-8 letters)
- - underscore (`_`)
- - Remaining characters in the name can be
- - letters (including UTF-8 letters)
- - numbers (including UTF-8 numbers)
- - periods (`.`)
- - underscore characters (`_`)
- - The following are not allowed:
- - Space characters are not allowed as part of a name.
- - Names can't look like cell addresses, such as A35 or R2C2
- - Names are not case sensitive. For example, `North` and `NORTH` are treated as the same name.
-
-### Limitations
-
-PHPSpreadsheet doesn't yet fully validate the names that you use, so it is possible to create a spreadsheet in PHPSpreadsheet that will break when you save and try to open it in MS Excel; or that will break PHPSpreadsheet when they are referenced in a cell.
-So please be sensible when creating names, and follow the rules listed above.
-
----
-
-There is nothing to stop you creating a Defined Name that matches an existing Function name
-```php
-$spreadsheet->addNamedFormula(new NamedFormula('SUM', $worksheet, '=SUM(A1:E5)'));
-```
-And this will work without problems in MS Excel. However, it is not guaranteed to work correctly in PHPSpreadsheet; and will certainly cause confusion for anybody reading it; so it is not recommended. Names exist to give clarity to the person reading the spreadsheet, and a cell containing `=SUM` is even harder to understand (what is it the sum of?) than a cell containing `=SUM(B4:B8)`. Use names that provide meaning, like `SUM_OF_WORKED_HOURS`.
-
----
-
-You cannot have a Named Range and a Named Formula with the same name, unless they are differently scoped.
-
----
-
-MS Excel uses some "special tricks" to simulate Relative Named Ranges where the row or column comes before the current row or column, useful if you want to get column totals that don't include the current cell. These "tricks" aren't supported by PHPSpreadsheet, but can be simulated using the `OFFSET()` function in a Named Formula.
-In our `RelativeNamedRange2.php` example, we explicitly created the `COLUMN_DATA_VALUES` Named Range using only the rows that we knew should be included, so that we weren't including the current row (where we were displaying the total) and creating a cyclic reference:
-```php
-// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
-$spreadsheet->addNamedRange(new NamedRange('COLUMN_DATA_VALUES', $worksheet, "=A\${$startRow}:A\${$endRow}"));
-```
-We could instead have created a Named Function using `OFFSET()` to specify just the start row, and offset the end row by -1 row:
-```php
-// COLUMN_TOTAL is another relative cell reference that always points to the same range of rows but to cell in the column where it is used
-// To avoid including the current row,or having to hard-code the range itself (as we did in the previous example)
-// we wrap it in a named formula using the OFFSET() function
-$spreadsheet->addNamedFormula(new NamedFormula('COLUMN_DATA_VALUES', $worksheet, "=OFFSET(A\$4:A1, -1, 0)"));
-```
-as demonstrated in example `RelativeNamedRangeAsFunction.php`.
diff --git a/docs/topics/file-formats.md b/docs/topics/file-formats.md
index 7318b13611..d447a2f0bd 100644
--- a/docs/topics/file-formats.md
+++ b/docs/topics/file-formats.md
@@ -15,7 +15,7 @@ file format that was used by Microsoft Excelâ„¢ between versions 95 and 2003.
The format is supported (to various extents) by most spreadsheet
programs. BIFF files normally have an extension of .xls. Documentation
describing the format can be [read online](https://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx)
-or [downloaded as PDF](https://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5BMS-XLS%5D.pdf).
+or [downloaded as PDF](http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5BMS-XLS%5D.pdf).
### Xml
@@ -32,7 +32,7 @@ Office Open XML SpreadsheetML, and Excel 2010 extended this still
further with its new features such as sparklines. These files typically
have an extension of .xlsx. This format is based around a zipped
collection of eXtensible Markup Language (XML) files. Microsoft Office
-Open XML SpreadsheetML is mostly standardized in [ECMA 376](https://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)
+Open XML SpreadsheetML is mostly standardized in [ECMA 376](http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)
and ISO 29500.
### Ods
@@ -46,7 +46,7 @@ extension of .ods. The published specification for the file format is
available from [the OASIS Open Office XML Format Technical Committee web
page](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office).
Other information is available from [the OpenOffice.org XML File Format
-web page](https://www.openoffice.org/xml/), part of the
+web page](http://www.openoffice.org/xml/), part of the
OpenOffice.org project.
### Slk
@@ -71,7 +71,7 @@ library.
### Csv
Comma Separated Value (CSV) file format is a common structuring strategy
-for text format files. In CSV files, each line in the file represents a
+for text format files. In CSV flies, each line in the file represents a
row of data and (within each line of the file) the different data fields
(or columns) are separated from one another using a comma (`,`). If a
data field contains a comma, then it should be enclosed (typically in
@@ -80,8 +80,7 @@ semi-colon (`;`) are used as separators instead of a comma, although
other symbols can be used. Because CSV is a text-only format, it doesn't
support any data formatting options.
-"CSV" is not a single, well-defined format (although see
-[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.html) for
+"CSV" is not a single, well-defined format (although see RFC 4180 for
one definition that is commonly used). Rather, in practice the term
"CSV" refers to any file that:
@@ -118,5 +117,5 @@ Wide Web Consortium (W3C). However, in 2000, HTML also became an
international standard (ISO/IEC 15445:2000). HTML 4.01 was published in
late 1999, with further errata published through 2001. In 2004
development began on HTML5 in the Web Hypertext Application Technology
-Working Group (WHATWG), which became a joint deliverable with the W3C in 2008.
-
+Working Group (WHATWG), which became a joint deliverable with the W3C in
+2008.
diff --git a/docs/topics/images/08-advanced-borders.png b/docs/topics/images/08-advanced-borders.png
deleted file mode 100644
index 047110e731..0000000000
Binary files a/docs/topics/images/08-advanced-borders.png and /dev/null differ
diff --git a/docs/topics/images/08-cell-comment-with-image.png b/docs/topics/images/08-cell-comment-with-image.png
deleted file mode 100644
index a58c39dac5..0000000000
Binary files a/docs/topics/images/08-cell-comment-with-image.png and /dev/null differ
diff --git a/docs/topics/images/10-databar-of-conditional-formatting.png b/docs/topics/images/10-databar-of-conditional-formatting.png
deleted file mode 100644
index 10c88f9f77..0000000000
Binary files a/docs/topics/images/10-databar-of-conditional-formatting.png and /dev/null differ
diff --git a/docs/topics/images/101-Active-Worksheet-1.png b/docs/topics/images/101-Active-Worksheet-1.png
deleted file mode 100644
index bc83dc21b3..0000000000
Binary files a/docs/topics/images/101-Active-Worksheet-1.png and /dev/null differ
diff --git a/docs/topics/images/101-Active-Worksheet-2.png b/docs/topics/images/101-Active-Worksheet-2.png
deleted file mode 100644
index 765af8515e..0000000000
Binary files a/docs/topics/images/101-Active-Worksheet-2.png and /dev/null differ
diff --git a/docs/topics/images/101-Active-Worksheet-Change.png b/docs/topics/images/101-Active-Worksheet-Change.png
deleted file mode 100644
index 6aa7daaa3d..0000000000
Binary files a/docs/topics/images/101-Active-Worksheet-Change.png and /dev/null differ
diff --git a/docs/topics/images/101-Basic-Spreadsheet-with-Worksheet.png b/docs/topics/images/101-Basic-Spreadsheet-with-Worksheet.png
deleted file mode 100644
index b61e0dc84e..0000000000
Binary files a/docs/topics/images/101-Basic-Spreadsheet-with-Worksheet.png and /dev/null differ
diff --git a/docs/topics/images/11-01-CF-Simple-Select-Range.png b/docs/topics/images/11-01-CF-Simple-Select-Range.png
deleted file mode 100644
index b8cca0cb08..0000000000
Binary files a/docs/topics/images/11-01-CF-Simple-Select-Range.png and /dev/null differ
diff --git a/docs/topics/images/11-02-CF-Simple-Tab.png b/docs/topics/images/11-02-CF-Simple-Tab.png
deleted file mode 100644
index 1ee9c70c3b..0000000000
Binary files a/docs/topics/images/11-02-CF-Simple-Tab.png and /dev/null differ
diff --git a/docs/topics/images/11-03-CF-Simple-CellIs-GreaterThan.png b/docs/topics/images/11-03-CF-Simple-CellIs-GreaterThan.png
deleted file mode 100644
index 7408743c26..0000000000
Binary files a/docs/topics/images/11-03-CF-Simple-CellIs-GreaterThan.png and /dev/null differ
diff --git a/docs/topics/images/11-04-CF-Simple-CellIs-Value-and-Style.png b/docs/topics/images/11-04-CF-Simple-CellIs-Value-and-Style.png
deleted file mode 100644
index 94a9e36950..0000000000
Binary files a/docs/topics/images/11-04-CF-Simple-CellIs-Value-and-Style.png and /dev/null differ
diff --git a/docs/topics/images/11-05-CF-Simple-CellIs-Highlighted.png b/docs/topics/images/11-05-CF-Simple-CellIs-Highlighted.png
deleted file mode 100644
index 7487ce877e..0000000000
Binary files a/docs/topics/images/11-05-CF-Simple-CellIs-Highlighted.png and /dev/null differ
diff --git a/docs/topics/images/11-06-CF-Simple-Cell-Value-Change.png b/docs/topics/images/11-06-CF-Simple-Cell-Value-Change.png
deleted file mode 100644
index 2c3124f70c..0000000000
Binary files a/docs/topics/images/11-06-CF-Simple-Cell-Value-Change.png and /dev/null differ
diff --git a/docs/topics/images/11-07-CF-Wizard.png b/docs/topics/images/11-07-CF-Wizard.png
deleted file mode 100644
index 99325fe8dc..0000000000
Binary files a/docs/topics/images/11-07-CF-Wizard.png and /dev/null differ
diff --git a/docs/topics/images/11-08-CF-Absolute-Cell-Reference.png b/docs/topics/images/11-08-CF-Absolute-Cell-Reference.png
deleted file mode 100644
index a1816e1f38..0000000000
Binary files a/docs/topics/images/11-08-CF-Absolute-Cell-Reference.png and /dev/null differ
diff --git a/docs/topics/images/11-09-CF-Relative-Cell-Reference.png b/docs/topics/images/11-09-CF-Relative-Cell-Reference.png
deleted file mode 100644
index 9fdaf5641e..0000000000
Binary files a/docs/topics/images/11-09-CF-Relative-Cell-Reference.png and /dev/null differ
diff --git a/docs/topics/images/11-10-CF-Blanks-Example.png b/docs/topics/images/11-10-CF-Blanks-Example.png
deleted file mode 100644
index 503ba28d0a..0000000000
Binary files a/docs/topics/images/11-10-CF-Blanks-Example.png and /dev/null differ
diff --git a/docs/topics/images/11-11-CF-Errors-Example.png b/docs/topics/images/11-11-CF-Errors-Example.png
deleted file mode 100644
index 231d26f547..0000000000
Binary files a/docs/topics/images/11-11-CF-Errors-Example.png and /dev/null differ
diff --git a/docs/topics/images/11-12-CF-Simple-Example.png b/docs/topics/images/11-12-CF-Simple-Example.png
deleted file mode 100644
index 0dc1f13c7c..0000000000
Binary files a/docs/topics/images/11-12-CF-Simple-Example.png and /dev/null differ
diff --git a/docs/topics/images/11-13-CF-Formula-with-Relative-Cell-Reference.png b/docs/topics/images/11-13-CF-Formula-with-Relative-Cell-Reference.png
deleted file mode 100644
index 20e46afa32..0000000000
Binary files a/docs/topics/images/11-13-CF-Formula-with-Relative-Cell-Reference.png and /dev/null differ
diff --git a/docs/topics/images/11-14-CF-Expression-Example-Odd-Even.png b/docs/topics/images/11-14-CF-Expression-Example-Odd-Even.png
deleted file mode 100644
index c32becddf4..0000000000
Binary files a/docs/topics/images/11-14-CF-Expression-Example-Odd-Even.png and /dev/null differ
diff --git a/docs/topics/images/11-15-CF-Expression-Sales-Grid-1.png b/docs/topics/images/11-15-CF-Expression-Sales-Grid-1.png
deleted file mode 100644
index 0c900b9749..0000000000
Binary files a/docs/topics/images/11-15-CF-Expression-Sales-Grid-1.png and /dev/null differ
diff --git a/docs/topics/images/11-16-CF-Expression-Sales-Grid-2.png b/docs/topics/images/11-16-CF-Expression-Sales-Grid-2.png
deleted file mode 100644
index 2c56608308..0000000000
Binary files a/docs/topics/images/11-16-CF-Expression-Sales-Grid-2.png and /dev/null differ
diff --git a/docs/topics/images/11-17-CF-Text-Contains.png b/docs/topics/images/11-17-CF-Text-Contains.png
deleted file mode 100644
index f52a7f769c..0000000000
Binary files a/docs/topics/images/11-17-CF-Text-Contains.png and /dev/null differ
diff --git a/docs/topics/images/11-18-CF-Date-Occurring-Examples.png b/docs/topics/images/11-18-CF-Date-Occurring-Examples.png
deleted file mode 100644
index 3d9d7cdbbb..0000000000
Binary files a/docs/topics/images/11-18-CF-Date-Occurring-Examples.png and /dev/null differ
diff --git a/docs/topics/images/11-19-CF-Duplicates-Uniques-Examples.png b/docs/topics/images/11-19-CF-Duplicates-Uniques-Examples.png
deleted file mode 100644
index 3d6b751a99..0000000000
Binary files a/docs/topics/images/11-19-CF-Duplicates-Uniques-Examples.png and /dev/null differ
diff --git a/docs/topics/images/11-20-CF-Rule-Order-1.png b/docs/topics/images/11-20-CF-Rule-Order-1.png
deleted file mode 100644
index 5dbdd5403a..0000000000
Binary files a/docs/topics/images/11-20-CF-Rule-Order-1.png and /dev/null differ
diff --git a/docs/topics/images/11-21-CF-Rule-Order-2.pic2.png b/docs/topics/images/11-21-CF-Rule-Order-2.pic2.png
deleted file mode 100644
index d3596a5c5c..0000000000
Binary files a/docs/topics/images/11-21-CF-Rule-Order-2.pic2.png and /dev/null differ
diff --git a/docs/topics/images/11-21-CF-Rule-Order-2.pic3.png b/docs/topics/images/11-21-CF-Rule-Order-2.pic3.png
deleted file mode 100644
index 996a26d0b4..0000000000
Binary files a/docs/topics/images/11-21-CF-Rule-Order-2.pic3.png and /dev/null differ
diff --git a/docs/topics/images/11-21-CF-Rule-Order-2.png b/docs/topics/images/11-21-CF-Rule-Order-2.png
deleted file mode 100644
index f874a0b0bc..0000000000
Binary files a/docs/topics/images/11-21-CF-Rule-Order-2.png and /dev/null differ
diff --git a/docs/topics/images/12-01-MergeCells-Options-2.png b/docs/topics/images/12-01-MergeCells-Options-2.png
deleted file mode 100644
index 5e745fc934..0000000000
Binary files a/docs/topics/images/12-01-MergeCells-Options-2.png and /dev/null differ
diff --git a/docs/topics/images/12-01-MergeCells-Options-3.png b/docs/topics/images/12-01-MergeCells-Options-3.png
deleted file mode 100644
index 30ad346eac..0000000000
Binary files a/docs/topics/images/12-01-MergeCells-Options-3.png and /dev/null differ
diff --git a/docs/topics/images/12-01-MergeCells-Options.png b/docs/topics/images/12-01-MergeCells-Options.png
deleted file mode 100644
index 34c8f5e3e6..0000000000
Binary files a/docs/topics/images/12-01-MergeCells-Options.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Array-Formula-2.png b/docs/topics/images/12-CalculationEngine-Array-Formula-2.png
deleted file mode 100644
index 45fc3ce5e8..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Array-Formula-2.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Array-Formula-3.png b/docs/topics/images/12-CalculationEngine-Array-Formula-3.png
deleted file mode 100644
index 2f01e9d2ae..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Array-Formula-3.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Array-Formula.png b/docs/topics/images/12-CalculationEngine-Array-Formula.png
deleted file mode 100644
index 77987b2707..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Array-Formula.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Basic-Formula-2.png b/docs/topics/images/12-CalculationEngine-Basic-Formula-2.png
deleted file mode 100644
index 465f27a278..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Basic-Formula-2.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Basic-Formula.png b/docs/topics/images/12-CalculationEngine-Basic-Formula.png
deleted file mode 100644
index 03cd82a686..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Basic-Formula.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Spillage-Formula-2.png b/docs/topics/images/12-CalculationEngine-Spillage-Formula-2.png
deleted file mode 100644
index 8fc397d1d6..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Spillage-Formula-2.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Spillage-Formula.png b/docs/topics/images/12-CalculationEngine-Spillage-Formula.png
deleted file mode 100644
index 4189cb47fa..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Spillage-Formula.png and /dev/null differ
diff --git a/docs/topics/images/12-CalculationEngine-Spillage-Operator.png b/docs/topics/images/12-CalculationEngine-Spillage-Operator.png
deleted file mode 100644
index c096875e94..0000000000
Binary files a/docs/topics/images/12-CalculationEngine-Spillage-Operator.png and /dev/null differ
diff --git a/docs/topics/images/99-Properties_Advanced-Form-2.png b/docs/topics/images/99-Properties_Advanced-Form-2.png
deleted file mode 100644
index d047bd554b..0000000000
Binary files a/docs/topics/images/99-Properties_Advanced-Form-2.png and /dev/null differ
diff --git a/docs/topics/images/99-Properties_Advanced-Form.png b/docs/topics/images/99-Properties_Advanced-Form.png
deleted file mode 100644
index 4c9cfab33c..0000000000
Binary files a/docs/topics/images/99-Properties_Advanced-Form.png and /dev/null differ
diff --git a/docs/topics/images/99-Properties_Advanced.png b/docs/topics/images/99-Properties_Advanced.png
deleted file mode 100644
index d0eec1e9bc..0000000000
Binary files a/docs/topics/images/99-Properties_Advanced.png and /dev/null differ
diff --git a/docs/topics/images/99-Properties_Block.png b/docs/topics/images/99-Properties_Block.png
deleted file mode 100644
index e87494f016..0000000000
Binary files a/docs/topics/images/99-Properties_Block.png and /dev/null differ
diff --git a/docs/topics/images/99-Properties_File-Menu.png b/docs/topics/images/99-Properties_File-Menu.png
deleted file mode 100644
index cc473a6c28..0000000000
Binary files a/docs/topics/images/99-Properties_File-Menu.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 1.png b/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 1.png
deleted file mode 100644
index 34bbfb9577..0000000000
Binary files a/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 1.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 2.png b/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 2.png
deleted file mode 100644
index 77a898e65e..0000000000
Binary files a/docs/topics/images/Behind the Mask/Accounting Format Wizard - Code 2.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Additional Masking Symbols.png b/docs/topics/images/Behind the Mask/Additional Masking Symbols.png
deleted file mode 100644
index b1f567b50b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Additional Masking Symbols.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Basic Masking Symbols.png b/docs/topics/images/Behind the Mask/Basic Masking Symbols.png
deleted file mode 100644
index 3417d6be88..0000000000
Binary files a/docs/topics/images/Behind the Mask/Basic Masking Symbols.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Composite - Basic Wizard.png b/docs/topics/images/Behind the Mask/Composite - Basic Wizard.png
deleted file mode 100644
index f89da8670b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Composite - Basic Wizard.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Composite - Locale Wizard.png b/docs/topics/images/Behind the Mask/Composite - Locale Wizard.png
deleted file mode 100644
index d6691cd8d5..0000000000
Binary files a/docs/topics/images/Behind the Mask/Composite - Locale Wizard.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Conditional 1.png b/docs/topics/images/Behind the Mask/Conditional 1.png
deleted file mode 100644
index 39e885d528..0000000000
Binary files a/docs/topics/images/Behind the Mask/Conditional 1.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Conditional 2.png b/docs/topics/images/Behind the Mask/Conditional 2.png
deleted file mode 100644
index 4c743c2994..0000000000
Binary files a/docs/topics/images/Behind the Mask/Conditional 2.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Conditional Symbols.png b/docs/topics/images/Behind the Mask/Conditional Symbols.png
deleted file mode 100644
index 52db87cbc8..0000000000
Binary files a/docs/topics/images/Behind the Mask/Conditional Symbols.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 1.png b/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 1.png
deleted file mode 100644
index 8ce656f390..0000000000
Binary files a/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 1.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 2.png b/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 2.png
deleted file mode 100644
index 65cd4e4d70..0000000000
Binary files a/docs/topics/images/Behind the Mask/Currency Format Wizard - Code 2.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Date Format Codes.png b/docs/topics/images/Behind the Mask/Date Format Codes.png
deleted file mode 100644
index 068976ff6a..0000000000
Binary files a/docs/topics/images/Behind the Mask/Date Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Digit Placeholders.png b/docs/topics/images/Behind the Mask/Digit Placeholders.png
deleted file mode 100644
index 357d1d3357..0000000000
Binary files a/docs/topics/images/Behind the Mask/Digit Placeholders.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Duration Format Codes.png b/docs/topics/images/Behind the Mask/Duration Format Codes.png
deleted file mode 100644
index 21f708dc7b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Duration Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Accounting.png b/docs/topics/images/Behind the Mask/Excel Number Format - Accounting.png
deleted file mode 100644
index 70d57e3217..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Accounting.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Currency.png b/docs/topics/images/Behind the Mask/Excel Number Format - Currency.png
deleted file mode 100644
index 8c097f097e..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Currency.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Custom.png b/docs/topics/images/Behind the Mask/Excel Number Format - Custom.png
deleted file mode 100644
index 50a540add0..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Custom.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Date.png b/docs/topics/images/Behind the Mask/Excel Number Format - Date.png
deleted file mode 100644
index 510d4b8b2f..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Date.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Fraction.png b/docs/topics/images/Behind the Mask/Excel Number Format - Fraction.png
deleted file mode 100644
index 49db29dea8..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Fraction.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - General.png b/docs/topics/images/Behind the Mask/Excel Number Format - General.png
deleted file mode 100644
index eae21f6607..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - General.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Number.png b/docs/topics/images/Behind the Mask/Excel Number Format - Number.png
deleted file mode 100644
index d6ad5ae266..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Number.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Percentage.png b/docs/topics/images/Behind the Mask/Excel Number Format - Percentage.png
deleted file mode 100644
index cafac8b18b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Percentage.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Scientific.png b/docs/topics/images/Behind the Mask/Excel Number Format - Scientific.png
deleted file mode 100644
index b1b5726650..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Scientific.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Special.png b/docs/topics/images/Behind the Mask/Excel Number Format - Special.png
deleted file mode 100644
index 1e0550e242..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Special.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Text.png b/docs/topics/images/Behind the Mask/Excel Number Format - Text.png
deleted file mode 100644
index b87e0fa811..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Text.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format - Time.png b/docs/topics/images/Behind the Mask/Excel Number Format - Time.png
deleted file mode 100644
index 71137b67e1..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format - Time.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Excel Number Format.png b/docs/topics/images/Behind the Mask/Excel Number Format.png
deleted file mode 100644
index 6369bc533d..0000000000
Binary files a/docs/topics/images/Behind the Mask/Excel Number Format.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Hiding Values.png b/docs/topics/images/Behind the Mask/Hiding Values.png
deleted file mode 100644
index ecafcc9c08..0000000000
Binary files a/docs/topics/images/Behind the Mask/Hiding Values.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Indent.png b/docs/topics/images/Behind the Mask/Indent.png
deleted file mode 100644
index 5274215238..0000000000
Binary files a/docs/topics/images/Behind the Mask/Indent.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Mask Sections.gif b/docs/topics/images/Behind the Mask/Mask Sections.gif
deleted file mode 100644
index 724634d1ff..0000000000
Binary files a/docs/topics/images/Behind the Mask/Mask Sections.gif and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Mask Sections.png b/docs/topics/images/Behind the Mask/Mask Sections.png
deleted file mode 100644
index 04f1efbdb5..0000000000
Binary files a/docs/topics/images/Behind the Mask/Mask Sections.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Number Format Wizard - Code.png b/docs/topics/images/Behind the Mask/Number Format Wizard - Code.png
deleted file mode 100644
index 287ce45940..0000000000
Binary files a/docs/topics/images/Behind the Mask/Number Format Wizard - Code.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Padding.png b/docs/topics/images/Behind the Mask/Padding.png
deleted file mode 100644
index a5c8546958..0000000000
Binary files a/docs/topics/images/Behind the Mask/Padding.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Percentage Format Wizard - Code.png b/docs/topics/images/Behind the Mask/Percentage Format Wizard - Code.png
deleted file mode 100644
index db7af15d20..0000000000
Binary files a/docs/topics/images/Behind the Mask/Percentage Format Wizard - Code.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Reading Cell Format - Code.png b/docs/topics/images/Behind the Mask/Reading Cell Format - Code.png
deleted file mode 100644
index ca5a0b5ad8..0000000000
Binary files a/docs/topics/images/Behind the Mask/Reading Cell Format - Code.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Reading Cell Format - Output.png b/docs/topics/images/Behind the Mask/Reading Cell Format - Output.png
deleted file mode 100644
index 2265cde7f1..0000000000
Binary files a/docs/topics/images/Behind the Mask/Reading Cell Format - Output.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Reading Cell Values - Code.png b/docs/topics/images/Behind the Mask/Reading Cell Values - Code.png
deleted file mode 100644
index d0f60b59bb..0000000000
Binary files a/docs/topics/images/Behind the Mask/Reading Cell Values - Code.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Reading Cell Values - Output.png b/docs/topics/images/Behind the Mask/Reading Cell Values - Output.png
deleted file mode 100644
index e4d4048b35..0000000000
Binary files a/docs/topics/images/Behind the Mask/Reading Cell Values - Output.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Right Align.png b/docs/topics/images/Behind the Mask/Right Align.png
deleted file mode 100644
index 549b89f324..0000000000
Binary files a/docs/topics/images/Behind the Mask/Right Align.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Scaling Example.png b/docs/topics/images/Behind the Mask/Scaling Example.png
deleted file mode 100644
index 4526bf62ca..0000000000
Binary files a/docs/topics/images/Behind the Mask/Scaling Example.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Scientific Format Wizard - Code.png b/docs/topics/images/Behind the Mask/Scientific Format Wizard - Code.png
deleted file mode 100644
index 898472528f..0000000000
Binary files a/docs/topics/images/Behind the Mask/Scientific Format Wizard - Code.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Setting a Mask - Code 1.png b/docs/topics/images/Behind the Mask/Setting a Mask - Code 1.png
deleted file mode 100644
index 104a8fe04b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Setting a Mask - Code 1.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Setting a Mask - Code 2.png b/docs/topics/images/Behind the Mask/Setting a Mask - Code 2.png
deleted file mode 100644
index e2f34d7059..0000000000
Binary files a/docs/topics/images/Behind the Mask/Setting a Mask - Code 2.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Setting a Mask - Code 3.png b/docs/topics/images/Behind the Mask/Setting a Mask - Code 3.png
deleted file mode 100644
index eabc1e23ba..0000000000
Binary files a/docs/topics/images/Behind the Mask/Setting a Mask - Code 3.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Setting a Mask - Output 1.png b/docs/topics/images/Behind the Mask/Setting a Mask - Output 1.png
deleted file mode 100644
index 40ef6f1348..0000000000
Binary files a/docs/topics/images/Behind the Mask/Setting a Mask - Output 1.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Stock Portfolio.png b/docs/topics/images/Behind the Mask/Stock Portfolio.png
deleted file mode 100644
index c364f81a0b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Stock Portfolio.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Stock Portfolio.xlsx b/docs/topics/images/Behind the Mask/Stock Portfolio.xlsx
deleted file mode 100644
index 9b51e56f3e..0000000000
Binary files a/docs/topics/images/Behind the Mask/Stock Portfolio.xlsx and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Summary - Still a numeric value.png b/docs/topics/images/Behind the Mask/Summary - Still a numeric value.png
deleted file mode 100644
index a2e6dec7bb..0000000000
Binary files a/docs/topics/images/Behind the Mask/Summary - Still a numeric value.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/TEXT Function.png b/docs/topics/images/Behind the Mask/TEXT Function.png
deleted file mode 100644
index 1242a8c753..0000000000
Binary files a/docs/topics/images/Behind the Mask/TEXT Function.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Text Single Character Example.png b/docs/topics/images/Behind the Mask/Text Single Character Example.png
deleted file mode 100644
index 14356c88ae..0000000000
Binary files a/docs/topics/images/Behind the Mask/Text Single Character Example.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Text Single Character Exceptions.png b/docs/topics/images/Behind the Mask/Text Single Character Exceptions.png
deleted file mode 100644
index 99173ca48b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Text Single Character Exceptions.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Text String Example.png b/docs/topics/images/Behind the Mask/Text String Example.png
deleted file mode 100644
index 2125f39da0..0000000000
Binary files a/docs/topics/images/Behind the Mask/Text String Example.png and /dev/null differ
diff --git a/docs/topics/images/Behind the Mask/Time Format Codes.png b/docs/topics/images/Behind the Mask/Time Format Codes.png
deleted file mode 100644
index 321693160b..0000000000
Binary files a/docs/topics/images/Behind the Mask/Time Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Empty Rows 2.png b/docs/topics/images/Looping the Loop/Empty Rows 2.png
deleted file mode 100644
index 304f1cf3bd..0000000000
Binary files a/docs/topics/images/Looping the Loop/Empty Rows 2.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Empty Rows.png b/docs/topics/images/Looping the Loop/Empty Rows.png
deleted file mode 100644
index bfc822eb8c..0000000000
Binary files a/docs/topics/images/Looping the Loop/Empty Rows.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Basic Code.png b/docs/topics/images/Looping the Loop/Iterators Basic Code.png
deleted file mode 100644
index ad27487895..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Basic Code.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Empty Row 2.png b/docs/topics/images/Looping the Loop/Iterators Empty Row 2.png
deleted file mode 100644
index 5ff7723333..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Empty Row 2.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Empty Row 3.png b/docs/topics/images/Looping the Loop/Iterators Empty Row 3.png
deleted file mode 100644
index 2e00a77775..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Empty Row 3.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Empty Row.png b/docs/topics/images/Looping the Loop/Iterators Empty Row.png
deleted file mode 100644
index 56b642f94d..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Empty Row.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Existing Only.png b/docs/topics/images/Looping the Loop/Iterators Existing Only.png
deleted file mode 100644
index 13584e9f39..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Existing Only.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Memory and Timings.png b/docs/topics/images/Looping the Loop/Iterators Memory and Timings.png
deleted file mode 100644
index 248ffae226..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Memory and Timings.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Range 1.png b/docs/topics/images/Looping the Loop/Iterators Range 1.png
deleted file mode 100644
index e67af5f1ee..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Range 1.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Range 2.png b/docs/topics/images/Looping the Loop/Iterators Range 2.png
deleted file mode 100644
index 20fd1fb147..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Range 2.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Iterators Return Null.png b/docs/topics/images/Looping the Loop/Iterators Return Null.png
deleted file mode 100644
index e5afc88cb0..0000000000
Binary files a/docs/topics/images/Looping the Loop/Iterators Return Null.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Summary of Memory Usage and Timings.png b/docs/topics/images/Looping the Loop/Summary of Memory Usage and Timings.png
deleted file mode 100644
index c76ad94f05..0000000000
Binary files a/docs/topics/images/Looping the Loop/Summary of Memory Usage and Timings.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/Table with Empty Rows.png b/docs/topics/images/Looping the Loop/Table with Empty Rows.png
deleted file mode 100644
index f3986f7707..0000000000
Binary files a/docs/topics/images/Looping the Loop/Table with Empty Rows.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/rangeToArray Basic Code.png b/docs/topics/images/Looping the Loop/rangeToArray Basic Code.png
deleted file mode 100644
index 005227ddfa..0000000000
Binary files a/docs/topics/images/Looping the Loop/rangeToArray Basic Code.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/rangeToArray Batch 2.png b/docs/topics/images/Looping the Loop/rangeToArray Batch 2.png
deleted file mode 100644
index adc1a36330..0000000000
Binary files a/docs/topics/images/Looping the Loop/rangeToArray Batch 2.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/rangeToArray Batch Memory and Timings.png b/docs/topics/images/Looping the Loop/rangeToArray Batch Memory and Timings.png
deleted file mode 100644
index 4942918df3..0000000000
Binary files a/docs/topics/images/Looping the Loop/rangeToArray Batch Memory and Timings.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/rangeToArray Batch.png b/docs/topics/images/Looping the Loop/rangeToArray Batch.png
deleted file mode 100644
index 1945b9becd..0000000000
Binary files a/docs/topics/images/Looping the Loop/rangeToArray Batch.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Arguments.png b/docs/topics/images/Looping the Loop/toArray Arguments.png
deleted file mode 100644
index c45c96614a..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Arguments.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Basic Code.png b/docs/topics/images/Looping the Loop/toArray Basic Code.png
deleted file mode 100644
index cd0eb716ce..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Basic Code.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Break at Empty Row.png b/docs/topics/images/Looping the Loop/toArray Break at Empty Row.png
deleted file mode 100644
index 5b25d39d0b..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Break at Empty Row.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Memory and Timings.png b/docs/topics/images/Looping the Loop/toArray Memory and Timings.png
deleted file mode 100644
index 68934b9449..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Memory and Timings.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Monthly Sales 2.png b/docs/topics/images/Looping the Loop/toArray Monthly Sales 2.png
deleted file mode 100644
index 5f6b7b8381..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Monthly Sales 2.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Monthly Sales.png b/docs/topics/images/Looping the Loop/toArray Monthly Sales.png
deleted file mode 100644
index 52fd6999e9..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Monthly Sales.png and /dev/null differ
diff --git a/docs/topics/images/Looping the Loop/toArray Skip Empty Rows.png b/docs/topics/images/Looping the Loop/toArray Skip Empty Rows.png
deleted file mode 100644
index 95683505d9..0000000000
Binary files a/docs/topics/images/Looping the Loop/toArray Skip Empty Rows.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Date Arithmetic 2.png b/docs/topics/images/The Dating Game/Date Arithmetic 2.png
deleted file mode 100644
index c6b73cee2b..0000000000
Binary files a/docs/topics/images/The Dating Game/Date Arithmetic 2.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Date Arithmetic.png b/docs/topics/images/The Dating Game/Date Arithmetic.png
deleted file mode 100644
index 9795be70db..0000000000
Binary files a/docs/topics/images/The Dating Game/Date Arithmetic.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Date Code 1.png b/docs/topics/images/The Dating Game/Date Code 1.png
deleted file mode 100644
index 02a9c2ec74..0000000000
Binary files a/docs/topics/images/The Dating Game/Date Code 1.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Date Format Codes.png b/docs/topics/images/The Dating Game/Date Format Codes.png
deleted file mode 100644
index 068976ff6a..0000000000
Binary files a/docs/topics/images/The Dating Game/Date Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Date as a number.png b/docs/topics/images/The Dating Game/Date as a number.png
deleted file mode 100644
index 99523ff9a7..0000000000
Binary files a/docs/topics/images/The Dating Game/Date as a number.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Duration Format Codes.png b/docs/topics/images/The Dating Game/Duration Format Codes.png
deleted file mode 100644
index 21f708dc7b..0000000000
Binary files a/docs/topics/images/The Dating Game/Duration Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Locale.png b/docs/topics/images/The Dating Game/Locale.png
deleted file mode 100644
index 0df2c5f5b2..0000000000
Binary files a/docs/topics/images/The Dating Game/Locale.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Locale1.png b/docs/topics/images/The Dating Game/Locale1.png
deleted file mode 100644
index 276e22fb13..0000000000
Binary files a/docs/topics/images/The Dating Game/Locale1.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Locale2.png b/docs/topics/images/The Dating Game/Locale2.png
deleted file mode 100644
index 42502106a8..0000000000
Binary files a/docs/topics/images/The Dating Game/Locale2.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/StringDateValues.jpg b/docs/topics/images/The Dating Game/StringDateValues.jpg
deleted file mode 100644
index 910645e019..0000000000
Binary files a/docs/topics/images/The Dating Game/StringDateValues.jpg and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Time Code 2.png b/docs/topics/images/The Dating Game/Time Code 2.png
deleted file mode 100644
index c308d64d0f..0000000000
Binary files a/docs/topics/images/The Dating Game/Time Code 2.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Time Format Codes.png b/docs/topics/images/The Dating Game/Time Format Codes.png
deleted file mode 100644
index 321693160b..0000000000
Binary files a/docs/topics/images/The Dating Game/Time Format Codes.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Time as a number.png b/docs/topics/images/The Dating Game/Time as a number.png
deleted file mode 100644
index 16901d87f1..0000000000
Binary files a/docs/topics/images/The Dating Game/Time as a number.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Timesheet Code 1.png b/docs/topics/images/The Dating Game/Timesheet Code 1.png
deleted file mode 100644
index 99cfd8f2b4..0000000000
Binary files a/docs/topics/images/The Dating Game/Timesheet Code 1.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Timesheet Code 2.png b/docs/topics/images/The Dating Game/Timesheet Code 2.png
deleted file mode 100644
index b8e3a24c9d..0000000000
Binary files a/docs/topics/images/The Dating Game/Timesheet Code 2.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Timesheet Code 3.png b/docs/topics/images/The Dating Game/Timesheet Code 3.png
deleted file mode 100644
index e1921e3840..0000000000
Binary files a/docs/topics/images/The Dating Game/Timesheet Code 3.png and /dev/null differ
diff --git a/docs/topics/images/The Dating Game/Timesheet.png b/docs/topics/images/The Dating Game/Timesheet.png
deleted file mode 100644
index d843d7bc3a..0000000000
Binary files a/docs/topics/images/The Dating Game/Timesheet.png and /dev/null differ
diff --git a/docs/topics/memory_saving.md b/docs/topics/memory_saving.md
index e52a83e414..c7f9a0cbbd 100644
--- a/docs/topics/memory_saving.md
+++ b/docs/topics/memory_saving.md
@@ -1,6 +1,6 @@
# Memory saving
-PhpSpreadsheet uses an average of about 1k per cell (1.6k on 64-bit PHP) in your worksheets, so
+PhpSpreadsheet uses an average of about 1k per cell in your worksheets, so
large workbooks can quickly use up available memory. Cell caching
provides a mechanism that allows PhpSpreadsheet to maintain the cell
objects in a smaller size of memory, or off-memory (eg: on disk, in APCu,
@@ -9,14 +9,14 @@ workbooks, although at a cost of speed to access cell data.
By default, PhpSpreadsheet holds all cell objects in memory, but
you can specify alternatives by providing your own
-[PSR-16](https://www.php-fig.org/psr/psr-16/) implementation. PhpSpreadsheet keys
+[PSR-16](http://www.php-fig.org/psr/psr-16/) implementation. PhpSpreadsheet keys
are automatically namespaced, and cleaned up after use, so a single cache
instance may be shared across several usage of PhpSpreadsheet or even with other
cache usages.
To enable cell caching, you must provide your own implementation of cache like so:
-```php
+``` php
$cache = new MyCustomPsr16Implementation();
\PhpOffice\PhpSpreadsheet\Settings::setCache($cache);
@@ -44,7 +44,7 @@ usage of PhpSpreadsheet.
PhpSpreadsheet does not ship with alternative cache implementation. It is up to
you to select the most appropriate implementation for your environment. You
-can either implement [PSR-16](https://www.php-fig.org/psr/psr-16/) from scratch,
+can either implement [PSR-16](http://www.php-fig.org/psr/psr-16/) from scratch,
or use [pre-existing libraries](https://packagist.org/search/?q=psr-16).
One such library is [PHP Cache](https://www.php-cache.com/) which
diff --git a/docs/topics/migration-from-PHPExcel.md b/docs/topics/migration-from-PHPExcel.md
index b8f420f38a..b250790b8a 100644
--- a/docs/topics/migration-from-PHPExcel.md
+++ b/docs/topics/migration-from-PHPExcel.md
@@ -3,51 +3,26 @@
PhpSpreadsheet introduced many breaking changes by introducing
namespaces and renaming some classes. To help you migrate existing
project, a tool was written to replace all references to PHPExcel
-classes to their new names. But there are also manual changes that
+classes to their new names. But they are also manual changes that
need to be done.
## Automated tool
-[RectorPHP](https://github.com/rectorphp/rector) can be used to automatically migrate your codebase.
-Note that this support has been dropped from current releases of rector,
-so you need to require an earlier release to do this.
-Assuming that your files to be migrated live
-in `src/`, you can run the migration like so:
+The tool is included in PhpSpreadsheet. It scans recursively all files
+and directories, starting from the current directory. Assuming it was
+installed with composer, it can be run like so:
-```sh
-composer require rector/rector:0.15.10 rector/rector-phpoffice phpoffice/phpspreadsheet --dev
-
-# this creates rector.php config
-vendor/bin/rector init
-```
-
-Add `PHPOfficeSetList` set to `rector.php`
-
-```php
-declare(strict_types=1);
-
-use Rector\Config\RectorConfig;
-use Rector\PHPOffice\Set\PHPOfficeSetList;
-
-return static function (RectorConfig $rectorConfig): void {
- $rectorConfig->sets([
- PHPOfficeSetList::PHPEXCEL_TO_PHPSPREADSHEET
- ]);
-};
-```
-
-And run Rector on your code:
-
-```sh
-vendor/bin/rector process src
+``` sh
+cd /project/to/migrate/src
+/project/to/migrate/vendor/phpoffice/phpspreadsheet/bin/migrate-from-phpexcel
```
-For more details, see
-[rector-phpoffice](https://github.com/rectorphp/rector-phpoffice).
+**Important** The tool will irreversibly modify your sources, be sure to
+backup everything, and double check the result before committing.
## Manual changes
-RectorPHP should take care of everything, but if somehow it does not work, you can review/apply the following manual changes
+In addition to automated changes, a few things need to be migrated manually.
### Renamed readers and writers
@@ -82,10 +57,12 @@ IOFactory now relies on classes autoloading.
Before:
```php
-// Before
\PHPExcel_IOFactory::addSearchLocation($type, $location, $classname);
+```
-// After
+After:
+
+```php
\PhpOffice\PhpSpreadsheet\IOFactory::registerReader($type, $classname);
```
@@ -224,17 +201,13 @@ $writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
### Rendering charts
-When rendering charts for HTML or PDF outputs, the process was simplified.
-And, while JpGraph support is still available,
-the version distributed via Composer is no longer maintained,
-so you would need to install the current version manually.
-If you rely on this package, please consider
-contributing patches either to JpGraph or another `IRenderer` implementation (a good
-candidate might be [CpChart](https://github.com/szymach/c-pchart)).
+When rendering charts for HTML or PDF outputs, the process was also simplified. And while
+JpGraph support is still available, it is unfortunately not up to date for latest PHP versions
+and it will generate various warnings.
-The package [mitoteam/jpgraph](https://github.com/mitoteam/jpgraph)
-is distributed via Composer, and is fully compatible with Jpgraph.
-We recommend that it be used for rendering.
+If you rely on this feature, please consider
+contributing either patches to JpGraph or another `IRenderer` implementation (a good
+candidate might be [CpChart](https://github.com/szymach/c-pchart)).
Before:
@@ -251,19 +224,19 @@ After:
Require the dependency via composer:
```sh
-composer require mitoteam/jpgraph
+composer require jpgraph/jpgraph
```
And then:
```php
-Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class);
+Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
```
### PclZip and ZipArchive
Support for PclZip were dropped in favor of the more complete and modern
-[PHP extension ZipArchive](https://php.net/manual/en/book.zip.php).
+[PHP extension ZipArchive](http://php.net/manual/en/book.zip.php).
So the following were removed:
- `PclZip`
@@ -275,7 +248,7 @@ So the following were removed:
### Cell caching
Cell caching was heavily refactored to leverage
-[PSR-16](https://www.php-fig.org/psr/psr-16/). That means most classes
+[PSR-16](http://www.php-fig.org/psr/psr-16/). That means most classes
related to that feature were removed:
- `PHPExcel_CachedObjectStorage_APC`
@@ -300,13 +273,13 @@ Refer to [the new documentation](./memory_saving.md) to see how to migrate.
### Dropped conditionally returned cell
-For all the following methods, it is not possible to change the type of
-returned value. They will always return the Worksheet and never the Cell or Rule:
+For all the following methods, it is no more possible to change the type of
+returned value. It always return the Worksheet and never the Cell or Rule:
- Worksheet::setCellValue()
-- Worksheet::setCellValueByColumnAndRow() (*deprecated*)
+- Worksheet::setCellValueByColumnAndRow()
- Worksheet::setCellValueExplicit()
-- Worksheet::setCellValueExplicitByColumnAndRow() (*deprecated*)
+- Worksheet::setCellValueExplicitByColumnAndRow()
- Worksheet::addRule()
Migration would be similar to:
@@ -418,19 +391,19 @@ So the code must be adapted with something like:
// Before
$cell = $worksheet->getCellByColumnAndRow($column, $row);
-for ($column = 0; $column < $max; ++$column) {
- $worksheet->setCellValueByColumnAndRow($column, $row, 'value');
+for ($column = 0; $column < $max; $column++) {
+ $worksheet->setCellValueByColumnAndRow($column, $row, 'value ' . $column);
}
// After
-$cell = $worksheet->getCell([$column + 1, $row]);
+$cell = $worksheet->getCellByColumnAndRow($column + 1, $row);
-for ($column = 1; $column <= $max; ++$column) {
- $worksheet->setCellValue([$column, $row], 'value');
+for ($column = 1; $column <= $max; $column++) {
+ $worksheet->setCellValueByColumnAndRow($column, $row, 'value ' . $column);
}
```
-All the following methods are affected, and all are now deprecated (see example above for how to replace them):
+All the following methods are affected:
- `PHPExcel_Worksheet::cellExistsByColumnAndRow()`
- `PHPExcel_Worksheet::freezePaneByColumnAndRow()`
diff --git a/docs/topics/reading-and-writing-to-file.md b/docs/topics/reading-and-writing-to-file.md
index 8764851b8d..cf58e5494b 100644
--- a/docs/topics/reading-and-writing-to-file.md
+++ b/docs/topics/reading-and-writing-to-file.md
@@ -1,7 +1,8 @@
# Reading and writing to file
As you already know from the [architecture](./architecture.md#readers-and-writers),
-reading and writing to a persisted storage is not possible using the base PhpSpreadsheet classes.
+reading and writing to a
+persisted storage is not possible using the base PhpSpreadsheet classes.
For this purpose, PhpSpreadsheet provides readers and writers, which are
implementations of `\PhpOffice\PhpSpreadsheet\Reader\IReader` and
`\PhpOffice\PhpSpreadsheet\Writer\IWriter`.
@@ -32,7 +33,7 @@ You can create a `\PhpOffice\PhpSpreadsheet\Reader\IReader` instance using
`\PhpOffice\PhpSpreadsheet\IOFactory` in automatic file type resolving
mode using the following code sample:
-```php
+``` php
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load("05featuredemo.xlsx");
```
@@ -44,7 +45,7 @@ If you need to set some properties on the reader, (e.g. to only read
data, see more about this later), then you may instead want to use this
variant:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile("05featuredemo.xlsx");
$reader->setReadDataOnly(true);
$reader->load("05featuredemo.xlsx");
@@ -54,7 +55,7 @@ You can create a `\PhpOffice\PhpSpreadsheet\Reader\IReader` instance using
`\PhpOffice\PhpSpreadsheet\IOFactory` in explicit mode using the following
code sample:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xlsx");
$spreadsheet = $reader->load("05featuredemo.xlsx");
```
@@ -67,7 +68,7 @@ mode.
You can create a `\PhpOffice\PhpSpreadsheet\Writer\IWriter` instance using
`\PhpOffice\PhpSpreadsheet\IOFactory`:
-```php
+``` php
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, "Xlsx");
$writer->save("05featuredemo.xlsx");
```
@@ -83,7 +84,7 @@ outputting the in-memory spreadsheet to a .xlsx file.
You can read an .xlsx file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$spreadsheet = $reader->load("05featuredemo.xlsx");
```
@@ -93,7 +94,7 @@ $spreadsheet = $reader->load("05featuredemo.xlsx");
You can set the option setReadDataOnly on the reader, to instruct the
reader to ignore styling, data validation, … and just read cell data:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load("05featuredemo.xlsx");
@@ -104,7 +105,7 @@ $spreadsheet = $reader->load("05featuredemo.xlsx");
You can set the option setLoadSheetsOnly on the reader, to instruct the
reader to only load the sheets with a given name:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setLoadSheetsOnly(["Sheet 1", "My special sheet"]);
$spreadsheet = $reader->load("05featuredemo.xlsx");
@@ -121,10 +122,10 @@ read using the `\PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter`.
The following code will only read row 1 and rows 20 – 30 of any sheet in
the Excel file:
-```php
+``` php
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
return true;
@@ -138,18 +139,13 @@ $reader->setReadFilter( new MyReadFilter() );
$spreadsheet = $reader->load("06largescale.xlsx");
```
-Read Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.
-
-Methods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.
-
-
### \PhpOffice\PhpSpreadsheet\Writer\Xlsx
#### Writing a spreadsheet
You can write an .xlsx file using the following code:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->save("05featuredemo.xlsx");
```
@@ -160,21 +156,12 @@ By default, this writer pre-calculates all formulas in the spreadsheet.
This can be slow on large spreadsheets, and maybe even unwanted. You can
however disable formula pre-calculation:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->setPreCalculateFormulas(false);
$writer->save("05featuredemo.xlsx");
```
-**Note** Formulas will still be calculated in any column set to be autosized
-even if pre-calculated is set to false
-
-**Note** Prior to release 3.7.0, the use of this feature will cause Excel to be used in a mode where opening a sheet saved in this manner *might* not automatically recalculate a cell's formula when a cell used it the formula changes. Furthermore, that behavior might be applied to all spreadsheets open at the time. To avoid this behavior, add the following statement after `setPreCalculateFormulas` above:
-```php
-$writer->setForceFullCalc(false);
-```
-Starting with Release 4.0.0, the property's default is changed to `false` and that statement is no longer be required. The property can be set to `null` if the old behavior is needed.
-
#### Office 2003 compatibility pack
Because of a bug in the Office2003 compatibility pack, there can be some
@@ -186,32 +173,17 @@ code:
$writer->setOffice2003Compatibility(true);
$writer->save("05featuredemo.xlsx");
-**Office2003 compatibility option should only be used when needed** because
-it disables several Office2007 file format options, resulting in a
-lower-featured Office2007 spreadsheet.
-
-### Form Control Fields
-
-PhpSpreadsheet offers limited support for Forms Controls (buttons,
-checkboxes, etc.). The support is available only for Excel 2007 format,
-and is offered solely to allow loading a spreadsheet with such controls
-and saving it as a new file.
-Support is not available for adding such elements to the spreadsheet,
-nor even to locate them to determine their properties
-(so you can't modify or delete them).
-Modifications to a worksheet with controls are "caveat emptor";
-some modifications will work correctly,
-but others are very likely to cause problems,
-e.g. adding a comment to the worksheet,
-or inserting or deleting rows or columns in a manner that would
-cause the controls to change location.
+**Office2003 compatibility should only be used when needed** Office2003
+compatibility option should only be used when needed. This option
+disables several Office2007 file format options, resulting in a
+lower-featured Office2007 spreadsheet when this option is used.
## Excel 5 (BIFF) file format
Xls file format is the old Excel file format, implemented in
PhpSpreadsheet to provide a uniform manner to create both .xlsx and .xls
files. It is basically a modified version of [PEAR
-Spreadsheet\_Excel\_Writer](https://pear.php.net/package/Spreadsheet_Excel_Writer),
+Spreadsheet\_Excel\_Writer](http://pear.php.net/package/Spreadsheet_Excel_Writer),
although it has been extended and has fewer limitations and more
features than the old PEAR library. This can read all BIFF versions that
use OLE2: BIFF5 (introduced with office 95) through BIFF8, but cannot
@@ -230,7 +202,7 @@ PHP.
You can read an .xls file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
$spreadsheet = $reader->load("05featuredemo.xls");
```
@@ -240,7 +212,7 @@ $spreadsheet = $reader->load("05featuredemo.xls");
You can set the option setReadDataOnly on the reader, to instruct the
reader to ignore styling, data validation, … and just read cell data:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load("05featuredemo.xls");
@@ -251,7 +223,7 @@ $spreadsheet = $reader->load("05featuredemo.xls");
You can set the option setLoadSheetsOnly on the reader, to instruct the
reader to only load the sheets with a given name:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
$reader->setLoadSheetsOnly(["Sheet 1", "My special sheet"]);
$spreadsheet = $reader->load("05featuredemo.xls");
@@ -268,10 +240,10 @@ read using the `\PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter`.
The following code will only read row 1 and rows 20 to 30 of any sheet
in the Excel file:
-```php
+``` php
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
return true;
@@ -291,7 +263,7 @@ $spreadsheet = $reader->load("06largescale.xls");
You can write an .xls file using the following code:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xls($spreadsheet);
$writer->save("05featuredemo.xls");
```
@@ -311,7 +283,7 @@ spreadsheets via PHP.
You can read an Excel 2003 .xml file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xml();
$spreadsheet = $reader->load("05featuredemo.xml");
```
@@ -327,10 +299,10 @@ read using the `\PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter`.
The following code will only read row 1 and rows 20 to 30 of any sheet
in the Excel file:
-```php
+``` php
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
return true;
@@ -362,7 +334,7 @@ regarding to styling cells and handling large spreadsheets via PHP.
You can read an .slk file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Slk();
$spreadsheet = $reader->load("05featuredemo.slk");
```
@@ -378,10 +350,10 @@ read using the `\PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter`.
The following code will only read row 1 and rows 20 to 30 of any sheet
in the SYLK file:
-```php
+``` php
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
return true;
@@ -407,7 +379,7 @@ Open Office or Libre Office Calc files.
You can read an .ods file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Ods();
$spreadsheet = $reader->load("05featuredemo.ods");
```
@@ -423,10 +395,10 @@ read using the `\PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter`.
The following code will only read row 1 and rows 20 to 30 of any sheet
in the Calc file:
-```php
+``` php
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
return true;
@@ -456,22 +428,16 @@ regarding to styling cells, number formatting, ...
You can read a .csv file using the following code:
-```php
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
-$spreadsheet = $reader->load('sample.csv');
-```
-
-You can also treat a string as if it were the contents of a CSV file as follows:
-
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
-$spreadsheet = $reader->loadSpreadsheetFromString($data);
+$spreadsheet = $reader->load("sample.csv");
```
#### Setting CSV options
Often, CSV files are not really "comma separated", or use semicolon (`;`)
-as a separator. You can set some options before reading a CSV
+as a separator. You can instruct
+`\PhpOffice\PhpSpreadsheet\Reader\Csv` some options before reading a CSV
file.
The separator will be auto-detected, so in most cases it should not be necessary
@@ -484,7 +450,7 @@ were created in Microsoft Office Excel the correct input encoding may
rather be Windows-1252 (CP1252). Always make sure that the input
encoding is set appropriately.
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
$reader->setInputEncoding('CP1252');
$reader->setDelimiter(';');
@@ -493,72 +459,13 @@ $reader->setSheetIndex(0);
$spreadsheet = $reader->load("sample.csv");
```
-You may also let PhpSpreadsheet attempt to guess the input encoding.
-It will do so based on a test for BOM (UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
-or UTF-32LE),
-or by doing heuristic tests for those encodings, falling back to a
-specifiable encoding (default is CP1252) if all of those tests fail.
-
-```php
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
-$encoding = \PhpOffice\PhpSpreadsheet\Reader\Csv::guessEncoding('sample.csv');
-// or, e.g. $encoding = \PhpOffice\PhpSpreadsheet\Reader\Csv::guessEncoding(
-// 'sample.csv', 'ISO-8859-2');
-$reader->setInputEncoding($encoding);
-$reader->setDelimiter(';');
-$reader->setEnclosure('');
-$reader->setSheetIndex(0);
-
-$spreadsheet = $reader->load('sample.csv');
-```
-
-You can also set the reader to guess the encoding
-rather than calling guessEncoding directly. In this case,
-the user-settable fallback encoding is used if nothing else works.
-
-```php
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
-$reader->setInputEncoding(\PhpOffice\PhpSpreadsheet\Reader\Csv::GUESS_ENCODING);
-$reader->setFallbackEncoding('ISO-8859-2'); // default CP1252 without this statement
-$reader->setDelimiter(';');
-$reader->setEnclosure('');
-$reader->setSheetIndex(0);
-
-$spreadsheet = $reader->load('sample.csv');
-```
-
-The CSV reader will normally not load null strings into the spreadsheet.
-To load them:
-```php
-$reader->setPreserveNullString(true);
-```
-
-Finally, you can set a callback to be invoked when the constructor is executed,
-either through `new Csv()` or `IOFactory::load`,
-and have that callback set the customizable attributes to whatever
-defaults are appropriate for your environment.
-
-```php
-function constructorCallback(\PhpOffice\PhpSpreadsheet\Reader\Csv $reader): void
-{
- $reader->setInputEncoding(\PhpOffice\PhpSpreadsheet\Reader\Csv::GUESS_ENCODING);
- $reader->setFallbackEncoding('ISO-8859-2');
- $reader->setDelimiter(',');
- $reader->setEnclosure('"');
- // Following represents how Excel behaves better than the default escape character
- $reader->setEscapeCharacter('');
-}
-
-\PhpOffice\PhpSpreadsheet\Reader\Csv::setConstructorCallback('constructorCallback');
-$spreadsheet = \PhpSpreadsheet\IOFactory::load('sample.csv');
-```
#### Read a specific worksheet
CSV files can only contain one worksheet. Therefore, you can specify
which sheet to read from CSV:
-```php
+``` php
$reader->setSheetIndex(0);
```
@@ -569,42 +476,22 @@ data into an existing `Spreadsheet` object. The following code loads a
CSV file into an existing `$spreadsheet` containing some sheets, and
imports onto the 6th sheet:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
$reader->setDelimiter(';');
-$reader->setEnclosure('"');
+$reader->setEnclosure('');
$reader->setSheetIndex(5);
$reader->loadIntoExisting("05featuredemo.csv", $spreadsheet);
```
-#### Line endings
-
-Line endings for Unix (`\n`) and Windows (`\r\n`) are supported.
-
-Support for Mac line endings (`\r`) is deprecated since PHP 8.1,
-and is scheduled to remain deprecated for all later PHP8 releases;
-PhpSpreadsheet will continue to support them for PHP 8.*.
-Support is scheduled to be dropped with PHP 9;
-PhpSpreadsheet will then no longer handle CSV files
-with Mac line endings correctly.
-
-You can suppress testing for Mac line endings as follows:
-```php
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
-$reader->setTestAutoDetect(false);
-```
-Starting with Release 4.0.0, the property defaults to `false`,
-so the statement above is no longer needed. The old behavior
-can be enabled by setting the property to `true`.
-
### \PhpOffice\PhpSpreadsheet\Writer\Csv
#### Writing a CSV file
You can write a .csv file using the following code:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
$writer->save("05featuredemo.csv");
```
@@ -612,38 +499,26 @@ $writer->save("05featuredemo.csv");
#### Setting CSV options
Often, CSV files are not really "comma separated", or use semicolon (`;`)
-as a separator. You can set some options before writing a CSV
+as a separator. You can instruct
+`\PhpOffice\PhpSpreadsheet\Writer\Csv` some options before writing a CSV
file:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
$writer->setDelimiter(';');
-$writer->setEnclosure('"');
+$writer->setEnclosure('');
$writer->setLineEnding("\r\n");
$writer->setSheetIndex(0);
$writer->save("05featuredemo.csv");
```
-#### CSV enclosures
-
-By default, all CSV fields are wrapped in the enclosure character,
-which defaults to double-quote.
-You can change to use the enclosure character only when required:
-
-``` php
-$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
-$writer->setEnclosureRequired(false);
-
-$writer->save("05featuredemo.csv");
-```
-
#### Write a specific worksheet
CSV files can only contain one worksheet. Therefore, you can specify
which sheet to write to CSV:
-```php
+``` php
$writer->setSheetIndex(0);
```
@@ -653,7 +528,7 @@ By default, this writer pre-calculates all formulas in the spreadsheet.
This can be slow on large spreadsheets, and maybe even unwanted. You can
however disable formula pre-calculation:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
$writer->setPreCalculateFormulas(false);
$writer->save("05featuredemo.csv");
@@ -661,41 +536,12 @@ $writer->save("05featuredemo.csv");
#### Writing UTF-8 CSV files
-CSV files are written in UTF-8. If they do not contain characters
-outside the ASCII range, nothing else need be done.
-However, if such characters are in the file,
-or if the file starts with the 2 characters 'ID',
-it should explicitly include a BOM file header;
-if it doesn't, Excel will not interpret those characters correctly.
-This can be enabled by using the following code:
-
-```php
-$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
-$writer->setUseBOM(true);
-$writer->save("05featuredemo.csv");
-```
-
-#### Writing CSV files with desired encoding
-
-It can be set to output with the encoding that can be specified by PHP's mb_convert_encoding.
-This looks like the following code:
-
-```php
-$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
-$writer->setUseBOM(false);
-$writer->setOutputEncoding('SJIS-WIN');
-$writer->save("05featuredemo.csv");
-```
-
-#### Writing CSV files with varying numbers of columns
-
-A CSV file can have a different number of columns in each row. This
-differs from the default behavior when saving as a .csv in Excel, but
-can be enabled in PhpSpreadsheet by using the following code:
+A CSV file can be marked as UTF-8 by writing a BOM file header. This can
+be enabled by using the following code:
``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Csv($spreadsheet);
-$writer->setVariableColumns(true);
+$writer->setUseBOM(true);
$writer->save("05featuredemo.csv");
```
@@ -711,14 +557,14 @@ to set the characters explicitly as shown below.
English users will want to use this before doing the export:
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Shared\StringHelper::setDecimalSeparator('.');
\PhpOffice\PhpSpreadsheet\Shared\StringHelper::setThousandsSeparator(',');
```
German users will want to use the opposite values.
-```php
+``` php
\PhpOffice\PhpSpreadsheet\Shared\StringHelper::setDecimalSeparator(',');
\PhpOffice\PhpSpreadsheet\Shared\StringHelper::setThousandsSeparator('.');
```
@@ -736,7 +582,6 @@ extension.
**HTML limitations** Please note that HTML file format has some limits
regarding to styling cells, number formatting, ...
-Declared charsets compatible with ASCII in range 00-7F, and UTF-8/16 with BOM are supported.
### \PhpOffice\PhpSpreadsheet\Reader\Html
@@ -744,7 +589,7 @@ Declared charsets compatible with ASCII in range 00-7F, and UTF-8/16 with BOM ar
You can read an .html or .htm file using the following code:
-```php
+``` php
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Html();
$spreadsheet = $reader->load("05featuredemo.html");
@@ -762,7 +607,7 @@ first worksheet by default.
You can write a .htm file using the following code:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
$writer->save("05featuredemo.htm");
@@ -773,7 +618,7 @@ $writer->save("05featuredemo.htm");
HTML files can contain one or more worksheets. If you want to write all
sheets into a single HTML file, use the following code:
-```php
+``` php
$writer->writeAllSheets();
```
@@ -782,7 +627,7 @@ $writer->writeAllSheets();
HTML files can contain one or more worksheets. Therefore, you can
specify which sheet to write to HTML:
-```php
+``` php
$writer->setSheetIndex(0);
```
@@ -791,19 +636,19 @@ $writer->setSheetIndex(0);
There might be situations where you want to explicitly set the included
images root. For example, instead of:
- ```html
+ ``` html
```
You might want to see:
-```html
+``` html
```
You can use the following code to achieve this result:
-```php
+``` php
$writer->setImagesRoot('http://www.example.com');
```
@@ -813,7 +658,7 @@ By default, this writer pre-calculates all formulas in the spreadsheet.
This can be slow on large spreadsheets, and maybe even unwanted. You can
however disable formula pre-calculation:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
$writer->setPreCalculateFormulas(false);
@@ -833,44 +678,47 @@ Supported methods:
- `generateStyles()`
- `generateSheetData()`
- `generateHTMLFooter()`
-- `generateHTMLAll()`
Here's an example which retrieves all parts independently and merges
them into a resulting HTML page:
-```php
+``` php
+generateHTMLHeader();
-$sty = $writer->generateStyles(false); // do not write
-$newstyle = <<
-$sty
-body {
- background-color: yellow;
+echo $writer->generateHTMLHeader();
+?>
+
+
+?>
+
+-->
-EOF;
-echo preg_replace('@@', "$newstyle\n", $hdr);
+
+generateSheetData();
echo $writer->generateHTMLFooter();
+?>
```
-#### Editing HTML during save via a callback
+#### Writing UTF-8 HTML files
-You can also add a callback function to edit the generated html
-before saving. For example, you could change the gridlines
-from a thin solid black line:
+A HTML file can be marked as UTF-8 by writing a BOM file header. This
+can be enabled by using the following code:
``` php
-function changeGridlines(string $html): string
-{
- return str_replace('{border: 1px solid black;}',
- '{border: 2px dashed red;}',
- $html);
-}
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
-$writer->setEditHtmlCallback('changeGridlines');
-$writer->save($filename);
+$writer->setUseBOM(true);
+
+$writer->save("05featuredemo.htm");
```
#### Decimal and thousands separators
@@ -895,11 +743,11 @@ of different libraries.
Currently, the following libraries are supported:
-| Library | Downloadable from | PhpSpreadsheet writer |
-|---------|-------------------------------------|-----------------------|
-| TCPDF | https://github.com/tecnickcom/tcpdf | Tcpdf |
-| mPDF | https://github.com/mpdf/mpdf | Mpdf |
-| Dompdf | https://github.com/dompdf/dompdf | Dompdf |
+Library | Downloadable from | PhpSpreadsheet writer
+--------|-------------------------------------|----------------------
+TCPDF | https://github.com/tecnickcom/tcpdf | Tcpdf
+mPDF | https://github.com/mpdf/mpdf | Mpdf
+Dompdf | https://github.com/dompdf/dompdf | Dompdf
The different libraries have different strengths and weaknesses. Some
generate better formatted output than others, some are faster or use
@@ -909,7 +757,7 @@ own circumstances.
You can instantiate a writer with its specific name, like so:
-```php
+``` php
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Mpdf');
```
@@ -917,7 +765,7 @@ Or you can register which writer you are using with a more generic name,
so you don't need to remember which library you chose, only that you want
to write PDF files:
-```php
+``` php
$class = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class;
\PhpOffice\PhpSpreadsheet\IOFactory::registerWriter('Pdf', $class);
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Pdf');
@@ -925,8 +773,8 @@ $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Pdf')
Or you can instantiate directly the writer of your choice like so:
-```php
-$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
+``` php
+$writer = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
```
#### Custom implementation or configuration
@@ -934,7 +782,7 @@ $writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
If you need a custom implementation, or custom configuration, of a supported
PDF library. You can extends the PDF library, and the PDF writer like so:
-```php
+``` php
class My_Custom_TCPDF extends TCPDF
{
// ...
@@ -957,9 +805,10 @@ class My_Custom_TCPDF_Writer extends \PhpOffice\PhpSpreadsheet\Writer\Pdf\Tcpdf
#### Writing a spreadsheet
-Once you have identified the Renderer that you wish to use for PDF generation, you can write a .pdf file using the following code:
+Once you have identified the Renderer that you wish to use for PDF
+generation, you can write a .pdf file using the following code:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
$writer->save("05featuredemo.pdf");
```
@@ -969,9 +818,10 @@ first worksheet by default.
#### Write all worksheets
-PDF files can contain one or more worksheets. If you want to write all sheets into a single PDF file, use the following code:
+PDF files can contain one or more worksheets. If you want to write all
+sheets into a single PDF file, use the following code:
-```php
+``` php
$writer->writeAllSheets();
```
@@ -980,39 +830,23 @@ $writer->writeAllSheets();
PDF files can contain one or more worksheets. Therefore, you can specify
which sheet to write to PDF:
-```php
+``` php
$writer->setSheetIndex(0);
```
-#### Setting Orientation and PaperSize
-
-PhpSpreadsheet will attempt to honor the orientation and paper size specified
-in the worksheet for each page it prints, if the renderer supports that. However, you can set all pages
-to have the same orientation and paper size, e.g.
-
-```php
-$writer->setOrientation(\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
-```
-
#### Formula pre-calculation
By default, this writer pre-calculates all formulas in the spreadsheet.
This can be slow on large spreadsheets, and maybe even unwanted. You can
however disable formula pre-calculation:
-```php
+``` php
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
$writer->setPreCalculateFormulas(false);
$writer->save("05featuredemo.pdf");
```
-#### Editing Pdf during save via a callback
-
-You can also add a callback function to edit the html used to
-generate the Pdf before saving.
-[See under Html](#editing-html-during-save-via-a-callback).
-
#### Decimal and thousands separators
See section `\PhpOffice\PhpSpreadsheet\Writer\Csv` how to control the
@@ -1028,7 +862,7 @@ page setup properties, headers etc.
Here is an example how to open a template file, fill in a couple of
fields and save it again:
-```php
+``` php
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('template.xlsx');
$worksheet = $spreadsheet->getActiveSheet();
@@ -1041,172 +875,3 @@ $writer->save('write.xls');
```
Notice that it is ok to load an xlsx file and generate an xls file.
-
-## Generating Excel files from HTML content
-
-If you are generating an Excel file from pre-rendered HTML content you can do so
-automatically using the HTML Reader. This is most useful when you are generating
-Excel files from web application content that would be downloaded/sent to a user.
-
-For example:
-
-```php
-$htmlString = '
-
-
Hello World
-
-
-
Hello World
-
-
-
Hello World
-
-
';
-
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Html();
-$spreadsheet = $reader->loadFromString($htmlString);
-
-$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xls');
-$writer->save('write.xls');
-```
-
-Suppose you have multiple worksheets you'd like created from html. This can be
-accomplished as follows.
-
-```php
-$firstHtmlString = '
-
-
Hello World
-
-
';
-$secondHtmlString = '
-
-
Hello World
-
-
';
-
-$reader = new \PhpOffice\PhpSpreadsheet\Reader\Html();
-$spreadsheet = $reader->loadFromString($firstHtmlString);
-$reader->setSheetIndex(1);
-$spreadhseet = $reader->loadFromString($secondHtmlString, $spreadsheet);
-
-$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xls');
-$writer->save('write.xls');
-```
-
-## Reader/Writer Flags
-
-Some Readers and Writers support special "Feature Flags" that need to be explicitly enabled.
-An example of this is Charts in a spreadsheet. By default, when you load a spreadsheet that contains Charts, the charts will not be loaded. If all you want to do is read the data in the spreadsheet, then loading charts is an overhead for both speed of loading and memory usage.
-However, there are times when you may want to load any charts in the spreadsheet as well as the data. To do so, you need to tell the Reader explicitly to include Charts.
-
-```php
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile("05featuredemo.xlsx");
-$reader->setIncludeCharts(true);
-$reader->load("spreadsheetWithCharts.xlsx");
-```
-Alternatively, you can specify this in the call to load the spreadsheet:
-```php
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile("spreadsheetWithCharts.xlsx");
-$reader->load("spreadsheetWithCharts.xlsx", $reader::LOAD_WITH_CHARTS);
-```
-
-If you wish to use the IOFactory `load()` method rather than instantiating a specific Reader, then you can still pass these flags.
-
-```php
-$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load("spreadsheetWithCharts.xlsx", \PhpOffice\PhpSpreadsheet\Reader\IReader::LOAD_WITH_CHARTS);
-```
-
-Flags that are available that can be passed to the Reader in this way include:
-
- - $reader::LOAD_WITH_CHARTS
- - $reader::READ_DATA_ONLY
- - $reader::IGNORE_EMPTY_CELLS
- - $reader::IGNORE_ROWS_WITH_NO_CELLS
-
-| Readers | LOAD_WITH_CHARTS | READ_DATA_ONLY | IGNORE_EMPTY_CELLS | IGNORE_ROWS_WITH_NO_CELLS |
-|----------|------------------|----------------|--------------------|---------------------------|
-| Xlsx | YES | YES | YES | YES |
-| Xls | NO | YES | YES | NO |
-| Xml | NO | NO | NO | NO |
-| Ods | NO | YES | NO | NO |
-| Gnumeric | NO | YES | NO | NO |
-| Html | N/A | N/A | N/A | N/A |
-| Slk | N/A | NO | NO | NO |
-| Csv | N/A | NO | NO | NO |
-
-Likewise, when saving a file using a Writer, loaded charts will not be saved unless you explicitly tell the Writer to include them:
-
-```php
-$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
-$writer->setIncludeCharts(true);
-$writer->save('mySavedFileWithCharts.xlsx');
-```
-
-As with the `load()` method, you can also pass flags in the `save()` method:
-```php
-$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
-$writer->save('mySavedFileWithCharts.xlsx', \PhpOffice\PhpSpreadsheet\Writer\IWriter::SAVE_WITH_CHARTS);
-```
-
-Flags that are available that can be passed to the Reader in this way include:
-
-- $reader::SAVE_WITH_CHARTS
-- $reader::DISABLE_PRECALCULATE_FORMULAE
-
-| Writers | SAVE_WITH_CHARTS | DISABLE_PRECALCULATE_FORMULAE |
-|---------|------------------|-------------------------------|
-| Xlsx | YES | YES |
-| Xls | NO | NO |
-| Ods | NO | YES |
-| Html | YES | YES |
-| Pdf | YES | YES |
-| Csv | N/A | YES |
-
-### Combining Flags
-
-One benefit of flags is that you can pass several flags in a single method call.
-Two or more flags can be passed together using PHP's `|` operator.
-
-```php
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile('myExampleFile.xlsx');
-$reader->load(
- 'spreadsheetWithCharts.xlsx',
- $reader::READ_DATA_ONLY | $reader::IGNORE_EMPTY_CELLS
-);
-```
-
-## Writing Data as a Plaintext Grid
-
-Although not really a spreadsheet format, it can be useful to write data in grid format to a plaintext file.
-Code like the following can be used:
-```php
- $array = $sheet->toArray(null, true, true, true);
- $textGrid = new \PhpOffice\PhpSpreadsheet\Shared\TextGrid(
- $array,
- true, // true for cli, false for html
- // Starting with release 4.2,
- // the output format can be tweaked by uncommenting
- // any of the following 3 optional parameters.
- // rowDividers: true,
- // rowHeaders: false,
- // columnHeaders: false,
- );
- $result = $textGrid->render();
-```
-You can then echo `$result` to a terminal, or write it to a file with `file_put_contents`. The result will resemble:
-```
- +-----+------------------+---+----------+
- | A | B | C | D |
-+---+-----+------------------+---+----------+
-| 1 | 6 | 1900-01-06 00:00 | | 0.572917 |
-| 2 | 6 | TRUE | | 1<>2 |
-| 3 | xyz | xyz | | |
-+---+-----+------------------+---+----------+
-```
-Please note that this may produce sub-optimal results for situations such as:
-
-- use of accents as combining characters rather than using pre-composed characters (may be handled by extending the class to override the `getString` or `strlen` methods)
-- Fullwidth characters
-- right-to-left characters (better display in a browser than a terminal on a non-RTL system)
-- multi-line strings
diff --git a/docs/topics/reading-files.md b/docs/topics/reading-files.md
index a7c26f08aa..779082dc85 100644
--- a/docs/topics/reading-files.md
+++ b/docs/topics/reading-files.md
@@ -22,7 +22,7 @@ The simplest way to load a workbook file is to let PhpSpreadsheet's IO
Factory identify the file type and load it, calling the static `load()`
method of the `\PhpOffice\PhpSpreadsheet\IOFactory` class.
-```php
+``` php
$inputFileName = './sampleData/example1.xls';
/** Load $inputFileName to a Spreadsheet Object **/
@@ -44,22 +44,6 @@ practise), it will reject the Xls loader that it would normally use for
a .xls file; and test the file using the other loaders until it finds
the appropriate loader, and then use that to read the file.
-If you know that this is an `xls` file, but don't know whether it is a
-genuine BIFF-format Excel or Html markup with an xls extension, you can
-limit the loader to check only those two possibilities by passing in an
-array of Readers to test against.
-
-```php
-$inputFileName = './sampleData/example1.xls';
-$testAgainstFormats = [
- \PhpOffice\PhpSpreadsheet\IOFactory::READER_XLS,
- \PhpOffice\PhpSpreadsheet\IOFactory::READER_HTML,
-];
-
-/** Load $inputFileName to a Spreadsheet Object **/
-$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName, 0, $testAgainstFormats);
-```
-
While easy to implement in your code, and you don't need to worry about
the file type; this isn't the most efficient method to load a file; and
it lacks the flexibility to configure the loader in any way before
@@ -75,7 +59,7 @@ supported filetype by name. However, you may get unpredictable results
if the file isn't of the right type (e.g. it is a CSV with an extension
of .xls), although this type of exception should normally be trapped.
-```php
+``` php
$inputFileName = './sampleData/example1.xls';
/** Create a new Xls Reader **/
@@ -97,7 +81,7 @@ Alternatively, you can use the IO Factory's `createReader()` method to
instantiate the reader object for you, simply telling it the file type
of the reader that you want instantiating.
-```php
+``` php
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Xml';
@@ -120,13 +104,10 @@ If you're uncertain of the filetype, you can use the `IOFactory::identify()`
method to identify the reader that you need, before using the
`createReader()` method to instantiate the reader object.
-```php
+``` php
$inputFileName = './sampleData/example1.xls';
-/**
- * Identify the type of $inputFileName.
- * See below for a possible improvement for release 4.1.0+.
- */
+/** Identify the type of $inputFileName **/
$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName);
/** Create a new Reader of the type that has been identified **/
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
@@ -137,128 +118,12 @@ $spreadsheet = $reader->load($inputFileName);
See `samples/Reader/04_Simple_file_reader_using_the_IOFactory_to_identify_a_reader_to_use.php`
for a working example of this code.
-Prior to release 4.1.0, `identify` returns a file type.
-It may be more useful to return a fully-qualified class name,
-which can be accomplished using a parameter introduced in 4.1.0:
-```php
-$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName, null, true);
-```
-
-As with the IOFactory `load()` method, you can also pass an array of formats
-for the `identify()` method to check against if you know that it will only
-be in a subset of the possible formats that PhpSpreadsheet supports.
-
-```php
-$inputFileName = './sampleData/example1.xls';
-$testAgainstFormats = [
- \PhpOffice\PhpSpreadsheet\IOFactory::READER_XLS,
- \PhpOffice\PhpSpreadsheet\IOFactory::READER_HTML,
-];
-
-/** Identify the type of $inputFileName **/
-$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName, $testAgainstFormats);
-```
-
-You can also use this to confirm that a file is what it claims to be:
-
-```php
-$inputFileName = './sampleData/example1.xls';
-
-try {
- /** Verify that $inputFileName really is an Xls file **/
- $inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName, [\PhpOffice\PhpSpreadsheet\IOFactory::READER_XLS]);
-} catch (\PhpOffice\PhpSpreadsheet\Reader\Exception $e) {
- // File isn't actually an Xls file, even though it has an xls extension
-}
-```
-
## Spreadsheet Reader Options
Once you have created a reader object for the workbook that you want to
load, you have the opportunity to set additional options before
executing the `load()` method.
-All of these options can be set by calling the appropriate methods against the Reader (as described below), but some options (those with only two possible values) can also be set through flags, either by calling the Reader's `setFlags()` method, or passing the flags as an argument in the call to `load()`.
-Those options that can be set through flags are:
-
-Option | Flag | Default
--------------------|-------------------------------------|------------------------
-Empty Cells | IReader::IGNORE_EMPTY_CELLS | Load empty cells
-Rows with no Cells | IReader::IGNORE_ROWS_WITH_NO_CELLS | Load rows with no cells
-Data Only | IReader::READ_DATA_ONLY | Read data, structure and style
-Charts | IReader::LOAD_WITH_CHARTS | Don't read charts
-
-Several flags can be combined in a single call:
-```php
-$inputFileType = 'Xlsx';
-$inputFileName = './sampleData/example1.xlsx';
-
-/** Create a new Reader of the type defined in $inputFileType **/
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
-/** Set additional flags before the call to load() */
-$reader->setFlags(IReader::IGNORE_EMPTY_CELLS | IReader::LOAD_WITH_CHARTS);
-$reader->load($inputFileName);
-```
-or
-```php
-$inputFileType = 'Xlsx';
-$inputFileName = './sampleData/example1.xlsx';
-
-/** Create a new Reader of the type defined in $inputFileType **/
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
-/** Set additional flags in the call to load() */
-$reader->load($inputFileName, IReader::IGNORE_EMPTY_CELLS | IReader::LOAD_WITH_CHARTS);
-```
-
-### Ignoring Empty Cells
-
-Many Excel files have empty rows or columns at the end of a worksheet, which can't easily be seen when looking at the file in Excel (Try using Ctrl-End to see the last cell in a worksheet).
-By default, PhpSpreadsheet will load these cells, because they are valid Excel values; but you may find that an apparently small spreadsheet requires a lot of memory for all those empty cells.
-If you are running into memory issues with seemingly small files, you can tell PhpSpreadsheet not to load those empty cells using the `setReadEmptyCells()` method.
-
-```php
-$inputFileType = 'Xls';
-$inputFileName = './sampleData/example1.xls';
-
-/** Create a new Reader of the type defined in $inputFileType **/
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
-/** Advise the Reader that we only want to load cell's that contain actual content **/
-$reader->setReadEmptyCells(false);
-/** Load $inputFileName to a Spreadsheet Object **/
-$spreadsheet = $reader->load($inputFileName);
-```
-
-Note that cells containing formulae will still be loaded, even if that formula evaluates to a NULL or an empty string.
-Similarly, Conditional Styling might also hide the value of a cell; but cells that contain Conditional Styling or Data Validation will always be loaded regardless of their value.
-
-This option is available for the following formats:
-
-Reader | Y/N |Reader | Y/N |Reader | Y/N |
-----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | YES | Xls | YES | Xml | NO |
-Ods | NO | SYLK | NO | Gnumeric | NO |
-CSV | NO | HTML | NO
-
-This option is also available through flags.
-
-### Ignoring Rows With No Cells
-
-Similar to the previous item, you can choose to ignore rows which contain no cells.
-This can also help with memory issues.
-```php
-$inputFileType = 'Xlsx';
-$inputFileName = './sampleData/example1.xlsx';
-
-/** Create a new Reader of the type defined in $inputFileType **/
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
-/** Advise the Reader that we do not want rows with no cells **/
-$reader->setIgnoreRowsWithNoCells(true);
-/** Load $inputFileName to a Spreadsheet Object **/
-$spreadsheet = $reader->load($inputFileName);
-```
-
-This option is available only for Xlsx. It is also available through flags.
-
### Reading Only Data from a Spreadsheet File
If you're only interested in the cell values in a workbook, but don't
@@ -266,7 +131,7 @@ need any of the cell formatting information, then you can set the reader
to read only the data values and any formulae from each cell using the
`setReadDataOnly()` method.
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';
@@ -281,7 +146,7 @@ $spreadsheet = $reader->load($inputFileName);
See `samples/Reader/05_Simple_file_reader_using_the_read_data_only_option.php`
for a working example of this code.
-It is important to note that most Workbooks (and PhpSpreadsheet) store dates
+It is important to note that Workbooks (and PhpSpreadsheet) store dates
and times as simple numeric values: they can only be distinguished from
other numeric values by the format mask that is applied to that cell.
When setting read data only to true, PhpSpreadsheet doesn't read the
@@ -297,12 +162,10 @@ Reading Only Data from a Spreadsheet File applies to Readers:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | YES | Xls | YES | Xml | YES |
-Ods | YES | SYLK | NO | Gnumeric | YES |
+Xlsx | YES | Xls | YES | Xml | YES |
+Ods | YES | SYLK | NO | Gnumeric | YES |
CSV | NO | HTML | NO
-This option is also available through flags.
-
### Reading Only Named WorkSheets from a File
If your workbook contains a number of worksheets, but you are only
@@ -313,7 +176,7 @@ in reading.
To read a single sheet, you can pass that sheet name as a parameter to
the `setLoadSheetsOnly()` method.
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #2';
@@ -332,7 +195,7 @@ for a working example of this code.
If you want to read more than just a single sheet, you can pass a list
of sheet names as an array parameter to the `setLoadSheetsOnly()` method.
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';
$sheetnames = ['Data Sheet #1','Data Sheet #3'];
@@ -351,7 +214,7 @@ for a working example of this code.
To reset this option to the default, you can call the `setLoadAllSheets()`
method.
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';
@@ -370,8 +233,8 @@ Reading Only Named WorkSheets from a File applies to Readers:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | YES | Xls | YES | Xml | YES |
-Ods | YES | SYLK | NO | Gnumeric | YES |
+Xlsx | YES | Xls | YES | Xml | YES |
+Ods | YES | SYLK | NO | Gnumeric | YES |
CSV | NO | HTML | NO
### Reading Only Specific Columns and Rows from a File (Read Filters)
@@ -385,7 +248,7 @@ should be read by the loader. A read filter must implement the
whether a workbook cell identified by those arguments should be read or
not.
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #3';
@@ -393,10 +256,10 @@ $sheetname = 'Data Sheet #3';
/** Define a Read Filter class implementing \PhpOffice\PhpSpreadsheet\Reader\IReadFilter */
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
{
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Read rows 1 to 7 and columns A to E only
if ($row >= 1 && $row <= 7) {
- if (in_array($columnAddress,range('A','E'))) {
+ if (in_array($column,range('A','E'))) {
return true;
}
}
@@ -423,7 +286,7 @@ a very specific circumstance (when you only want cells in the range
A1:E7 from your worksheet. A generic Read Filter would probably be more
useful:
-```php
+``` php
/** Define a Read Filter class implementing \PhpOffice\PhpSpreadsheet\Reader\IReadFilter */
class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
{
@@ -438,10 +301,10 @@ class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
$this->columns = $columns;
}
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Only read the rows and columns that were configured
if ($row >= $this->startRow && $row <= $this->endRow) {
- if (in_array($columnAddress,$this->columns)) {
+ if (in_array($column,$this->columns)) {
return true;
}
}
@@ -461,11 +324,7 @@ to read and process a large workbook in "chunks": an example of this
usage might be when transferring data from an Excel worksheet to a
database.
-Read Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.
-
-Methods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.
-
-```php
+``` php
$inputFileType = 'Xls';
$inputFileName = './sampleData/example2.xls';
@@ -481,7 +340,7 @@ class ChunkReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
$this->endRow = $startRow + $chunkSize;
}
- public function readCell($columnAddress, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '') {
// Only read the heading row, and the configured rows
if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {
return true;
@@ -518,7 +377,7 @@ Using Read Filters applies to:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | YES | Xls | YES | Xml | YES |
+Xlsx | YES | Xls | YES | Xml | YES |
Ods | YES | SYLK | NO | Gnumeric | YES |
CSV | YES | HTML | NO | | |
@@ -534,7 +393,7 @@ the `setSheetIndex()` method of the `$reader`, then use the
`loadIntoExisting()` method rather than the `load()` method to actually read
the file into that worksheet.
-```php
+``` php
$inputFileType = 'Csv';
$inputFileNames = [
'./sampleData/example1.csv',
@@ -576,7 +435,7 @@ Combining Multiple Files into a Single Spreadsheet Object applies to:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | NO | Xls | NO | Xml | NO |
+Xlsx | NO | Xls | NO | Xml | NO |
Ods | NO | SYLK | YES | Gnumeric | NO |
CSV | YES | HTML | NO
@@ -593,7 +452,7 @@ Class that we defined in [the above section](#reading-only-specific-columns-and-
and the `setSheetIndex()` method of the `$reader`, we can split the CSV
file across several individual worksheets.
-```php
+``` php
$inputFileType = 'Csv';
$inputFileName = './sampleData/example2.csv';
@@ -653,7 +512,7 @@ Splitting a single loaded file across multiple worksheets applies to:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | NO | Xls | NO | Xml | NO |
+Xlsx | NO | Xls | NO | Xml | NO |
Ods | NO | SYLK | NO | Gnumeric | NO |
CSV | YES | HTML | NO
@@ -664,7 +523,7 @@ cannot auto-detect, it will default to the comma. If this does not fit your
use-case, you can manually specify a separator by using the `setDelimiter()`
method.
-```php
+``` php
$inputFileType = 'Csv';
$inputFileName = './sampleData/example1.tsv';
@@ -693,49 +552,11 @@ Setting CSV delimiter applies to:
Reader | Y/N |Reader | Y/N |Reader | Y/N |
----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | NO | Xls | NO | Xml | NO |
-Ods | NO | SYLK | NO | Gnumeric | NO |
-CSV | YES | HTML | NO
-
-
-### Reading formatted Numbers from a CSV File
-
-Unfortunately, numbers in a CSV file may be formatted as strings.
-If that number is a simple integer or float (with a decimal `.` separator) without any thousands separator, then it will be treated as a number.
-However, if the value has a thousands separator (e.g. `12,345`), or a decimal separator that isn't a `.` (e.g. `123,45` for a European locale), then it will be loaded as a string with that formatting.
-If you want the Csv Reader to convert that value to a numeric when it loads the file, the you need to tell it to do so. The `castFormattedNumberToNumeric()` lets you do this.
-
-(Assuming that our server is configured with German locale settings: otherwise it may be necessary to call `setlocale()` before loading the file.)
-```php
-$inputFileType = 'Csv';
-$inputFileName = './sampleData/example1.de.csv';
-
-/** It may be necessary to call setlocale() first if this is not your default locale */
-// setlocale(LC_ALL, 'de_DE.UTF-8', 'deu_deu');
-
-/** Create a new Reader of the type defined in $inputFileType **/
-$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
-/** Enable loading numeric values formatted with German , decimal separator and . thousands separator **/
-$reader->castFormattedNumberToNumeric(true);
-
-/** Load the file to a Spreadsheet Object **/
-$spreadsheet = $reader->load($inputFileName);
-```
-This will attempt to load those formatted numeric values as numbers, based on the server's locale settings.
-
-If you want to load those values as numbers, but also to retain the formatting as a number format mask, then you can pass a boolean `true` as a second argument to the `castFormattedNumberToNumeric()` method to tell the Reader to identify the format masking to use for that value. This option does have an arbitrary limit of 6 decimal places.
-
-If your Csv file includes other formats for numbers (currencies, scientific format, etc); then you should probably also use the Advanced Value Binder to handle these cases.
-
-Applies to:
-
-Reader | Y/N |Reader | Y/N |Reader | Y/N |
-----------|:---:|--------|:---:|--------------|:---:|
-Xlsx | NO | Xls | NO | Xml | NO |
+Xlsx | NO | Xls | NO | Xml | NO |
Ods | NO | SYLK | NO | Gnumeric | NO |
CSV | YES | HTML | NO
-## A Brief Word about the Advanced Value Binder
+### A Brief Word about the Advanced Value Binder
When loading data from a file that contains no formatting information,
such as a CSV file, then data is read either as strings or numbers
@@ -764,19 +585,15 @@ it encountered a hyperlink, or HTML markup within a CSV file.
So using a Value Binder allows a great deal more flexibility in the
loader logic when reading unformatted text files.
-```php
+``` php
+/** Tell PhpSpreadsheet that we want to use the Advanced Value Binder **/
+\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
+
$inputFileType = 'Csv';
$inputFileName = './sampleData/example1.tsv';
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
$reader->setDelimiter("\t");
-
-/** Tell PhpSpreadsheet that we want to use the Advanced Value Binder **/
-// Old method using static property
-\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
-// Preferred method using dynamic property since 3.4.0
-$reader::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
-
$spreadsheet = $reader->load($inputFileName);
```
@@ -787,13 +604,10 @@ Loading using a Value Binder applies to:
Reader | Y/N |Reader | Y/N |Reader | Y/N
----------|:---:|--------|:---:|--------------|:---:
-Xlsx | NO | Xls | NO | Xml | NO
-Ods | NO | SYLK | YES | Gnumeric | NO
+Xlsx | NO | Xls | NO | Xml | NO
+Ods | NO | SYLK | NO | Gnumeric | NO
CSV | YES | HTML | YES
-Note that you can also use the Binder to determine how PhpSpreadsheet identified datatypes for values when you set a cell value without explicitly setting a datatype.
-Value Binders can also be used to set formatting for a cell appropriate to the value.
-
## Error Handling
Of course, you should always apply some error handling to your scripts
@@ -805,7 +619,7 @@ manner.
The PhpSpreadsheet Readers throw a
`\PhpOffice\PhpSpreadsheet\Reader\Exception`.
-```php
+``` php
$inputFileName = './sampleData/example-1.xls';
try {
@@ -832,7 +646,7 @@ whole file.
The `listWorksheetNames()` method returns a simple array listing each
worksheet name within the workbook:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
$worksheetNames = $reader->listWorksheetNames($inputFileName);
@@ -851,9 +665,9 @@ for a working example of this code.
### listWorksheetInfo
The `listWorksheetInfo()` method returns a nested array, with each entry
-listing the name, dimensions and state for a worksheet:
+listing the name and dimensions for a worksheet:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
$worksheetData = $reader->listWorksheetInfo($inputFileName);
@@ -865,8 +679,7 @@ foreach ($worksheetData as $worksheet) {
echo 'Rows: ', $worksheet['totalRows'],
' Columns: ', $worksheet['totalColumns'], ' ';
echo 'Cell Range: A1:',
- $worksheet['lastColumnLetter'], $worksheet['totalRows'], ' ';
- echo 'Sheet state: ', $worksheet['sheetState'];
+ $worksheet['lastColumnLetter'], $worksheet['totalRows'];
echo '';
}
echo '';
diff --git a/docs/topics/recipes.md b/docs/topics/recipes.md
index 2398b12731..0b40cf34c7 100644
--- a/docs/topics/recipes.md
+++ b/docs/topics/recipes.md
@@ -3,14 +3,12 @@
The following pages offer you some widely-used PhpSpreadsheet recipes.
Please note that these do NOT offer complete documentation on specific
PhpSpreadsheet API functions, but just a bump to get you started. If you
-need specific API functions, please refer to the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).
+need specific API functions, please refer to the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master).
For example, [setting a worksheet's page orientation and size
](#setting-a-worksheets-page-orientation-and-size) covers setting a page
orientation to A4. Other paper formats, like US Letter, are not covered
-in this document, but in the PhpSpreadsheet [API documentation](https://phpoffice.github.io/PhpSpreadsheet).
-
-My apologies if this documentation seems very basic to some of you; but I spend so much time having to provide help lessons in PHP 101 and Excel 101 that I feel I need to provide this level of very simple detail.
+in this document, but in the PhpSpreadsheet [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master).
## Setting a spreadsheet's metadata
@@ -20,42 +18,12 @@ finding a specific document in a file repository or a document
management system. For example Microsoft Sharepoint uses document
metadata to search for a specific document in its document lists.
-
- Click here for details of Spreadsheet Document Properties
-
-These are accessed in MS Excel from the "Info" option on the "File" menu:
-
-
-Some of these properties can be edited "in situ" in the Properties Block:
-
-
-For more advanced properties, click on the "Properties" dropdown:
-
-
-And you will be able to add/edit/delete a lot of different property values.
-
-
-Properties on the "General", "Statistics" and "Contents" tabs are informational, and cannot be user-defined in Excel itself.
-Properties on the "Summary" tab are all string values.
-
-The "Custom" tab allows you to define your own properties. More information from the Microsoft Documentation can be found [here](https://support.microsoft.com/en-us/office/view-or-change-the-properties-for-an-office-file-21d604c2-481e-4379-8e54-1dd4622c6b75).
-
-
-You can select a property name from the dropdown, or type a new name of your choice; select a Type; enter a value; and then click on "Add".
-The new property will then be created and displayed in the list at the bottom of the form.
+Setting spreadsheet metadata is done as follows:
-While "Text", "Number" (can be an integer or a floating point value) and "Yes or No" types are straightforward to add a value, "Date" types are more difficult, and Microsoft provide very little help.
-However, you need to enter the date in the format that matches your locale, so an American would enter "7/4/2023 for the 4th of July; but in the UK I would enter "4/7/2023" for the same date.
-Although typically recognised as a date elsewhere in MS Excel, the almost universally recognised `2022-12-31` date format is not recognised as valid here.
-
-
-
-Setting spreadsheet metadata in PhpSpreadsheet is done as follows:
-
-```php
+``` php
$spreadsheet->getProperties()
->setCreator("Maarten Balliauw")
- ->setLastModifiedBy("Mark Baker")
+ ->setLastModifiedBy("Maarten Balliauw")
->setTitle("Office 2007 XLSX Test Document")
->setSubject("Office 2007 XLSX Test Document")
->setDescription(
@@ -65,154 +33,23 @@ $spreadsheet->getProperties()
->setCategory("Test result file");
```
-You can choose which properties to set or ignore.
-
-
- Click here for details of Property Getters/Setters
-
-PhpSpreadsheet provides specific getters/setters for a number of pre-defined properties.
-
-| Property Name | DataType | Getter/Setter | Notes |
-|------------------|-------------------------|----------------------------------------------|-----------------------------------------------------------|
-| Creator | string | getCreator() setCreator() | |
-| Last Modified By | string | getLastModifiedBy() setLastModifiedBy() | |
-| Created | float/int timestamp | getCreated() setCreated() | Cannot be modified in MS Excel; but is automatically set. |
-| Modified | float/int timestamp | getModified() setModified() | Cannot be modified in MS Excel; but is automatically set. |
-| Title | string | getTitle() setTitle() | |
-| Description | string | getDescription() setDescription() | |
-| Subject | string | getSubject() setSubject() | |
-| Keywords | string | getKeywords() setKeywords() | |
-| Category | string | getCategory() setCategory() | Not supported in xls files. |
-| Company | string | getCompany() setCompany() | Not supported in xls files. |
-| Manager | string | getManager() setManager() | Not supported in xls files. |
-> **Note:** Not all Spreadsheet File Formats support all of these properties.
-> For example: "Category", "Company" and "Manager" are not supported in `xls` files.
-
-
-
-
- Click here for details of Custom Properties
-
-Additionally, PhpSpreadsheet supports the creation and reading of custom properties for those file formats that accept custom properties.
-The following methods of the Properties class can be used when working with custom properties.
- - `getCustomProperties()`
- Will return an array listing the names of all custom properties that are defined.
- - `isCustomPropertySet(string $propertyName)`
- Will return a boolean indicating if the named custom property is defined.
- - `getCustomPropertyValue(string $propertyName)`
- Will return the "raw" value of the named custom property; or null if the property doesn't exist.
- - `getCustomPropertyType(string $propertyName)`
- Will return the datatype of the named custom property; or null if the property doesn't exist.
- - `setCustomProperty(string $propertyName, $propertyValue = '', $propertyType = null)`
- Will let you set (or modify) a custom property. If you don't provide a datatype, then PhpSpreadsheet will attempt to identify the datatype from the value that you set.
-
-The recognised Property Types are:
-
-| Constant | Datatype | Value |
-|-----------------------------------|----------|-------|
-| Properties::PROPERTY_TYPE_BOOLEAN | boolean | b |
-| Properties::PROPERTY_TYPE_INTEGER | integer | i |
-| Properties::PROPERTY_TYPE_FLOAT | float | f |
-| Properties::PROPERTY_TYPE_DATE | date | d |
-| Properties::PROPERTY_TYPE_STRING | string | s |
-
-When reading property types, you might also encounter:
-
-| Datatype | Value |
-|----------|--------------|
-| null | null value |
-| empty | empty string |
-| u | unknown |
-
-Other more complex types, such as pointers and filetime, are not supported by PhpSpreadsheet; and are discarded when reading a file.
-
-
-
-```php
-$spreadsheet->getProperties()
- ->setCustomProperty('Editor', 'Mark Baker')
- ->setCustomProperty('Version', 1.17)
- ->setCustomProperty('Tested', true)
- ->setCustomProperty('Test Date', '2021-03-17', Properties::PROPERTY_TYPE_DATE);
-```
-> **Warning:** If the datatype for a date is not explicitly used, then it will be treated as a string.
-
-> **Note:** Although MS Excel doesn't recognise `2022-12-31` as valid date format when entering Custom Date Properties, PhpSpreadsheet will accept it.
-
## Setting a spreadsheet's active sheet
-A Spreadsheet consists of (very rarely) none, one or more Worksheets. If you have 1 or more Worksheets, then one (and only one) of those Worksheets can be "Active" (viewed or updated) at a time, but there will always be an "Active" Worksheet (unless you explicitly delete all of the Worksheets in the Spreadsheet).
-
-
- Click here for details about Worksheets
-
-When you create a new Spreadsheet in MS Excel, it creates the Spreadsheet with a single Worksheet ("Sheet1")
-
-
-
-and that is the "Active" Worksheet.
-
-
+The following line of code sets the active sheet index to the first
+sheet:
-This is the same as
-```php
-$spreadsheet = new Spreadsheet();
-$activeWorksheet = $spreadsheet->getActiveSheet();
-```
-in PhpSpreadsheet.
-
-And you can then write values to Cells in `$activeWorksheet` (`Sheet1`).
-
-To create a new Worksheet in MS Excel, you click on the "+" button in the Worksheet Tab Bar. MS Excel will then create a new Worksheet ("Sheet2") in the Spreadsheet, and make that the current "Active" Worksheet.
-
-
-
-Excel always shows the "Active" Worksheet in the Grid, and you can see which Worksheet is "Active" because it is highlighted in the Worksheet Tab Bar at the bottom of the Worksheet Grid.
-
-This is the same as
-```php
-$activeWorksheet = $spreadsheet->createSheet();
+``` php
+$spreadsheet->setActiveSheetIndex(0);
```
-in PhpSpreadsheet.
-
-And you can then write values to Cells in `$activeWorksheet` (`Sheet2`).
-
-
-To switch between Worksheets in MS Excel, you click on the Tab for the Worksheet that you want to be "Active" in the Worksheet Tab Bar. Excel will then set that as the "Active" Worksheet.
-
-
-
-In PhpSpreadsheet, you do this by calling the Spreadsheet's `setActiveSheetIndex()` methods.
-Either:
-
-```php
-$activeWorksheet = $spreadsheet->setActiveSheetIndexByName('Sheet1')
-```
-using the name/title of the Worksheet that you want as the "Active" Worksheet.
+You can also set the active sheet by its name/title
-Or:
-```php
-$activeWorksheet = $spreadsheet->setActiveSheetIndex(0);
+``` php
+$spreadsheet->setActiveSheetIndexByName('DataSheet')
```
-Where you set the "Active" Worksheet by its position in the Worksheet Tab Bar, with 0 as the first Worksheet, 1 as the second, etc.
-
-And you can then write values to Cells in `$activeWorksheet` (`Sheet1`) again.
-
-You don't have to assign the return value from calls to `createSheet()` and `setActiveSheetIndex()` to a variable, but it means that you can call Worksheet methods directly against `$activeWorksheet`, rather than having to call `$spreadsheet->getActiveSheet()` all the time.
-And, unlike MS Excel where you can only update Cells in the "Active" Worksheet; PhpSpreadsheet allows you to update Cells in any Worksheet:
-```php
-// Create a Spreadsheet, with Worksheet Sheet1, which is the Active Worksheet
-$spreadsheet = new Spreadsheet();
-// Assign the Active Worksheet (Sheet1) to $worksheet1
-$worksheet1 = $spreadsheet->getActiveSheet();
-// Create a new Worksheet (Sheet2) and make that the Active Worksheet
-$worksheet2 = $spreadsheet->createSheet();
-
-$worksheet1->setCellValue('A1', 'I am a cell on Sheet1');
-$worksheet2->setCellValue('A1', 'I am a cell on Sheet2');
-```
+will change the currently active sheet to the worksheet called
+"DataSheet".
## Write a date or time into a cell
@@ -231,12 +68,10 @@ UST.
Writing a date value in a cell consists of 2 lines of code. Select the
method that suits you the best. Here are some examples:
-```php
+``` php
+
// MySQL-like timestamp '2008-12-31' or date string
-// Old method using static property
\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet->setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
$spreadsheet->getActiveSheet()
->setCellValue('D1', '2008-12-31');
@@ -259,75 +94,29 @@ $spreadsheet->getActiveSheet()->getStyle('D1')
->getNumberFormat()
->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);
```
+
The above methods for entering a date all yield the same result.
+`\PhpOffice\PhpSpreadsheet\Style\NumberFormat` provides a lot of
+pre-defined date formats.
+
The `\PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel()` method will also
-work with a PHP DateTime object; or with strings containing different well-recognised date formats
-(although this is limited in the same ways as using the Advanced Value Binder).
+work with a PHP DateTime object.
Similarly, times (or date and time values) can be entered in the same
fashion: just remember to use an appropriate format code.
-> **Note:** See section "Using value binders to facilitate data entry" to learn more
+**Note:**
+
+See section "Using value binders to facilitate data entry" to learn more
about the AdvancedValueBinder used in the first example. Excel can also
operate in a 1904-based calendar (default for workbooks saved on Mac).
Normally, you do not have to worry about this when using PhpSpreadsheet.
-`\PhpOffice\PhpSpreadsheet\Style\NumberFormat` provides a number of
-pre-defined date formats; but this is just a string value, and you can
-define your own values as long as they are a valid MS Excel format.
-PhpSpreadsheet also provides a number of Wizards to help you create
-Date, Time and DateTime format masks.
-
-
- Click here for an example of the Date/Time Wizards
-
-```php
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Date as DateWizard;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\Time as TimeWizard;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard\DateTime as DateTimeWizard;
-
-$spreadsheet->getActiveSheet()->setCellValue('A1', '=NOW()')
-$spreadsheet->getActiveSheet()->setCellValue('A2', '=NOW()')
-$spreadsheet->getActiveSheet()->setCellValue('A3', '=NOW()')
-
-// yyyy-mm-dd
-$dateFormat = new DateWizard(
- DateWizard::SEPARATOR_DASH,
- DateWizard::YEAR_FULL,
- DateWizard::MONTH_NUMBER_LONG,
- DateWizard::DAY_NUMBER_LONG
-);
-
-$spreadsheet->getActiveSheet()->getStyle('A1')
- ->getNumberFormat()
- ->setFormatCode($dateFormat);
-
-// hh:mm
-$timeFormat = new TimeWizard(
- TimeWizard::SEPARATOR_COLON,
- TimeWizard::HOURS_LONG,
- TimeWizard::MINUTES_LONG,
-);
-
-$spreadsheet->getActiveSheet()->getStyle('A2')
- ->getNumberFormat()
- ->setFormatCode($timeFormat);
-
-// yyyy-mm-dd hh:mm
-$dateTimeFormat = new DateTimeWizard(' ', $dateFormat, $timeFormat);
-
-$spreadsheet->getActiveSheet()->getStyle('A3')
- ->getNumberFormat()
- ->setFormatCode($dateTimeFormat);
-```
-
-
-
## Write a formula into a cell
Inside the Excel file, formulas are always stored as they would appear
in an English version of Microsoft Office Excel, and PhpSpreadsheet
-handles all formulas internally in this format. This means that the
+handles all formulae internally in this format. This means that the
following rules hold:
- Decimal separator is `.` (period)
@@ -347,14 +136,14 @@ The following line of code writes the formula
formula must start with `=` to make PhpSpreadsheet recognise this as a
formula.
-```php
+``` php
$spreadsheet->getActiveSheet()->setCellValue('B8','=IF(C4>500,"profit","loss")');
```
If you want to write a string beginning with an `=` character to a
cell, then you should use the `setCellValueExplicit()` method.
-```php
+``` php
$spreadsheet->getActiveSheet()
->setCellValueExplicit(
'B8',
@@ -365,164 +154,24 @@ $spreadsheet->getActiveSheet()
A cell's formula can be read again using the following line of code:
-```php
+``` php
$formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue();
```
If you need the calculated value of a cell, use the following code. This
is further explained in [the calculation engine](./calculation-engine.md).
-```php
+``` php
$value = $spreadsheet->getActiveSheet()->getCell('B8')->getCalculatedValue();
```
-### Array Formulas
-
-With version 3.0.0 of PhpSpreadsheet, we've introduced support for Excel "array formulas".
-**It is an opt-in feature.** You need to enable it with the following code:
-```php
-// preferred method
-\PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance($spreadsheet)
- ->setInstanceArrayReturnType(
- \PhpOffice\PhpSpreadsheet\Calculation\Calculation::RETURN_ARRAY_AS_ARRAY);
-// or less preferred
-\PhpOffice\PhpSpreadsheet\Calculation\Calculation::setArrayReturnType(
- \PhpOffice\PhpSpreadsheet\Calculation\Calculation::RETURN_ARRAY_AS_ARRAY);
-```
-This is not a new constant, and setArrayReturnType is also not new, but it has till now not had much effect.
-The instance variable set by the new setInstanceArrayReturnType
-will always be checked first, and the static variable used only if the instance variable is uninitialized.
-
-As a basic example, let's look at a receipt for buying some fruit:
-
-
-
-We can provide a "Cost" formula for each row of the receipt by multiplying the "Quantity" (column `B`) by the "Price" (column `C`); so for the "Apples" in row `2` we enter the formula `=$B2*$C2`. In PhpSpreadsheet, we would set this formula in cell `D2` using:
-```php
-$spreadsheet->getActiveSheet()->setCellValue('D2','=$B2*$C2');
-```
-and then do the equivalent for rows `3` to `6`.
-
-To calculate the "Total", we would use a different formula, telling it to calculate the sum value of rows 2 to 6 in the "Cost" column:
-
-
-
-I'd imagine that most developers are familiar with this: we're setting a formula that uses an Excel function (the `SUM()` function) and specifying a range of cells to include in the sum (`$D$2:$D6`)
-```php
-$spreadsheet->getActiveSheet()->setCellValue('D7','=SUM($D$2:$D6');
-```
-However, we could have specified an alternative formula to calculate that result, using the arrays of the "Quantity" and "Cost" columns multiplied directly, and then summed together:
-
-
-
-Entering the formula `=SUM(B2:B6*C2:C6)` will calculate the same result; but because it's using arrays, we need to enter it as an "array formula". In MS Excel itself, we'd do this by using `Ctrl-Shift-Enter` rather than simply `Enter` when we define the formula in the formula edit box. MS Excel then shows that this is an array formula in the formula edit box by wrapping it in the `{}` braces (you don't enter these in the formula yourself; MS Excel does it).
-
-**In recent releases of Excel, Ctrl-Shift-Enter is not required, and Excel does not add the braces.
-PhpSpreadsheet will attempt to behave like the recent releases.**
-
-Or to identify the biggest increase in like-for-like sales from one month to the next:
-
-
-```php
-$spreadsheet->getActiveSheet()->setCellValue('F1','=MAX(B2:B6-C2:C6)');
-```
-Which tells us that the biggest increase in sales between December and January was 30 more (in this case, 30 more Lemons).
-
----
-
-These are examples of array formula where the results are displayed in a single cell; but other array formulas might be displayed across several cells.
-As an example, consider transposing a grid of data: MS Excel provides the `TRANSPOSE()` function for that purpose. Let's transpose our shopping list for the fruit:
-
-
-
-When we do this in MS Excel, we used to need to indicate ___all___ the cells that will contain the transposed data from cells `A1` to `D7`. We do this by selecting the cells where we want to display our transposed data either by holding the left mouse button down while we move with the mouse, or pressing `Shift` and using the arrow keys.
-Once we've selected all the cells to hold our data, then we enter the formula `TRANSPOSE(A1:D7)` in the formula edit box, remembering to use `Ctrl-Shift-Enter` to tell MS Excel that this is an array formula. In recent Excel, you can just enter `=TRANSPOSE(A1:D7)` into cell A10.
-
-Note also that we still set this as the formula for the top-left cell of that range, cell `A10`.
-
-Simply setting an array formula in a cell and specifying the range won't populate the spillage area for that formula.
-```php
-$spreadsheet->getActiveSheet()
- ->setCellValue(
- 'A10',
- '=SEQUENCE(3,3)'
- );
-// Will return a null, because the formula for A1 hasn't been calculated to populate the spillage area
-$result = $spreadsheet->getActiveSheet()->getCell('C3')->getValue();
-```
-To do that, we need to retrieve the calculated value for the cell.
-```php
-$spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();
-// Will return 9, because the formula for A1 has now been calculated, and the spillage area is populated
-$result = $spreadsheet->getActiveSheet()->getCell('C3')->getValue();
-```
-If returning arrays has been enabled, `getCalculatedValue` will return an array when appropriate, and will populate the spill range. If returning arrays has not been enabled, when we call `getCalculatedValue()` for a cell that contains an array formula, PhpSpreadsheet will return the single value from the topmost leftmost cell, and will leave other cells unchanged.
-```php
-// Will return integer 1, the value for that cell within the array
-$a1result = $spreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();
-```
-
----
-
-Excel365 introduced a number of new functions that return arrays of results.
-These include the `UNIQUE()`, `SORT()`, `SORTBY()`, `FILTER()`, `SEQUENCE()` and `RANDARRAY()` functions.
-While not all of these have been implemented by the Calculation Engine in PhpSpreadsheet, so they cannot all be calculated within your PHP applications, they can still be read from and written to Xlsx files.
-
-The `SEQUENCE()` function generates a series of values (in this case, starting with `-10` and increasing in steps of `2.5`); and here we're telling the formula to populate a 3x3 grid with these values.
-
-
-
-Note that this is visually different from using `Ctrl-Shift-Enter` for the formula. When we are positioned in the "spill" range for the grid, MS Excel highlights the area with a blue border; and the formula displayed in the formula editing field isn't wrapped in braces (`{}`).
-
-And if we select any other cell inside the "spill" area other than the top-left cell, the formula in the formula edit field is greyed rather than displayed in black.
-
-
-
-When we enter this formula in MS Excel, we don't need to select the range of cells that it should occupy; nor do we need to enter it using `Ctrl-Shift-Enter`.
-
-### The Spill Operator
-
-If you want to reference the entire spillage range of an array formula within another formula, you could do so using the standard Excel range operator (`:`, e.g. `A1:C3`); but you may not always know the range, especially for array functions that spill across as many cells as they need, like `UNIQUE()` and `FILTER()`.
-To simplify this, MS Excel has introduced the "Spill" Operator (`#`).
-
-
-
-Using our `SEQUENCE()`example, where the formula cell is `A1` and the result spills across the range `A1:C3`, we can use the Spill operator `A1#` to reference all the cells in that spillage range.
-In this case, we're taking the absolute value of each cell in that range, and adding them together using the `SUM()` function to give us a result of 50.
-
-PhpSpreadsheet supports entry of a formula like this using the Spill operator. Alternatively, MS Excel internally implements the Spill Operator as a function (`ANCHORARRAY()`). MS Excel itself doesn't allow you to use this function in a formula, you have to use the "Spill" operator; but PhpSpreadsheet does allow you to use this internal Excel function. PhpSpreadsheet will convert the spill operator to ANCHORARRAY on write (so it may appear that your formula has changed, but it hasn't really); it is not necessary to convert it back on read.
-
-To create this same function in PhpSpreadsheet, use:
-```php
-$spreadsheet->getActiveSheet()->setCellValue('D1','=SUM(ABS(ANCHORARRAY(A1)))');
-```
-
-When the file is saved, and opened in MS Excel, it will be rendered correctly.
-
-### The At-sign Operator
-
-If you want to reference just the first cell of an array formula within another formula, you could do so by prefixing it with an at-sign. You can also select the entry in a range which matches the current row in this way; so, if you enter `=@A1:A5` in cell G3, the result will be the value from A3. MS Excel again implements this under the covers by converting to a function SINGLE. PhpSpreadsheet allows the use of the SINGLE function. It does not yet support the at-sign operator, which can have a different meaning in other contexts.
-
-### Updating Cell in Spill Area
-
-Excel prevents you from updating a cell in the spill area. PhpSpreadsheet does not - it seems like it might be quite expensive, needing to reevaluate the entire worksheet with each `setValue`. PhpSpreadsheet does provide a method to be used prior to calling `setValue` if desired.
-```php
-$sheet->setCellValue('A1', '=SORT{7;5;1}');
-$sheet->getCell('A1')->getCalculatedValue(); // populates A1-A3
-$sheet->isCellInSpillRange('A2'); // true
-$sheet->isCellInSpillRange('A3'); // true
-$sheet->isCellInSpillRange('A4'); // false
-$sheet->isCellInSpillRange('A1'); // false
-```
-The last result might be surprising. Excel allows you to alter the formula cell itself, so `isCellInSpillRange` treats the formula cell as not in range. It should also be noted that, if array returns are not enabled, `isCellInSpillRange` will always return `false`.
-
-## Locale Settings for Formulas
+## Locale Settings for Formulae
Some localisation elements have been included in PhpSpreadsheet. You can
set a locale by changing the settings. To set the locale to Russian you
would use:
-```php
+``` php
$locale = 'ru';
$validLocale = \PhpOffice\PhpSpreadsheet\Settings::setLocale($locale);
if (!$validLocale) {
@@ -536,29 +185,28 @@ will return an error, and English settings will be used throughout.
Once you have set a locale, you can translate a formula from its
internal English coding.
-```php
+``` php
$formula = $spreadsheet->getActiveSheet()->getCell('B8')->getValue();
-$translatedFormula = \PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->translateFormulaToLocale($formula);
+$translatedFormula = \PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->_translateFormulaToLocale($formula);
```
You can also create a formula using the function names and argument
separators appropriate to the defined locale; then translate it to
English before setting the cell value:
-```php
+``` php
$formula = '=ДÐЕЙ360(ДÐТÐ(2010;2;5);ДÐТÐ(2010;12;31);ИСТИÐÐ)';
$internalFormula = \PhpOffice\PhpSpreadsheet\Calculation\Calculation::getInstance()->translateFormulaToEnglish($formula);
$spreadsheet->getActiveSheet()->setCellValue('B8',$internalFormula);
```
Currently, formula translation only translates the function names, the
-constants TRUE and FALSE (and NULL), Excel error messages, and the function argument separators. Cell addressing using R1C1 formatting is not supported.
+constants TRUE and FALSE, and the function argument separators.
At present, the following locale settings are supported:
Language | | Locale Code
---------------------|----------------------|-------------
-Bulgarian | българÑки | bg
Czech | Ceština | cs
Danish | Dansk | da
German | Deutsch | de
@@ -568,7 +216,7 @@ French | Français | fr
Hungarian | Magyar | hu
Italian | Italiano | it
Dutch | Nederlands | nl
-Norwegian | Norsk Bokmål | nb
+Norwegian | Norsk | no
Polish | Jezyk polski | pl
Portuguese | Português | pt
Brazilian Portuguese | Português Brasileiro | pt_br
@@ -576,8 +224,6 @@ Russian | руÑÑкий Ñзык | ru
Swedish | Svenska | sv
Turkish | Türkçe | tr
-If anybody can provide translations for additional languages, particularly Basque (Euskara), Catalan (Català ), Croatian (Hrvatski jezik), Galician (Galego), Greek (Ελληνικά), Slovak (SlovenÄina) or Slovenian (SlovenÅ¡Äina); please feel free to volunteer your services, and we'll happily show you what is needed to contribute a new language.
-
## Write a newline character "\n" in a cell (ALT+"Enter")
In Microsoft Office Excel you get a line break in a cell by hitting
@@ -586,7 +232,7 @@ the cell.
Here is how to achieve this in PhpSpreadsheet:
-```php
+``` php
$spreadsheet->getActiveSheet()->getCell('A1')->setValue("hello\nworld");
$spreadsheet->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true);
```
@@ -601,11 +247,8 @@ AdvancedValuebinder.php automatically turns on "wrap text" for the cell
when it sees a newline character in a string that you are inserting in a
cell. Just like Microsoft Office Excel. Try this:
-```php
-// Old method using static property
+``` php
\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
-// Preferred method using dynamic property since 3.4.0
-$spreadsheet->setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
$spreadsheet->getActiveSheet()->getCell('A1')->setValue("hello\nworld");
```
@@ -618,7 +261,7 @@ You can set a cell's datatype explicitly by using the cell's
setValueExplicit method, or the setCellValueExplicit method of a
worksheet. Here's an example:
-```php
+``` php
$spreadsheet->getActiveSheet()->getCell('A1')
->setValueExplicit(
'25',
@@ -630,36 +273,18 @@ $spreadsheet->getActiveSheet()->getCell('A1')
You can make a cell a clickable URL by setting its hyperlink property:
-```php
-$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.example.com');
-$spreadsheet->getActiveSheet()->getCell('E26')
- ->getHyperlink()
- ->setUrl('https://www.example.com');
+``` php
+$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net');
+$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('https://www.example.com');
```
If you want to make a hyperlink to another worksheet/cell, use the
following code:
-```php
-$spreadsheet->getActiveSheet()
- ->setCellValue('E27', 'go to another sheet');
-$spreadsheet->getActiveSheet()->getCell('E27')
- ->getHyperlink()
- ->setUrl("sheet://'Sheetname'!A1");
-```
-
-Excel automatically supplies a special style when a hyperlink is
-entered into a cell. PhpSpreadsheet cannot do so. However,
-starting with release 4.3,
-you can mimic Excel's behavior with:
-```php
-$spreadsheet->getActiveSheet()
- ->getStyle('E26')
- ->getFont()
- ->setHyperlinkTheme();
+``` php
+$spreadsheet->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net');
+$spreadsheet->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl("sheet://'Sheetname'!A1");
```
-This will set underline (all formats) and text color (always
-for Xlsx, and usually for other formats).
## Setting Printer Options for Excel files
@@ -668,7 +293,7 @@ for Xlsx, and usually for other formats).
Setting a worksheet's page orientation and size can be done using the
following lines of code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()
->setOrientation(\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
$spreadsheet->getActiveSheet()->getPageSetup()
@@ -676,22 +301,7 @@ $spreadsheet->getActiveSheet()->getPageSetup()
```
Note that there are additional page settings available. Please refer to
-the [API documentation](https://phpoffice.github.io/PhpSpreadsheet) for all possible options.
-
-The default papersize is initially PAPERSIZE_LETTER. However, this default
-can be changed for new sheets with the following call:
-```php
-\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::setPaperSizeDefault(
- \PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::PAPERSIZE_A4
-);
-```
-
-The default orientation is ORIENTATION_DEFAULT, which will be treated as Portrait in Excel. However, this default can be changed for new sheets with the following call:
-```php
-\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::setOrientationDefault(
- \PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::ORIENTATION_LANDSCAPE
-);
-```
+the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master) for all possible options.
### Page Setup: Scaling options
@@ -714,7 +324,7 @@ setFitToHeight(...) | 1 | setFitToPage(TRUE) | value 0 mean
Here is how to fit to 1 page wide by infinite pages tall:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()->setFitToWidth(1);
$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0);
```
@@ -730,7 +340,7 @@ the initial values.
To set page margins for a worksheet, use this code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageMargins()->setTop(1);
$spreadsheet->getActiveSheet()->getPageMargins()->setRight(0.75);
$spreadsheet->getActiveSheet()->getPageMargins()->setLeft(0.75);
@@ -746,7 +356,7 @@ Note that the margin values are specified in inches.
To center a page horizontally/vertically, you can use the following
code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()->setHorizontalCentered(true);
$spreadsheet->getActiveSheet()->getPageSetup()->setVerticalCentered(false);
```
@@ -756,7 +366,7 @@ $spreadsheet->getActiveSheet()->getPageSetup()->setVerticalCentered(false);
Setting a worksheet's print header and footer can be done using the
following lines of code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getHeaderFooter()
->setOddHeader('&C&HPlease treat this document as confidential!');
$spreadsheet->getActiveSheet()->getHeaderFooter()
@@ -842,9 +452,7 @@ $drawing = new \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing();
$drawing->setName('PhpSpreadsheet logo');
$drawing->setPath('./images/PhpSpreadsheet_logo.png');
$drawing->setHeight(36);
-$spreadsheet->getActiveSheet()
- ->getHeaderFooter()
- ->addImage($drawing, \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter::IMAGE_HEADER_LEFT);
+$spreadsheet->getActiveSheet()->getHeaderFooter()->addImage($drawing, \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter::IMAGE_HEADER_LEFT);
```
### Setting printing breaks on a row or column
@@ -852,13 +460,13 @@ $spreadsheet->getActiveSheet()
To set a print break, use the following code, which sets a row break on
row 10.
-```php
+``` php
$spreadsheet->getActiveSheet()->setBreak('A10', \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_ROW);
```
The following line of code sets a print break on column D:
-```php
+``` php
$spreadsheet->getActiveSheet()->setBreak('D10', \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_COLUMN);
```
@@ -867,7 +475,7 @@ $spreadsheet->getActiveSheet()->setBreak('D10', \PhpOffice\PhpSpreadsheet\Worksh
To show/hide gridlines when printing, use the following code:
```php
-$spreadsheet->getActiveSheet()->setPrintGridlines(true);
+$spreadsheet->getActiveSheet()->setShowGridlines(true);
```
### Setting rows/columns to repeat at top/left
@@ -876,7 +484,7 @@ PhpSpreadsheet can repeat specific rows/cells at top/left of a page. The
following code is an example of how to repeat row 1 to 5 on each printed
page of a specific worksheet:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 5);
```
@@ -884,13 +492,13 @@ $spreadsheet->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEn
To specify a worksheet's printing area, use the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5');
```
There can also be multiple printing areas in a single worksheet:
-```php
+``` php
$spreadsheet->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5,G4:M20');
```
@@ -903,7 +511,7 @@ For example, one can set the foreground colour of a cell to red, aligned
to the right, and the border to black and thick border style. Let's do
that on cell B2:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('B2')
->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_RED);
$spreadsheet->getActiveSheet()->getStyle('B2')
@@ -925,7 +533,7 @@ $spreadsheet->getActiveSheet()->getStyle('B2')
`getStyle()` also accepts a cell range as a parameter. For example, you
can set a red background color on a range of cells:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('B3:B7')->getFill()
->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)
->getStartColor()->setARGB('FFFF0000');
@@ -936,14 +544,11 @@ getStyle('A1:M500'), rather than styling the cells individually in a
loop. This is much faster compared to looping through cells and styling
them individually.
-**Tip** If you are styling entire row(s) or column(s), e.g. getStyle('A:A'), it is recommended to use applyFromArray as described below rather than setting the styles individually as described above.
-Also, starting with release 3.9.0, you should use getRowStyle or getColumnStyle to get the style for an entire row or column.
-
There is also an alternative manner to set styles. The following code
sets a cell's style to font bold, alignment right, top border thin and a
gradient fill:
-```php
+``` php
$styleArray = [
'font' => [
'bold' => true,
@@ -973,7 +578,7 @@ $spreadsheet->getActiveSheet()->getStyle('A3')->applyFromArray($styleArray);
Or with a range of cells:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('B3:B7')->applyFromArray($styleArray);
```
@@ -982,13 +587,6 @@ execution whenever you are setting more than one style property. But the
difference may barely be measurable unless you have many different
styles in your workbook.
-You can perform the opposite function, exporting a Style as an array,
-as follows:
-
-``` php
-$styleArray = $spreadsheet->getActiveSheet()->getStyle('A3')->exportArray();
-```
-
### Number formats
You often want to format numbers in Excel. For example you may want a
@@ -1004,7 +602,7 @@ number format code unless you need a custom number format.
In PhpSpreadsheet, you can also apply various predefined number formats.
Example:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()
->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1);
```
@@ -1016,7 +614,7 @@ up as 1.587,20)
You can achieve exactly the same as the above by using this:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()
->setFormatCode('#,##0.00');
```
@@ -1025,7 +623,7 @@ In Microsoft Office Excel, as well as in PhpSpreadsheet, you will have
to interact with raw number format codes whenever you need some special
custom number format. Example:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()
->setFormatCode('[Blue][>=3000]$#,##0;[Red][<0]$#,##0;$#,##0');
```
@@ -1033,7 +631,7 @@ $spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()
Another example is when you want numbers zero-padded with leading zeros
to a fixed length:
-```php
+``` php
$spreadsheet->getActiveSheet()->getCell('A1')->setValue(19);
$spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()
->setFormatCode('0000'); // will show as 0019 in Excel
@@ -1048,7 +646,7 @@ The readers shipped with PhpSpreadsheet come to the rescue. Load your
template workbook using e.g. Xlsx reader to reveal the number format
code. Example how read a number format code for cell A1:
-```php
+``` php
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$spreadsheet = $reader->load('template.xlsx');
var_dump($spreadsheet->getActiveSheet()->getStyle('A1')->getNumberFormat()->getFormatCode());
@@ -1063,14 +661,14 @@ code in *xl/styles.xml*.
Let's set vertical alignment to the top for cells A1:D4
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('A1:D4')
->getAlignment()->setVertical(\PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_TOP);
```
Here is how to achieve wrap text:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('A1:D4')
->getAlignment()->setWrapText(true);
```
@@ -1080,47 +678,18 @@ $spreadsheet->getActiveSheet()->getStyle('A1:D4')
It is possible to set the default style of a workbook. Let's set the
default font to Arial size 8:
-```php
+``` php
$spreadsheet->getDefaultStyle()->getFont()->setName('Arial');
$spreadsheet->getDefaultStyle()->getFont()->setSize(8);
```
-Excel also offers "theme fonts", with separate font names for major (header) and minor (body) text. PhpSpreadsheet will use the Excel 2007 default (Cambria) for major (default is Calibri Light in Excel 2013+); PhpSpreadsheet default for minor is Calibri, which is used by Excel 2007+. To align the default font name with the minor font name:
-
-```php
-$spreadsheet->getTheme()
- ->setThemeFontName('custom')
- ->setMinorFontValues('Arial', 'Arial', 'Arial', []);
-$spreadsheet->getDefaultStyle()->getFont()->setScheme('minor');
-```
-
-All cells bound to the theme fonts (via the `Font::setScheme` method) can be easily changed to a different font in Excel. To do this in PhpSpreadsheet, an additional method call is needed:
-```php
-$spreadsheet->resetThemeFonts();
-```
-
-### Charset for Arabic and Persian Fonts
-
-It is unknown why this should be needed. However, some Excel
-users have reported better results if the internal declaration for an
-Arabic/Persian font includes a `charset` declaration.
-This seems like a bug in Excel, but, starting with release 4.4,
-this can be accomplished at the spreadsheet level, via:
-```php
-$spreadsheet->addFontCharset('C Nazanin');
-```
-As many charsets as desired can be added in this manner.
-There is a second optional parameter specifying the charset id
-to this method, but, since this seems to be needed only for
-Arabic/Persian, that is its default value.
-
### Styling cell borders
In PhpSpreadsheet it is easy to apply various borders on a rectangular
selection. Here is how to apply a thick red border outline around cells
B2:G8.
-```php
+``` php
$styleArray = [
'borders' => [
'outline' => [
@@ -1171,26 +740,6 @@ vertical/horizontal, left/right/top/bottom/diagonal.
This border hierarchy can be utilized to achieve various effects in an
easy manner.
-#### Advanced borders
-
-There is a second parameter `$advancedBorders` which can be supplied to applyFromArray. The default is `true`; when set to this value, the border styles are applied to the range as a whole, not to the individual cells. When set to `false`, the border styles are applied to each cell. The following code and screenshot demonstrates the difference.
-
-```php
-$sheet->setShowGridlines(false);
-$styleArray = [
- 'borders' => [
- 'bottom' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']],
- 'top' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']],
- 'right' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']],
- 'left' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']],
- ],
-];
-$sheet->getStyle('B2:C3')->applyFromArray($styleArray);
-$sheet->getStyle('B5:C6')->applyFromArray($styleArray, false);
-```
-
-
-
### Valid array keys for style `applyFromArray()`
The following table lists the valid array keys for
@@ -1204,75 +753,69 @@ another style array.
Array key | Maps to property
-------------|-------------------
-alignment | setAlignment()
-borders | setBorders()
-fill | setFill()
-font | setFont()
-numberFormat | setNumberFormat()
-protection | setProtection()
-quotePrefix | setQuotePrefix()
+fill | getFill()
+font | getFont()
+borders | getBorders()
+alignment | getAlignment()
+numberFormat | getNumberFormat()
+protection | getProtection()
-**\PhpOffice\PhpSpreadsheet\Style\Alignment**
+**\PhpOffice\PhpSpreadsheet\Style\Fill**
-Array key | Maps to property
-----------------|-------------------
-horizontal | setHorizontal()
-justifyLastLine | setJustifyLastLine()
-indent | setIndent()
-readOrder | setReadOrder()
-shrinkToFit | setShrinkToFit()
-textRotation | setTextRotation()
-vertical | setVertical()
-wrapText | setWrapText()
+Array key | Maps to property
+-----------|-------------------
+fillType | setFillType()
+rotation | setRotation()
+startColor | getStartColor()
+endColor | getEndColor()
+color | getStartColor()
-**\PhpOffice\PhpSpreadsheet\Style\Border**
+**\PhpOffice\PhpSpreadsheet\Style\Font**
Array key | Maps to property
------------|-------------------
-borderStyle | setBorderStyle()
-color | setColor()
-
-**\PhpOffice\PhpSpreadsheet\Style\Borders**
-
-Array key | Maps to property
-------------------|-------------------
+name | setName()
+bold | setBold()
+italic | setItalic()
+underline | setUnderline()
+strikethrough | setStrikethrough()
+color | getColor()
+size | setSize()
+superscript | setSuperscript()
+subscript | setSubscript()
+
+**\PhpOffice\PhpSpreadsheet\Style\Borders**
+
+Array key | Maps to property
+------------------|-------------------
allBorders | getLeft(); getRight(); getTop(); getBottom()
-bottom | getBottom()
-diagonal | getDiagonal()
-diagonalDirection | setDiagonalDirection()
left | getLeft()
right | getRight()
top | getTop()
+bottom | getBottom()
+diagonal | getDiagonal()
+vertical | getVertical()
+horizontal | getHorizontal()
+diagonalDirection | setDiagonalDirection()
+outline | setOutline()
-**\PhpOffice\PhpSpreadsheet\Style\Color**
+**\PhpOffice\PhpSpreadsheet\Style\Border**
Array key | Maps to property
------------|-------------------
-argb | setARGB()
-
-**\PhpOffice\PhpSpreadsheet\Style\Fill**
-
-Array key | Maps to property
------------|-------------------
-color | getStartColor()
-endColor | getEndColor()
-fillType | setFillType()
-rotation | setRotation()
-startColor | getStartColor()
+borderStyle | setBorderStyle()
+color | getColor()
-**\PhpOffice\PhpSpreadsheet\Style\Font**
+**\PhpOffice\PhpSpreadsheet\Style\Alignment**
Array key | Maps to property
------------|-------------------
-bold | setBold()
-color | getColor()
-italic | setItalic()
-name | setName()
-size | setSize()
-strikethrough | setStrikethrough()
-subscript | setSubscript()
-superscript | setSuperscript()
-underline | setUnderline()
+horizontal | setHorizontal()
+vertical | setVertical()
+textRotation| setTextRotation()
+wrapText | setWrapText()
+shrinkToFit | setShrinkToFit()
+indent | setIndent()
**\PhpOffice\PhpSpreadsheet\Style\NumberFormat**
@@ -1296,7 +839,7 @@ is below zero, and to green if its value is zero or more.
One can set a conditional style ruleset to a cell using the following
code:
-```php
+``` php
$conditional1 = new \PhpOffice\PhpSpreadsheet\Style\Conditional();
$conditional1->setConditionType(\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS);
$conditional1->setOperatorType(\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHAN);
@@ -1321,60 +864,20 @@ $spreadsheet->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditiona
If you want to copy the ruleset to other cells, you can duplicate the
style object:
-```php
+``` php
$spreadsheet->getActiveSheet()
- ->duplicateConditionalStyle(
- $spreadsheet->getActiveSheet()->getConditionalStyles('B2'),
+ ->duplicateStyle(
+ $spreadsheet->getActiveSheet()->getStyle('B2'),
'B3:B7'
);
```
-More detailed documentation of the Conditional Formatting options and rules, and the use of Wizards to help create them, can be found in [a dedicated section of the documentation](https://phpspreadsheet.readthedocs.io/en/latest/topics/conditional-formatting/).
-
-### DataBar of Conditional formatting
-The basics are the same as conditional formatting.
-Additional DataBar object to conditional formatting.
-
-For example, the following code will result in the conditional formatting shown in the image.
-```php
-$conditional = new Conditional();
-$conditional->setConditionType(Conditional::CONDITION_DATABAR);
-$conditional->setDataBar(new ConditionalDataBar());
-$conditional->getDataBar()
- ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('num', '2'))
- ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('max'))
- ->setColor('FFFF555A');
-$ext = $conditional
- ->getDataBar()
- ->setConditionalFormattingRuleExt(new ConditionalFormattingRuleExtension())
- ->getConditionalFormattingRuleExt();
-
-$ext->setCfRule('dataBar');
-$ext->setSqref('A1:A5'); // target CellCoordinates
-$ext->setDataBarExt(new ConditionalDataBarExtension());
-$ext->getDataBarExt()
- ->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject('num', '2'))
- ->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject('autoMax'))
- ->setMinLength(0)
- ->setMaxLength(100)
- ->setBorder(true)
- ->setDirection('rightToLeft')
- ->setNegativeBarBorderColorSameAsPositive(false)
- ->setBorderColor('FFFF555A')
- ->setNegativeFillColor('FFFF0000')
- ->setNegativeBorderColor('FFFF0000')
- ->setAxisColor('FF000000');
-
-```
-
-
-
## Add a comment to a cell
To add a comment to a cell, use the following code. The example below
adds a comment to cell E11:
-```php
+``` php
$spreadsheet->getActiveSheet()
->getComment('E11')
->setAuthor('Mark Baker');
@@ -1389,36 +892,19 @@ $spreadsheet->getActiveSheet()
->getComment('E11')
->getText()->createTextRun('Total amount on the current invoice, excluding VAT.');
```
-
-
-## Add a comment with background image to a cell
-To add a comment with background image to a cell, use the following code:
-
-```php
-$sheet = $spreadsheet->getActiveSheet();
-$sheet->setCellValue('B5', 'Gibli Chromo');
-// Add png image to comment background
-$drawing = new Drawing();
-$drawing->setName('Gibli Chromo');
-$drawing->setPath('/tmp/gibli_chromo.png');
-$comment = $sheet->getComment('B5');
-$comment->setBackgroundImage($drawing);
-// Set the size of the comment equal to the size of the image
-$comment->setSizeAsBackgroundImage();
-```
-
+
## Apply autofilter to a range of cells
To apply an autofilter to a range of cells, use the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->setAutoFilter('A1:C9');
```
**Make sure that you always include the complete filter range!** Excel
-does support setting only the caption row, but that's **not** a best
+does support setting only the captionrow, but that's **not** a best
practice...
## Setting security on a spreadsheet
@@ -1433,107 +919,45 @@ disallow inserting rows on a specific sheet, disallow sorting, ...
- Cell: offers the option to lock/unlock a cell as well as show/hide
the internal formula.
-**Make sure you enable worksheet protection if you need any of the
-worksheet or cell protection features!** This can be done using the following
-code:
-
-```php
-$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);
-```
-
-> Note that "protection" is not the same as "encryption".
-> Protection is about preventing parts of a spreadsheet from being changed, not about preventing the spreadsheet from being looked at.
-PhpSpreadsheet does not support encrypting a spreadsheet; nor can it read encrypted spreadsheets.
-
-### Document
-
An example on setting document security:
-```php
-$security = $spreadsheet->getSecurity();
-$security->setLockWindows(true);
-$security->setLockStructure(true);
-$security->setWorkbookPassword("PhpSpreadsheet");
-```
-
-Note that there are additional methods setLockRevision and setRevisionsPassword
-which apply only to change tracking and history for shared workbooks.
-
-### Worksheet
-
-An example on setting worksheet security
-(user can sort, insert rows, or format cells without unprotecting):
-
-```php
-$protection = $spreadsheet->getActiveSheet()->getProtection();
-$protection->setPassword('PhpSpreadsheet');
-$protection->setSheet(true);
-$protection->setSort(false);
-$protection->setInsertRows(false);
-$protection->setFormatCells(false);
-```
-
-Note that allowing sort without providing the sheet password
-(similarly with autoFilter) requires that you explicitly
-enable the cell ranges for which sort is permitted,
-with or without a range password:
-```php
-$sheet->protectCells('A:A'); // column A can be sorted without password
-$sheet->protectCells('B:B', 'sortpw'); // column B can be sorted if the range password sortpw is supplied
+``` php
+$spreadsheet->getSecurity()->setLockWindows(true);
+$spreadsheet->getSecurity()->setLockStructure(true);
+$spreadsheet->getSecurity()->setWorkbookPassword("PhpSpreadsheet");
```
-If writing Xlsx files you can specify the algorithm used to hash the password
-before calling `setPassword()` like so:
+An example on setting worksheet security:
-```php
-$protection = $spreadsheet->getActiveSheet()->getProtection();
-$protection->setAlgorithm(Protection::ALGORITHM_SHA_512);
-$protection->setSpinCount(20000);
-$protection->setPassword('PhpSpreadsheet');
+``` php
+$spreadsheet->getActiveSheet()
+ ->getProtection()->setPassword('PhpSpreadsheet');
+$spreadsheet->getActiveSheet()
+ ->getProtection()->setSheet(true);
+$spreadsheet->getActiveSheet()
+ ->getProtection()->setSort(true);
+$spreadsheet->getActiveSheet()
+ ->getProtection()->setInsertRows(true);
+$spreadsheet->getActiveSheet()
+ ->getProtection()->setFormatCells(true);
```
-The salt should **not** be set manually and will be automatically generated
-when setting a new password.
-
-### Cell
-
-An example on setting cell security.
-Note that cell security is honored only when sheet is protected.
-Also note that the `hidden` property applies only to formulas,
-and tells whether the formula is hidden on the formula bar,
-not in the cell.
+An example on setting cell security:
-```php
+``` php
$spreadsheet->getActiveSheet()->getStyle('B1')
->getProtection()
- ->setLocked(\PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_UNPROTECTED)
- ->setHidden(\PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_PROTECTED);
+ ->setLocked(\PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_UNPROTECTED);
```
-## Reading protected spreadsheet
-
-Spreadsheets that are protected as described above can always be read by
-PhpSpreadsheet. There is no need to know the password or do anything special in
-order to read a protected file.
-
-However if you need to implement a password verification mechanism, you can use the
-following helper method:
-
-
-```php
-$protection = $spreadsheet->getActiveSheet()->getProtection();
-$allowed = $protection->verify('my password');
+**Make sure you enable worksheet protection if you need any of the
+worksheet protection features!** This can be done using the following
+code:
-if ($allowed) {
- doSomething();
-} else {
- throw new Exception('Incorrect password');
-}
+``` php
+$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);
```
-If you need to completely prevent reading a file by any tool, including PhpSpreadsheet,
-then you are looking for "encryption", not "protection".
-
## Setting data validation on a cell
Data validation is a powerful feature of Xlsx. It allows to specify an
@@ -1544,7 +968,7 @@ filter can be a range (i.e. value must be between 0 and 10), a list
The following piece of code only allows numbers between 10 and 20 to be
entered in cell B3:
-```php
+``` php
$validation = $spreadsheet->getActiveSheet()->getCell('B3')
->getDataValidation();
$validation->setType( \PhpOffice\PhpSpreadsheet\Cell\DataValidation::TYPE_WHOLE );
@@ -1561,9 +985,9 @@ $validation->setFormula2(20);
```
The following piece of code only allows an item picked from a list of
-data to be entered in cell B5:
+data to be entered in cell B3:
-```php
+``` php
$validation = $spreadsheet->getActiveSheet()->getCell('B5')
->getDataValidation();
$validation->setType( \PhpOffice\PhpSpreadsheet\Cell\DataValidation::TYPE_LIST );
@@ -1587,75 +1011,29 @@ formula is allowed to be maximum 255 characters (not bytes). This sets a
limit on how many items you can have in the string "Item A,Item B,Item
C". Therefore it is normally a better idea to type the item values
directly in some cell range, say A1:A3, and instead use, say,
-`$validation->setFormula1('\'Sheet title\'!$A$1:$A$3')`. Another benefit is that
+`$validation->setFormula1('Sheet!$A$1:$A$3')`. Another benefit is that
the item values themselves can contain the comma `,` character itself.
-### Setting Validation on Multiple Cells - Release 3 and Below
-
If you need data validation on multiple cells, one can clone the
ruleset:
-```php
+``` php
$spreadsheet->getActiveSheet()->getCell('B8')->setDataValidation(clone $validation);
```
-Alternatively, one can apply the validation to a range of cells:
-```php
-$validation->setSqref('B5:B1048576');
-```
-
-### Setting Validation on Multiple Cells - Release 4 and Above
-
-Starting with Release 4, Data Validation can be set simultaneously on several cells/cell ranges.
-
-```php
-$spreadsheet->getActiveSheet()->getDataValidation('A1:A4 D5 E6:E7')
- ->set...(...);
-```
-
-In theory, this means that more than one Data Validation can apply to a cell.
-It appears that, when Excel reads a spreadsheet with more than one Data Validation applying to a cell,
-whichever appears first in the Xml is what Xml uses.
-PhpSpreadsheet will instead apply a DatValidation applying to a single cell first;
-then, if it doesn't find such a match, it will use the first applicable definition which is read (or created after or in lieu of reading).
-This allows you, for example, to set Data Validation on all but a few cells in a column:
-```php
-$dv = new DataValidation();
-$dv->setType(DataValidation::TYPE_NONE);
-$sheet->setDataValidation('A5:A7', $dv);
-$dv = new DataValidation();
-$dv->set...(...);
-$sheet->setDataValidation('A:A', $dv);
-$dv = new DataValidation();
-$dv->setType(DataValidation::TYPE_NONE);
-$sheet->setDataValidation('A9', $dv);
-```
-
## Setting a column's width
A column's width can be set using the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(12);
```
-If you want to set a column width using a different UoM (Unit of Measure),
-then you can do so by telling PhpSpreadsheet what UoM the width value
-that you are setting is measured in.
-Valid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),
-`cm` (centimeters) and `mm` (millimeters).
-
-Setting the column width to `-1` tells MS Excel to display the column using its default width.
-
-```php
-$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(120, 'pt');
-```
-
If you want PhpSpreadsheet to perform an automatic width calculation,
-use the following code. PhpSpreadsheet will approximate the column width
-to the width of the widest value displayed in that column.
+use the following code. PhpSpreadsheet will approximate the column with
+to the width of the widest column value.
-```php
+``` php
$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);
```
@@ -1692,7 +1070,7 @@ To set a worksheet's column visibility, you can use the following code.
The first line explicitly shows the column C, the second line hides
column D.
-```php
+``` php
$spreadsheet->getActiveSheet()->getColumnDimension('C')->setVisible(true);
$spreadsheet->getActiveSheet()->getColumnDimension('D')->setVisible(false);
```
@@ -1701,7 +1079,7 @@ $spreadsheet->getActiveSheet()->getColumnDimension('D')->setVisible(false);
To group/outline a column, you can use the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1);
```
@@ -1709,7 +1087,7 @@ You can also collapse the column. Note that you should also set the
column invisible, otherwise the collapse will not be visible in Excel
2007.
-```php
+``` php
$spreadsheet->getActiveSheet()->getColumnDimension('E')->setCollapsed(true);
$spreadsheet->getActiveSheet()->getColumnDimension('E')->setVisible(false);
```
@@ -1720,7 +1098,7 @@ on collapsing.
You can instruct PhpSpreadsheet to add a summary to the right (default),
or to the left. The following code adds the summary to the left:
-```php
+``` php
$spreadsheet->getActiveSheet()->setShowSummaryRight(false);
```
@@ -1728,7 +1106,7 @@ $spreadsheet->getActiveSheet()->setShowSummaryRight(false);
A row's height can be set using the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getRowDimension('10')->setRowHeight(100);
```
@@ -1736,34 +1114,12 @@ Excel measures row height in points, where 1 pt is 1/72 of an inch (or
about 0.35mm). The default value is 12.75 pts; and the permitted range
of values is between 0 and 409 pts, where 0 pts is a hidden row.
-If you want to set a row height using a different UoM (Unit of Measure),
-then you can do so by telling PhpSpreadsheet what UoM the height value
-that you are setting is measured in.
-Valid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),
-`cm` (centimeters) and `mm` (millimeters).
-
-```php
-$spreadsheet->getActiveSheet()->getRowDimension('10')->setRowHeight(100, 'pt');
-```
-
-Setting the row height to `-1` tells MS Excel to display the column using its default height, which is based on the character font size.
-
-If you have wrapped text in a cell, then the `-1` default will only set the row height to display a single line of that wrapped text.
-If you need to calculate the actual height for the row, then count the lines that should be displayed (count the `\n` and add 1); then adjust for the font.
-The adjustment for Calibri 11 is approximately 14.5; for Calibri 12 15.9, etc.
-```php
-$spreadsheet->getActiveSheet()->getRowDimension(1)->setRowHeight(
- 14.5 * (substr_count($sheet->getCell('A1')->getValue(), "\n") + 1)
-);
-```
-
-
## Show/hide a row
To set a worksheet''s row visibility, you can use the following code.
The following example hides row number 10.
-```php
+``` php
$spreadsheet->getActiveSheet()->getRowDimension('10')->setVisible(false);
```
@@ -1775,21 +1131,21 @@ AutoFilter range if you save the file.
To group/outline a row, you can use the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getRowDimension('5')->setOutlineLevel(1);
```
You can also collapse the row. Note that you should also set the row
invisible, otherwise the collapse will not be visible in Excel 2007.
-```php
+``` php
$spreadsheet->getActiveSheet()->getRowDimension('5')->setCollapsed(true);
$spreadsheet->getActiveSheet()->getRowDimension('5')->setVisible(false);
```
Here's an example which collapses rows 50 to 80:
-```php
+``` php
for ($i = 51; $i <= 80; $i++) {
$spreadsheet->getActiveSheet()->setCellValue('A' . $i, "FName $i");
$spreadsheet->getActiveSheet()->setCellValue('B' . $i, "LName $i");
@@ -1806,101 +1162,34 @@ $spreadsheet->getActiveSheet()->getRowDimension(81)->setCollapsed(true);
You can instruct PhpSpreadsheet to add a summary below the collapsible
rows (default), or above. The following code adds the summary above:
-```php
+``` php
$spreadsheet->getActiveSheet()->setShowSummaryBelow(false);
```
-## Merge/Unmerge cells
+## Merge/unmerge cells
-If you have a big piece of data you want to display in a worksheet, or a
-heading that needs to span multiple sub-heading columns, you can merge
-two or more cells together, to become one cell. This can be done using
-the following code:
+If you have a big piece of data you want to display in a worksheet, you
+can merge two or more cells together, to become one cell. This can be
+done using the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->mergeCells('A18:E22');
```
-Removing a merge can be done using the `unmergeCells()` method:
+Removing a merge can be done using the unmergeCells method:
-```php
+``` php
$spreadsheet->getActiveSheet()->unmergeCells('A18:E22');
```
-MS Excel itself doesn't yet offer the functionality to simply hide the merged cells, or to merge the content of cells into a single cell, but it is available in Open/Libre Office.
-
-### Merge with MERGE_CELL_CONTENT_EMPTY
-
-The default behaviour is to empty all cells except for the top-left corner cell in the merge range; and this is also the default behaviour for the `mergeCells()` method in PhpSpreadsheet.
-When this behaviour is applied, those cell values will be set to null; and if they are subsequently Unmerged, they will be empty cells.
-
-Passing an extra flag value to the `mergeCells()` method in PhpSpreadsheet can change this behaviour.
-
-
-
-Possible flag values are:
-- Worksheet::MERGE_CELL_CONTENT_EMPTY (the default)
-- Worksheet::MERGE_CELL_CONTENT_HIDE
-- Worksheet::MERGE_CELL_CONTENT_MERGE
-
-### Merge with MERGE_CELL_CONTENT_HIDE
-
-The first alternative, available only in OpenOffice, is to hide those cells, but to leave their content intact.
-When a file saved as `Xlsx` in those applications is opened in MS Excel, and those cells are unmerged, the original content will still be present.
-
-```php
-$spreadsheet->getActiveSheet()->mergeCells('A1:C3', Worksheet::MERGE_CELL_CONTENT_HIDE);
-```
-
-Will replicate that behaviour.
-
-### Merge with MERGE_CELL_CONTENT_MERGE
-
-The second alternative, available in both OpenOffice and LibreOffice is to merge the content of every cell in the merge range into the top-left cell, while setting those hidden cells to empty.
-
-```php
-$spreadsheet->getActiveSheet()->mergeCells('A1:C3', Worksheet::MERGE_CELL_CONTENT_MERGE);
-```
-
-Particularly when the merged cells contain formulas, the logic for this merge seems strange:
-walking through the merge range, each cell is calculated in turn, and appended to the "master" cell, then it is emptied, so any subsequent calculations that reference the cell see an empty cell, not the pre-merge value.
-For example, suppose our spreadsheet contains
-
-
-
-where `B2` is the formula `=5-B1` and `C2` is the formula `=A2/B2`,
-and we want to merge cells `A2` to `C2` with all the cell values merged.
-The result is:
-
-
-
-The cell value `12` from cell `A2` is fixed; the value from `B2` is the result of the formula `=5-B1` (`4`, which is appended to our merged value), and cell `B2` is then emptied, so when we evaluate cell `C2` with the formula `=A2/B2` it gives us `12 / 0` which results in a `#DIV/0!` error (so the error `#DIV/0!` is appended to our merged value rather than the original calculation result of `3`).
-
-## Inserting or Removing rows/columns
+## Inserting rows/columns
You can insert/remove rows/columns at a specific position. The following
code inserts 2 new rows, right before row 7:
-```php
+``` php
$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);
```
-while
-```php
-$spreadsheet->getActiveSheet()->removeRow(7, 2);
-```
-will remove 2 rows starting at row number 7 (ie. rows 7 and 8).
-
-Equivalent methods exist for inserting/removing columns:
-
-```php
-$spreadsheet->getActiveSheet()->removeColumn('C', 2);
-```
-
-All subsequent rows (or columns) will be moved to allow the insertion (or removal) with all formulas referencing thise cells adjusted accordingly.
-
-Note that this is a fairly intensive process, particularly with large worksheets, and especially if you are inserting/removing rows/columns from near beginning of the worksheet.
-
-If you need to insert/remove several consecutive rows/columns, always use the second argument rather than making multiple calls to insert/remove a single row/column if possible.
## Add a drawing to a worksheet
@@ -1909,7 +1198,7 @@ to a worksheet. Therefore, you must first instantiate a new
`\PhpOffice\PhpSpreadsheet\Worksheet\Drawing`, and assign its properties a
meaningful value:
-```php
+``` php
$drawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing();
$drawing->setName('Logo');
$drawing->setDescription('Logo');
@@ -1921,13 +1210,13 @@ To add the above drawing to the worksheet, use the following snippet of
code. PhpSpreadsheet creates the link between the drawing and the
worksheet:
-```php
+``` php
$drawing->setWorksheet($spreadsheet->getActiveSheet());
```
You can set numerous properties on a drawing, here are some examples:
-```php
+``` php
$drawing->setName('Paid');
$drawing->setDescription('Paid');
$drawing->setPath('./images/paid.png');
@@ -1941,7 +1230,7 @@ $drawing->getShadow()->setDirection(45);
You can also add images created using GD functions without needing to
save them to disk first as In-Memory drawings.
-```php
+``` php
// Use GD to create an in-memory image
$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream');
$textColor = imagecolorallocate($gdImage, 255, 255, 255);
@@ -1961,22 +1250,6 @@ $drawing->setHeight(36);
$drawing->setWorksheet($spreadsheet->getActiveSheet());
```
-Note that GD images are memory-intensive.
-
-### Creating a Drawing from string or stream data
-
-If you want to create a drawing from a string containing the binary image data, or from an external datasource such as an S3 bucket, then you can create a new MemoryDrawing from these sources using the `fromString()` or `fromStream()` static methods.
-
-```php
-$drawing = MemoryDrawing::fromString($imageString);
-```
-
-```php
-$drawing = MemoryDrawing::fromStream($imageStreamFromS3Bucket);
-```
-
-Note that this is a memory-intensive process, like all gd images; and also creates a temporary file.
-
## Reading Images from a worksheet
A commonly asked question is how to retrieve the images from a workbook
@@ -1985,12 +1258,10 @@ that has been loaded, and save them as individual image files to disk.
The following code extracts images from the current active worksheet,
and writes each as a separate file.
-```php
-use PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing;
+``` php
$i = 0;
-
foreach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $drawing) {
- if ($drawing instanceof MemoryDrawing) {
+ if ($drawing instanceof \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing) {
ob_start();
call_user_func(
$drawing->getRenderingFunction(),
@@ -1999,39 +1270,24 @@ foreach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $drawing) {
$imageContents = ob_get_contents();
ob_end_clean();
switch ($drawing->getMimeType()) {
- case MemoryDrawing::MIMETYPE_PNG :
+ case \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing::MIMETYPE_PNG :
$extension = 'png';
break;
- case MemoryDrawing::MIMETYPE_GIF:
+ case \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing::MIMETYPE_GIF:
$extension = 'gif';
break;
- case MemoryDrawing::MIMETYPE_JPEG :
+ case \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing::MIMETYPE_JPEG :
$extension = 'jpg';
break;
}
} else {
- if ($drawing->getPath()) {
- // Check if the source is a URL or a file path
- if ($drawing->getIsURL()) {
- $imageContents = file_get_contents($drawing->getPath());
- $filePath = tempnam(sys_get_temp_dir(), 'Drawing');
- file_put_contents($filePath , $imageContents);
- $mimeType = mime_content_type($filePath);
- // You could use the below to find the extension from mime type.
- // https://gist.github.com/alexcorvi/df8faecb59e86bee93411f6a7967df2c#gistcomment-2722664
- $extension = File::mime2ext($mimeType);
- unlink($filePath);
- }
- else {
- $zipReader = fopen($drawing->getPath(),'r');
- $imageContents = '';
- while (!feof($zipReader)) {
- $imageContents .= fread($zipReader,1024);
- }
- fclose($zipReader);
- $extension = $drawing->getExtension();
- }
+ $zipReader = fopen($drawing->getPath(),'r');
+ $imageContents = '';
+ while (!feof($zipReader)) {
+ $imageContents .= fread($zipReader,1024);
}
+ fclose($zipReader);
+ $extension = $drawing->getExtension();
}
$myFileName = '00_Image_'.++$i.'.'.$extension;
file_put_contents($myFileName,$imageContents);
@@ -2044,20 +1300,16 @@ Adding rich text to a cell can be done using
`\PhpOffice\PhpSpreadsheet\RichText\RichText` instances. Here''s an example, which
creates the following rich text string:
-> This invoice is ***payable within thirty days after the end of the
-> month*** unless specified otherwise on the invoice.
+> This invoice is ***payable within thirty days after the end of the
+> month*** unless specified otherwise on the invoice.
-```php
+``` php
$richText = new \PhpOffice\PhpSpreadsheet\RichText\RichText();
$richText->createText('This invoice is ');
$payable = $richText->createTextRun('payable within thirty days after the end of the month');
$payable->getFont()->setBold(true);
$payable->getFont()->setItalic(true);
-$payable->getFont()->setColor(
- new \PhpOffice\PhpSpreadsheet\Style\Color(
- \PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKGREEN
- )
-);
+$payable->getFont()->setColor( new \PhpOffice\PhpSpreadsheet\Style\Color( \PhpOffice\PhpSpreadsheet\Style\Color::COLOR_DARKGREEN ) );
$richText->createText(', unless specified otherwise on the invoice.');
$spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);
```
@@ -2067,7 +1319,7 @@ $spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);
PhpSpreadsheet supports the definition of named ranges. These can be
defined using the following code:
-```php
+``` php
// Add some data
$spreadsheet->setActiveSheetIndex(0);
$spreadsheet->getActiveSheet()->setCellValue('A1', 'Firstname:');
@@ -2076,73 +1328,14 @@ $spreadsheet->getActiveSheet()->setCellValue('B1', 'Maarten');
$spreadsheet->getActiveSheet()->setCellValue('B2', 'Balliauw');
// Define named ranges
-$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('PersonFN', $spreadsheet->getActiveSheet(), '$B$1'));
-$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('PersonLN', $spreadsheet->getActiveSheet(), '$B$2'));
+$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('PersonFN', $spreadsheet->getActiveSheet(), 'B1') );
+$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('PersonLN', $spreadsheet->getActiveSheet(), 'B2') );
```
Optionally, a fourth parameter can be passed defining the named range
local (i.e. only usable on the current worksheet). Named ranges are
global by default.
-## Define a named formula
-
-In addition to named ranges, PhpSpreadsheet also supports the definition of named formulas. These can be
-defined using the following code:
-
-```php
-// Add some data
-$spreadsheet->setActiveSheetIndex(0);
-$worksheet = $spreadsheet->getActiveSheet();
-$worksheet
- ->setCellValue('A1', 'Product')
- ->setCellValue('B1', 'Quantity')
- ->setCellValue('C1', 'Unit Price')
- ->setCellValue('D1', 'Price')
- ->setCellValue('E1', 'VAT')
- ->setCellValue('F1', 'Total');
-
-// Define named formula
-$spreadsheet->addNamedFormula( new \PhpOffice\PhpSpreadsheet\NamedFormula('GERMAN_VAT_RATE', $worksheet, '=16.0%'));
-$spreadsheet->addNamedFormula( new \PhpOffice\PhpSpreadsheet\NamedFormula('CALCULATED_PRICE', $worksheet, '=$B1*$C1'));
-$spreadsheet->addNamedFormula( new \PhpOffice\PhpSpreadsheet\NamedFormula('GERMAN_VAT', $worksheet, '=$D1*GERMAN_VAT_RATE'));
-$spreadsheet->addNamedFormula( new \PhpOffice\PhpSpreadsheet\NamedFormula('TOTAL_INCLUDING_VAT', $worksheet, '=$D1+$E1'));
-
-$worksheet
- ->setCellValue('A2', 'Advanced Web Application Architecture')
- ->setCellValue('B2', 2)
- ->setCellValue('C2', 23.0)
- ->setCellValue('D2', '=CALCULATED_PRICE')
- ->setCellValue('E2', '=GERMAN_VAT')
- ->setCellValue('F2', '=TOTAL_INCLUDING_VAT');
-$spreadsheet->getActiveSheet()
- ->setCellValue('A3', 'Object Design Style Guide')
- ->setCellValue('B3', 5)
- ->setCellValue('C3', 12.0)
- ->setCellValue('D3', '=CALCULATED_PRICE')
- ->setCellValue('E3', '=GERMAN_VAT')
- ->setCellValue('F3', '=TOTAL_INCLUDING_VAT');
-$spreadsheet->getActiveSheet()
- ->setCellValue('A4', 'PHP For the Web')
- ->setCellValue('B4', 3)
- ->setCellValue('C4', 10.0)
- ->setCellValue('D4', '=CALCULATED_PRICE')
- ->setCellValue('E4', '=GERMAN_VAT')
- ->setCellValue('F4', '=TOTAL_INCLUDING_VAT');
-
-// Use a relative named range to provide the totals for rows 2-4
-$spreadsheet->addNamedRange( new \PhpOffice\PhpSpreadsheet\NamedRange('COLUMN_TOTAL', $worksheet, '=A$2:A$4') );
-
-$spreadsheet->getActiveSheet()
- ->setCellValue('B6', '=SUBTOTAL(109,COLUMN_TOTAL)')
- ->setCellValue('D6', '=SUBTOTAL(109,COLUMN_TOTAL)')
- ->setCellValue('E6', '=SUBTOTAL(109,COLUMN_TOTAL)')
- ->setCellValue('F6', '=SUBTOTAL(109,COLUMN_TOTAL)');
-```
-
-As with named ranges, an optional fourth parameter can be passed defining the named formula
-scope as local (i.e. only usable on the specified worksheet). Otherwise, named formulas are
-global by default.
-
## Redirect output to a client's web browser
Sometimes, one really wants to output a file to a client''s browser,
@@ -2169,7 +1362,7 @@ your document is needed, it is recommended not to use `php://output`.
Example of a script redirecting an Excel 2007 file to the client's
browser:
-```php
+``` php
/* Here there will be some code where you create $spreadsheet */
// redirect output to client browser
@@ -2183,7 +1376,7 @@ $writer->save('php://output');
Example of a script redirecting an Xls file to the client's browser:
-```php
+``` php
/* Here there will be some code where you create $spreadsheet */
// redirect output to client browser
@@ -2211,47 +1404,18 @@ at the client browser, and/or that headers cannot be set by PHP
Default column width can be set using the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getDefaultColumnDimension()->setWidth(12);
```
-Excel measures column width in its own proprietary units, based on the number
-of characters that will be displayed in the default font.
-
-If you want to set the default column width using a different UoM (Unit of Measure),
-then you can do so by telling PhpSpreadsheet what UoM the width value
-that you are setting is measured in.
-Valid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),
-`cm` (centimeters) and `mm` (millimeters).
-
-```php
-$spreadsheet->getActiveSheet()->getDefaultColumnDimension()->setWidth(400, 'pt');
-```
-and PhpSpreadsheet will handle the internal conversion.
-
## Setting the default row height
Default row height can be set using the following code:
-```php
+``` php
$spreadsheet->getActiveSheet()->getDefaultRowDimension()->setRowHeight(15);
```
-Excel measures row height in points, where 1 pt is 1/72 of an inch (or
-about 0.35mm). The default value is 12.75 pts; and the permitted range
-of values is between 0 and 409 pts, where 0 pts is a hidden row.
-
-If you want to set a row height using a different UoM (Unit of Measure),
-then you can do so by telling PhpSpreadsheet what UoM the height value
-that you are setting is measured in.
-Valid units are `pt` (points), `px` (pixels), `pc` (pica), `in` (inches),
-`cm` (centimeters) and `mm` (millimeters).
-
-```php
-$spreadsheet->getActiveSheet()->getDefaultRowDimension()->setRowHeight(100, 'pt');
-```
-
-
## Add a GD drawing to a worksheet
There might be a situation where you want to generate an in-memory image
@@ -2261,7 +1425,7 @@ file to a temporary location.
Here''s an example which generates an image in memory and adds it to the
active worksheet:
-```php
+``` php
// Generate an image
$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream');
$textColor = imagecolorallocate($gdImage, 255, 255, 255);
@@ -2282,7 +1446,7 @@ $drawing->setWorksheet($spreadsheet->getActiveSheet());
To set a worksheet's zoom level, the following code can be used:
-```php
+``` php
$spreadsheet->getActiveSheet()->getSheetView()->setZoomScale(75);
```
@@ -2293,7 +1457,7 @@ Note that zoom level should be in range 10 - 400.
Sometimes you want to set a color for sheet tab. For example you can
have a red sheet tab:
-```php
+``` php
$worksheet->getTabColor()->setRGB('FF0000');
```
@@ -2301,7 +1465,7 @@ $worksheet->getTabColor()->setRGB('FF0000');
If you need to create more worksheets in the workbook, here is how:
-```php
+``` php
$worksheet1 = $spreadsheet->createSheet();
$worksheet1->setTitle('Another sheet');
```
@@ -2314,7 +1478,7 @@ worksheets in the workbook.
Set a worksheet to be **hidden** using this code:
-```php
+``` php
$spreadsheet->getActiveSheet()
->setSheetState(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN);
```
@@ -2336,7 +1500,7 @@ Worksheets can be set individually whether column `A` should start at
left or right side. Default is left. Here is how to set columns from
right-to-left.
-```php
+``` php
// right-to-left worksheet
$spreadsheet->getActiveSheet()->setRightToLeft(true);
```
diff --git a/docs/topics/settings.md b/docs/topics/settings.md
index ea53dcfb42..a9aae9f923 100644
--- a/docs/topics/settings.md
+++ b/docs/topics/settings.md
@@ -13,7 +13,7 @@ Read more about [memory saving](./memory_saving.md).
To enable cell caching, you must provide your own implementation of cache like so:
-```php
+``` php
$cache = new MyCustomPsr16Implementation();
\PhpOffice\PhpSpreadsheet\Settings::setCache($cache);
@@ -25,7 +25,7 @@ Some localisation elements have been included in PhpSpreadsheet. You can
set a locale by changing the settings. To set the locale to Brazilian
Portuguese you would use:
-```php
+``` php
$locale = 'pt_br';
$validLocale = \PhpOffice\PhpSpreadsheet\Settings::setLocale($locale);
if (!$validLocale) {
@@ -42,21 +42,4 @@ then the `setLocale()` method will return an error, and American English
More details of the features available once a locale has been set,
including a list of the languages and locales currently supported, can
be found in [Locale Settings for
-Formulas](./recipes.md#locale-settings-for-formulas).
-
-## HTTP client
-
-In order to use the `WEBSERVICE` function in formulae, you must configure an
-HTTP client. Assuming you chose Guzzle 7, this can be done like:
-
-
-```php
-use GuzzleHttp\Client;
-use Http\Factory\Guzzle\RequestFactory;
-use PhpOffice\PhpSpreadsheet\Settings;
-
-$client = new Client();
-$requestFactory = new RequestFactory();
-
-Settings::setHttpClient($client, $requestFactory);
-```
+Formulae](./recipes.md#locale-settings-for-formulae).
diff --git a/docs/topics/tables.md b/docs/topics/tables.md
deleted file mode 100644
index a16d036bf4..0000000000
--- a/docs/topics/tables.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Tables
-
-## Introduction
-
-To make managing and analyzing a group of related data easier, you can turn a range of cells into an Excel table (previously known as an Excel list).
-
-## Support
-
-Currently tables are supported in Xlsx reader and Html Writer
-
-To enable table formatting for Html writer, use:
-
-```php
- $writer = new HtmlWriter($spreadsheet);
- $writer->setConditionalFormatting(true);
-```
\ No newline at end of file
diff --git a/docs/topics/worksheets.md b/docs/topics/worksheets.md
index 5b15089b61..f97a00665d 100644
--- a/docs/topics/worksheets.md
+++ b/docs/topics/worksheets.md
@@ -25,7 +25,7 @@ each worksheet "tab" is shown when the workbook is opened in MS Excel
(or other appropriate Spreadsheet program). To access a sheet by its
index, use the `getSheet()` method.
-```php
+``` php
// Get the second sheet in the workbook
// Note that sheets are indexed from 0
$spreadsheet->getSheet(1);
@@ -38,7 +38,7 @@ workbook.
To access a sheet by name, use the `getSheetByName()` method, specifying
the name of the worksheet that you want to access.
-```php
+``` php
// Retrieve the worksheet called 'Worksheet 1'
$spreadsheet->getSheetByName('Worksheet 1');
```
@@ -48,7 +48,7 @@ and you can access that directly. The currently active worksheet is the
one that will be active when the workbook is opened in MS Excel (or
other appropriate Spreadsheet program).
-```php
+``` php
// Retrieve the current active worksheet
$spreadsheet->getActiveSheet();
```
@@ -64,7 +64,7 @@ a new "last" sheet; but you can also specify an index position as an
argument, and the worksheet will be inserted at that position, shuffling
all subsequent worksheets in the collection down a place.
-```php
+``` php
$spreadsheet->createSheet();
```
@@ -76,7 +76,7 @@ Alternatively, you can instantiate a new worksheet (setting the title to
whatever you choose) and then insert it into your workbook using the
`addSheet()` method.
-```php
+``` php
// Create a new worksheet called "My Data"
$myWorkSheet = new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet($spreadsheet, 'My Data');
@@ -93,40 +93,21 @@ Sheets within the same workbook can be copied by creating a clone of the
worksheet you wish to copy, and then using the `addSheet()` method to
insert the clone into the workbook.
-```php
+``` php
$clonedWorksheet = clone $spreadsheet->getSheetByName('Worksheet 1');
-$clonedWorksheet->setTitle('Copy of Worksheet 1'); // must be unique
+$clonedWorksheet->setTitle('Copy of Worksheet 1');
$spreadsheet->addSheet($clonedWorksheet);
```
-Starting with PhpSpreadsheet 3.9.0, this can be done more simply (copied sheet's title will be set to something unique):
-```php
-$copiedWorksheet = $spreadsheet->duplicateWorksheetByTitle('sheetname');
-```
You can also copy worksheets from one workbook to another, though this
is more complex as PhpSpreadsheet also has to replicate the styling
between the two workbooks. The `addExternalSheet()` method is provided for
this purpose.
-```php
-$clonedWorksheet = clone $spreadsheet1->getSheetByName('Worksheet 1');
-$clonedWorksheet->setTitle('Copy of Worksheet 1'); // must be unique
-$spreadsheet1->addSheet($clonedWorksheet);
-$spreadsheet->addExternalSheet($clonedWorksheet);
-```
-Starting with PhpSpreadsheet 3.8.0, this can be simplified:
-```php
-$clonedWorksheet = clone $spreadsheet1->getSheetByName('Worksheet 1');
-$spreadsheet1->addSheet($clonedWorksheet, null, true);
-$spreadsheet->addExternalSheet($clonedWorksheet);
-```
-Starting with PhpSpreadsheet 3.9.0, this can be simplified even further:
-```php
-$clonedWorksheet = $spreadsheet1->duplicateWorksheetByTitle('sheetname');
-$spreadsheet->addExternalSheet($clonedWorksheet);
-```
+ $clonedWorksheet = clone $spreadsheet1->getSheetByName('Worksheet 1');
+ $spreadsheet->addExternalSheet($clonedWorksheet);
-In the cases commented "must be unique", it is the developer's responsibility to ensure that
+In both cases, it is the developer's responsibility to ensure that
worksheet names are not duplicated. PhpSpreadsheet will throw an
exception if you attempt to copy worksheets that will result in a
duplicate name.
@@ -136,7 +117,7 @@ duplicate name.
You can delete a worksheet from a workbook, identified by its index
position, using the `removeSheetByIndex()` method
-```php
+``` php
$sheetIndex = $spreadsheet->getIndex(
$spreadsheet->getSheetByName('Worksheet 1')
);
diff --git a/infra/DocumentGenerator.php b/infra/DocumentGenerator.php
deleted file mode 100644
index 85467da911..0000000000
--- a/infra/DocumentGenerator.php
+++ /dev/null
@@ -1,141 +0,0 @@
- $phpSpreadsheetFunctions
- */
- public static function generateFunctionListByCategory($phpSpreadsheetFunctions): string
- {
- $result = "# Function list by category\n";
- foreach (self::getCategories() as $categoryConstant => $category) {
- $result .= "\n";
- $result .= "## {$categoryConstant}\n";
- $result .= "\n";
- $lengths = [25, 37];
- $result .= self::tableRow($lengths, ['Excel Function', 'PhpSpreadsheet Function']) . "\n";
- $result .= self::tableRow($lengths, null) . "\n";
- foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) {
- if (in_array($excelFunction, self::EXCLUDED_FUNCTIONS, true)) {
- continue;
- }
- if ($category === $functionInfo['category']) {
- $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']);
- $result .= self::tableRow($lengths, [$excelFunction, $phpFunction]) . "\n";
- }
- }
- }
-
- return $result;
- }
-
- /** @return array */
- private static function getCategories(): array
- {
- /** @var array */
- $x = (new ReflectionClass(Category::class))->getConstants();
-
- return $x;
- }
-
- /**
- * @param int[] $lengths
- * @param null|array $values
- */
- private static function tableRow(array $lengths, ?array $values = null): string
- {
- $result = '';
- foreach (array_map(null, $lengths, $values ?? []) as $i => [$length, $value]) {
- $pad = $value === null ? '-' : ' ';
- if ($i > 0) {
- $result .= '|' . $pad;
- }
- $result .= str_pad("$value", $length ?? 0, $pad);
- }
-
- return rtrim($result, ' ');
- }
-
- /** @param scalar|string|string[] $functionCall */
- private static function getPhpSpreadsheetFunctionText(mixed $functionCall): string
- {
- if (is_string($functionCall)) {
- return $functionCall;
- }
- if ($functionCall === [Functions::class, 'DUMMY']) {
- return '**Not yet Implemented**';
- }
- if (is_array($functionCall)) {
- return "\\{$functionCall[0]}::{$functionCall[1]}";
- }
-
- throw new UnexpectedValueException(
- '$functionCall is of type ' . gettype($functionCall) . '. string or array expected'
- );
- }
-
- /**
- * @param array $phpSpreadsheetFunctions
- */
- public static function generateFunctionListByName(array $phpSpreadsheetFunctions, bool $compact = false): string
- {
- $categoryConstants = array_flip(self::getCategories());
- if ($compact) {
- $result = "# Function list by name compact\n";
- $result .= "\n";
- $result .= 'Category should be prefixed by `CATEGORY_` to match the values in \PhpOffice\PhpSpreadsheet\Calculation\Category';
- $result .= "\n\n";
- $result .= 'Function should be prefixed by `PhpOffice\PhpSpreadsheet\Calculation\`';
- $result .= "\n\n";
- $result .= 'A less compact list can be found [here](./function-list-by-name.md)';
- $result .= "\n\n";
- } else {
- $result = "# Function list by name\n";
- $result .= "\n";
- $result .= 'A more compact list can be found [here](./function-list-by-name-compact.md)';
- $result .= "\n\n";
- }
- $lastAlphabet = null;
- $lengths = $compact ? [25, 22, 37] : [25, 31, 37];
- foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) {
- if (in_array($excelFunction, self::EXCLUDED_FUNCTIONS, true)) {
- continue;
- }
- if ($lastAlphabet !== $excelFunction[0]) {
- $lastAlphabet = $excelFunction[0];
- $result .= "\n";
- $result .= "## {$lastAlphabet}\n";
- $result .= "\n";
- $result .= self::tableRow($lengths, ['Excel Function', 'Category', 'PhpSpreadsheet Function']) . "\n";
- $result .= self::tableRow($lengths, null) . "\n";
- }
- $category = $categoryConstants[$functionInfo['category']];
- $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']);
- if ($compact) {
- $category = str_replace('CATEGORY_', '', $category);
- $phpFunction = str_replace(
- '\PhpOffice\PhpSpreadsheet\Calculation\\',
- '',
- $phpFunction
- );
- }
- $result .= self::tableRow($lengths, [$excelFunction, $category, $phpFunction]) . "\n";
- }
-
- return $result;
- }
-}
diff --git a/infra/LocaleGenerator.php b/infra/LocaleGenerator.php
deleted file mode 100644
index 7440306777..0000000000
--- a/infra/LocaleGenerator.php
+++ /dev/null
@@ -1,383 +0,0 @@
- */
- protected array $phpSpreadsheetFunctions;
-
- protected Spreadsheet $translationSpreadsheet;
-
- protected bool $verbose;
-
- protected Worksheet $localeTranslations;
-
- /** @var string[] */
- protected array $localeLanguageMap = [];
-
- /** @var int[] */
- protected array $errorCodeMap = [];
-
- private Worksheet $functionNameTranslations;
-
- /** @var string[] */
- protected array $functionNameLanguageMap = [];
-
- /** @var array */
- protected array $functionNameMap = [];
-
- /**
- * @param array $phpSpreadsheetFunctions
- */
- public function __construct(
- string $translationBaseFolder,
- string $translationSpreadsheetName,
- array $phpSpreadsheetFunctions,
- bool $verbose = false
- ) {
- $this->translationBaseFolder = $translationBaseFolder;
- $this->translationSpreadsheetName = $translationSpreadsheetName;
- $this->phpSpreadsheetFunctions = $phpSpreadsheetFunctions;
- $this->verbose = $verbose;
- }
-
- public function generateLocales(): void
- {
- $this->openTranslationWorkbook();
-
- $this->localeTranslations = $this->getTranslationSheet(self::EXCEL_LOCALISATION_WORKSHEET);
- $this->localeLanguageMap = $this->mapLanguageColumns($this->localeTranslations);
- $this->mapErrorCodeRows();
-
- $this->functionNameTranslations = $this->getTranslationSheet(self::EXCEL_FUNCTIONS_WORKSHEET);
- $this->functionNameLanguageMap = $this->mapLanguageColumns($this->functionNameTranslations);
- $this->mapFunctionNameRows();
-
- foreach ($this->localeLanguageMap as $column => $locale) {
- $this->buildConfigFileForLocale($column, $locale);
- }
-
- foreach ($this->functionNameLanguageMap as $column => $locale) {
- $this->buildFunctionsFileForLocale($column, $locale);
- }
- }
-
- protected function buildConfigFileForLocale(string $column, string $locale): void
- {
- $language = $this->localeTranslations->getCell($column . self::ENGLISH_LANGUAGE_NAME_ROW)->getValue();
- if (!is_string($language)) {
- throw new Exception('Non-string language value at ' . $column . self::ENGLISH_LANGUAGE_NAME_ROW);
- }
- $localeLanguage = $this->localeTranslations->getCell($column . self::LOCALE_LANGUAGE_NAME_ROW)->getValue();
- if (!is_string($localeLanguage)) {
- throw new Exception('Non-string locale language value at ' . $column . self::LOCALE_LANGUAGE_NAME_ROW);
- }
- $configFile = $this->openConfigFile($locale, $language, $localeLanguage);
-
- $this->writeConfigArgumentSeparator($configFile, $column);
- $this->writeConfigCurrencySymbol($configFile, $column);
- $this->writeFileSectionHeader($configFile, 'Error Codes');
-
- foreach ($this->errorCodeMap as $errorCode => $row) {
- $translationCell = $this->localeTranslations->getCell($column . $row);
- $translationValue = $translationCell->getValue();
- if ($translationValue !== null && !is_string($translationValue)) {
- throw new Exception('Non-string translation value at ' . $column . $row);
- }
- if (!empty($translationValue)) {
- $errorCodeTranslation = "{$errorCode} = {$translationValue}" . self::EOL;
- fwrite($configFile, $errorCodeTranslation);
- } else {
- $errorCodeTranslation = "{$errorCode}" . self::EOL;
- fwrite($configFile, $errorCodeTranslation);
- $this->log("No {$language} translation available for error code {$errorCode}");
- }
- }
-
- fclose($configFile);
- }
-
- /** @param resource $configFile resource to write to */
- protected function writeConfigArgumentSeparator($configFile, string $column): void
- {
- $translationCell = $this->localeTranslations->getCell($column . self::ARGUMENT_SEPARATOR_ROW);
- $localeValue = $translationCell->getValue();
- if ($localeValue !== null && !is_string($localeValue)) {
- throw new Exception('Non-string locale value at ' . $column . self::CURRENCY_SYMBOL_ROW);
- }
- if (!empty($localeValue)) {
- $functionTranslation = "ArgumentSeparator = {$localeValue}" . self::EOL;
- fwrite($configFile, $functionTranslation);
- } else {
- $this->log('No Argument Separator defined');
- }
- }
-
- /** @param resource $configFile resource to write to */
- protected function writeConfigCurrencySymbol($configFile, string $column): void
- {
- $translationCell = $this->localeTranslations->getCell($column . self::CURRENCY_SYMBOL_ROW);
- $localeValue = $translationCell->getValue();
- if ($localeValue !== null && !is_string($localeValue)) {
- throw new Exception('Non-string locale value at ' . $column . self::CURRENCY_SYMBOL_ROW);
- }
- if (!empty($localeValue)) {
- $functionTranslation = "currencySymbol = {$localeValue}" . self::EOL;
- fwrite($configFile, '##' . self::EOL);
- fwrite($configFile, '## (For future use)' . self::EOL);
- fwrite($configFile, '##' . self::EOL);
- fwrite($configFile, $functionTranslation);
- } else {
- $this->log('No Currency Symbol defined');
- }
- }
-
- protected function buildFunctionsFileForLocale(string $column, string $locale): void
- {
- $language = $this->functionNameTranslations->getCell($column . self::ENGLISH_LANGUAGE_NAME_ROW)->getValue();
- if (!is_string($language)) {
- throw new Exception('Non-string language value at ' . $column . self::ENGLISH_LANGUAGE_NAME_ROW);
- }
- $localeLanguage = $this->functionNameTranslations->getCell($column . self::LOCALE_LANGUAGE_NAME_ROW)
- ->getValue();
- if (!is_string($localeLanguage)) {
- throw new Exception('Non-string locale language value at ' . $column . self::LOCALE_LANGUAGE_NAME_ROW);
- }
- $functionFile = $this->openFunctionNameFile($locale, $language, $localeLanguage);
-
- foreach ($this->functionNameMap as $functionName => $row) {
- $translationCell = $this->functionNameTranslations->getCell($column . $row);
- $translationValue = $translationCell->getValue();
- if ($translationValue !== null && !is_string($translationValue)) {
- throw new Exception('Non-string translation value at ' . $column . $row);
- }
- if ($this->isFunctionCategoryEntry($translationCell)) {
- $this->writeFileSectionHeader($functionFile, "{$translationValue} ({$functionName})");
- } elseif (!array_key_exists($functionName, $this->phpSpreadsheetFunctions) && substr($functionName, 0, 1) !== '*') {
- $this->log("Function {$functionName} is not defined in PhpSpreadsheet");
- } elseif (!empty($translationValue)) {
- $functionTranslation = "{$functionName} = {$translationValue}" . self::EOL;
- fwrite($functionFile, $functionTranslation);
- } else {
- $this->log("No {$language} translation available for function {$functionName}");
- }
- }
-
- fclose($functionFile);
- }
-
- /** @return resource used by other methods in this class */
- protected function openConfigFile(string $locale, string $language, string $localeLanguage)
- {
- $this->log("Building locale {$locale} ($language) configuration");
- $localeFolder = $this->getLocaleFolder($locale);
-
- $configFileName = realpath($localeFolder) . DIRECTORY_SEPARATOR . 'config';
- $this->log("Writing locale configuration to {$configFileName}");
-
- $configFile = fopen($configFileName, 'wb');
- if ($configFile === false) {
- throw new Exception('Unable to open $configFileName for write');
- }
- $this->writeFileHeader($configFile, $localeLanguage, $language, 'locale settings');
-
- return $configFile;
- }
-
- /** @return resource used by other methods in this class */
- protected function openFunctionNameFile(string $locale, string $language, string $localeLanguage)
- {
- $this->log("Building locale {$locale} ($language) function names");
- $localeFolder = $this->getLocaleFolder($locale);
-
- $functionFileName = realpath($localeFolder) . DIRECTORY_SEPARATOR . 'functions';
- $this->log("Writing local function names to {$functionFileName}");
-
- $functionFile = fopen($functionFileName, 'wb');
- if ($functionFile === false) {
- throw new Exception('Unable to open $functionFileName for write');
- }
- $this->writeFileHeader($functionFile, $localeLanguage, $language, 'function name translations');
-
- return $functionFile;
- }
-
- protected function getLocaleFolder(string $locale): string
- {
- $lastchar = substr($this->translationBaseFolder, -1);
- $dirsep = ($lastchar === '/' || $lastchar === '\\') ? '' : DIRECTORY_SEPARATOR;
- $localeFolder = $this->translationBaseFolder
- . $dirsep
- . str_replace('_', DIRECTORY_SEPARATOR, $locale);
- if (!file_exists($localeFolder) || !is_dir($localeFolder)) {
- mkdir($localeFolder, 7 * 64 + 7 * 8 + 7, true); // octal 777
- }
-
- return $localeFolder;
- }
-
- /** @param resource $localeFile file being written to */
- protected function writeFileHeader($localeFile, string $localeLanguage, string $language, string $title): void
- {
- fwrite($localeFile, str_repeat('#', 60) . self::EOL);
- fwrite($localeFile, '##' . self::EOL);
- fwrite($localeFile, "## PhpSpreadsheet - {$title}" . self::EOL);
- fwrite($localeFile, '##' . self::EOL);
- fwrite($localeFile, "## {$localeLanguage} ({$language})" . self::EOL);
- fwrite($localeFile, '##' . self::EOL);
- fwrite($localeFile, str_repeat('#', 60) . self::EOL . self::EOL);
- }
-
- /** @param resource $localeFile file being written to */
- protected function writeFileSectionHeader($localeFile, string $header): void
- {
- fwrite($localeFile, self::EOL . '##' . self::EOL);
- fwrite($localeFile, "## {$header}" . self::EOL);
- fwrite($localeFile, '##' . self::EOL);
- }
-
- protected function openTranslationWorkbook(): void
- {
- $filepathName = $this->translationBaseFolder . '/' . $this->translationSpreadsheetName;
- $this->translationSpreadsheet = IOFactory::load($filepathName);
- }
-
- protected function getTranslationSheet(string $sheetName): Worksheet
- {
- $worksheet = $this->translationSpreadsheet->setActiveSheetIndexByName($sheetName);
-
- return $worksheet;
- }
-
- /** @return string[] */
- protected function mapLanguageColumns(Worksheet $translationWorksheet): array
- {
- $sheetName = $translationWorksheet->getTitle();
- $this->log("Mapping Languages for {$sheetName}:");
-
- $baseColumn = self::ENGLISH_REFERENCE_COLUMN;
- $languagesList = $translationWorksheet->getColumnIterator(++$baseColumn);
-
- $languageNameMap = [];
- foreach ($languagesList as $languageColumn) {
- $cells = $languageColumn->getCellIterator(self::LOCALE_NAME_ROW, self::LOCALE_NAME_ROW);
- $cells->setIterateOnlyExistingCells(true);
- foreach ($cells as $cell) {
- if ($this->localeCanBeSupported($translationWorksheet, $cell)) {
- $languageNameMap[$cell->getColumn()] = $cell->getValueString();
- $this->log($cell->getColumn() . ' -> ' . $cell->getValueString());
- }
- }
- }
-
- return $languageNameMap;
- }
-
- protected function localeCanBeSupported(Worksheet $worksheet, Cell $cell): bool
- {
- if ($worksheet->getTitle() === self::EXCEL_LOCALISATION_WORKSHEET) {
- // Only provide support for languages that have a function argument separator defined
- // in the localisation worksheet
- return !empty(
- $worksheet->getCell($cell->getColumn() . self::ARGUMENT_SEPARATOR_ROW)->getValue()
- );
- }
-
- // If we're processing other worksheets, then language support is determined by whether we included the
- // language in the map when we were processing the localisation worksheet (which is always processed first)
- return in_array($cell->getValue(), $this->localeLanguageMap, true);
- }
-
- protected function mapErrorCodeRows(): void
- {
- $this->log('Mapping Error Codes:');
- $errorList = $this->localeTranslations->getRowIterator(self::ERROR_CODES_FIRST_ROW);
-
- foreach ($errorList as $errorRow) {
- $cells = $errorRow->getCellIterator(self::ENGLISH_REFERENCE_COLUMN, self::ENGLISH_REFERENCE_COLUMN);
- $cells->setIterateOnlyExistingCells(true);
- foreach ($cells as $cell) {
- if ($cell->getValue() != '') {
- $this->log($cell->getRow() . ' -> ' . $cell->getValueString());
- $this->errorCodeMap[$cell->getValue()] = $cell->getRow();
- }
- }
- }
- }
-
- protected function mapFunctionNameRows(): void
- {
- $this->log('Mapping Functions:');
- $functionList = $this->functionNameTranslations->getRowIterator(self::FUNCTION_NAME_LIST_FIRST_ROW);
-
- foreach ($functionList as $functionRow) {
- $cells = $functionRow->getCellIterator(self::ENGLISH_REFERENCE_COLUMN, self::ENGLISH_REFERENCE_COLUMN);
- $cells->setIterateOnlyExistingCells(true);
- foreach ($cells as $cell) {
- if ($this->isFunctionCategoryEntry($cell)) {
- if (!empty($cell->getValue())) {
- $this->log('CATEGORY: ' . $cell->getValueString());
- $this->functionNameMap[$cell->getValue()] = $cell->getRow();
- }
-
- continue;
- }
- if ($cell->getValue() !== '' && $cell->getValue() !== null) {
- if (is_bool($cell->getValue())) {
- $this->log($cell->getRow() . ' -> ' . ($cell->getValue() ? 'TRUE' : 'FALSE'));
- $this->functionNameMap[($cell->getValue() ? 'TRUE' : 'FALSE')] = $cell->getRow();
- } else {
- $this->log($cell->getRow() . ' -> ' . $cell->getValueString());
- $this->functionNameMap[$cell->getValue()] = $cell->getRow();
- }
- }
- }
- }
- }
-
- private function isFunctionCategoryEntry(Cell $cell): bool
- {
- $categoryCheckCell = self::ENGLISH_FUNCTION_CATEGORIES_COLUMN . $cell->getRow();
- if ($this->functionNameTranslations->getCell($categoryCheckCell)->getValue() != '') {
- return true;
- }
-
- return false;
- }
-
- private function log(string $message): void
- {
- if ($this->verbose === false) {
- return;
- }
-
- echo $message, self::EOL;
- }
-}
diff --git a/mkdocs.yml b/mkdocs.yml
index d382c6385c..1a224f5c8b 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,11 +1,7 @@
site_name: PhpSpreadsheet Documentation
repo_url: https://github.com/PHPOffice/phpspreadsheet
-edit_uri: edit/master/docs/
+edit_uri: edit/develop/docs/
theme: readthedocs
extra_css:
- extra/extra.css
-extra_javascript:
- - extra/extrajs.js
-markdown_extensions:
- - md_in_html
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
deleted file mode 100644
index 29bdc49fa0..0000000000
--- a/phpstan-baseline.neon
+++ /dev/null
@@ -1,49 +0,0 @@
-parameters:
- ignoreErrors:
- -
- message: '#^Parameter \#1 \$array of function array_multisort expects array, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: src/PhpSpreadsheet/Calculation/LookupRef/Sort.php
-
- -
- message: '#^Cannot call method getAllSpContainers\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php
-
- -
- message: '#^Cannot call method getBSECollection\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php
-
- -
- message: '#^Cannot call method getBstoreContainer\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php
-
- -
- message: '#^Cannot call method getSpgrContainer\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php
-
- -
- message: '#^Cannot access offset 0 on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
- count: 1
- path: src/PhpSpreadsheet/ReferenceHelper.php
-
- -
- message: '#^Parameter \#1 \$string of function trim expects string, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: src/PhpSpreadsheet/ReferenceHelper.php
-
- -
- message: '#^Cannot call method setParent\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
deleted file mode 100644
index 73ef676c73..0000000000
--- a/phpstan.neon.dist
+++ /dev/null
@@ -1,33 +0,0 @@
-includes:
- - phpstan-baseline.neon
- - vendor/phpstan/phpstan-phpunit/extension.neon
- - vendor/phpstan/phpstan-phpunit/rules.neon
- - vendor/composer/pcre/extension.neon
- - vendor/phpstan/phpstan/conf/bleedingEdge.neon
- - vendor/phpstan/phpstan-deprecation-rules/rules.neon
-
-parameters:
- level: 10
- paths:
- - samples/
- - src/
- - tests/
- - infra/
- - bin/
- excludePaths:
- - src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
- - src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php
- - src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php
- - src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php
- - src/PhpSpreadsheet/Writer/ZipStream2.php
- - src/PhpSpreadsheet/Writer/ZipStream3.php
- - tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctions2Test.php
- parallel:
- processTimeout: 300.0
- ignoreErrors:
- # Accept a bit anything for assert methods
- - '~^Parameter \#2 .* of static method PHPUnit\\Framework\\Assert\:\:assert\w+\(\) expects .*, .* given\.$~'
- - '~Method .*rovider.* return type has no value type specified in iterable type array\.$~'
- - '~Method .*rovider.* should return array but returns mixed\.$~'
- - '~.* has parameter \$expectedResult with no value type specified in iterable type array\.$~'
- #- identifier: missingType.iterableValue
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index d3e845c1ea..6880d23e48 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,16 +1,22 @@
-
-
-
-
-
-
-
- ./tests/PhpSpreadsheetTests
-
-
-
- ./src
-
-
+
+
+
+
+
+ ./tests/PhpSpreadsheetTests
+
+
+
+ ./src
+
+ ./src/PhpSpreadsheet/Shared/JAMA
+ ./src/PhpSpreadsheet/Writer/PDF
+
+
+
diff --git a/samples/Autofilter/10_Autofilter.php b/samples/Autofilter/10_Autofilter.php
index 4002f1806b..db9de54aa4 100644
--- a/samples/Autofilter/10_Autofilter.php
+++ b/samples/Autofilter/10_Autofilter.php
@@ -3,7 +3,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -86,19 +85,17 @@
['2011', 'Q4', 'Italy', 335],
];
$spreadsheet->getActiveSheet()->fromArray($dataArray, null, 'A2');
-$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, false, true));
// Set title row bold
$helper->log('Set title row bold');
$spreadsheet->getActiveSheet()->getStyle('A1:D1')->getFont()->setBold(true);
// Set autofilter
-$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();
-$helper->log("Set autofilter for cells {$filterRange}");
-// Always include the complete filter range if you can!
+$helper->log('Set autofilter');
+// Always include the complete filter range!
// Excel does support setting only the caption
// row, but that's not a best practise...
-$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);
+$spreadsheet->getActiveSheet()->setAutoFilter($spreadsheet->getActiveSheet()->calculateWorksheetDimension());
// Save
-$helper->write($spreadsheet, __FILE__, ['Xlsx']);
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Autofilter/10_Autofilter_dynamic_dates.php b/samples/Autofilter/10_Autofilter_dynamic_dates.php
deleted file mode 100644
index 54ec63b018..0000000000
--- a/samples/Autofilter/10_Autofilter_dynamic_dates.php
+++ /dev/null
@@ -1,112 +0,0 @@
-log('Add data');
-
- $sheet = $spreadsheet->createSheet();
- $sheet->setTitle($rule);
- $sheet->getCell('A1')->setValue('Date');
- $row = 1;
- $date = new DateTime();
- $year = (int) $date->format('Y');
- $month = (int) $date->format('m');
- $day = (int) $date->format('d');
- $yearMinus2 = $year - 2;
- $sheet->getCell('B1')->setValue("=DATE($year, $month, $day)");
- // Each day for two weeks before today through 2 weeks after
- for ($dayOffset = -14; $dayOffset < 14; ++$dayOffset) {
- ++$row;
- $sheet->getCell("A$row")->setValue("=B1+($dayOffset)");
- }
- // First and last day of each month, starting with January 2 years before,
- // through December 2 years after.
- for ($monthOffset = 0; $monthOffset < 48; ++$monthOffset) {
- ++$row;
- $sheet->getCell("A$row")->setValue("=DATE($yearMinus2, $monthOffset, 1)");
- ++$row;
- $sheet->getCell("A$row")->setValue("=DATE($yearMinus2, $monthOffset + 1, 0)");
- }
- $sheet->getStyle("A2:A$row")->getNumberFormat()->setFormatCode('yyyy-mm-dd');
- $sheet->getStyle('B1')->getNumberFormat()->setFormatCode('yyyy-mm-dd');
- $sheet->getColumnDimension('A')->setAutoSize(true);
- $sheet->getColumnDimension('B')->setAutoSize(true);
-
- if ($displayInitialWorksheet) {
- $helper->log('Unfiltered Dates');
- $helper->displayGrid($sheet->toArray(null, true, true, true));
- }
-
- $helper->log("Filter for $rule");
- $autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
- $autoFilter->setRange("A1:A{$row}");
- $columnFilter = $autoFilter->getColumn('A');
- $columnFilter->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);
- $columnFilter->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '', $rule)
- ->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);
- $sheet->setSelectedCell('B1');
-
- $helper->log('Execute filtering (apply the filter rules)');
- $autoFilter->showHideRows();
-
- $helper->log('Filtered Dates');
- $helper->displayGrid($sheet->toArray(null, true, true, true, true));
-}
-
-// Create new Spreadsheet object
-/** @var Sample $helper */
-$helper->log('Create new Spreadsheet object');
-$spreadsheet = new Spreadsheet();
-
-// Set document properties
-$helper->log('Set document properties');
-$spreadsheet->getProperties()->setCreator('Owen Leibman')
- ->setLastModifiedBy('Owen Leibman')
- ->setTitle('PhpSpreadsheet Test Document')
- ->setSubject('PhpSpreadsheet Test Document')
- ->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')
- ->setKeywords('office PhpSpreadsheet php')
- ->setCategory('Test result file');
-
-$ruleNames = [
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2,
- Rule::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3,
-];
-
-// Create the worksheets
-foreach ($ruleNames as $index => $ruleName) {
- createSheet($helper, $spreadsheet, $ruleName, $index === 0);
-}
-$spreadsheet->removeSheetByIndex(0);
-$spreadsheet->setActiveSheetIndex(0);
-// Save
-$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Autofilter/10_Autofilter_selection_1.php b/samples/Autofilter/10_Autofilter_selection_1.php
index ce1bcd435e..30efc19411 100644
--- a/samples/Autofilter/10_Autofilter_selection_1.php
+++ b/samples/Autofilter/10_Autofilter_selection_1.php
@@ -7,7 +7,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -32,8 +31,7 @@
->setCellValue('D1', 'Date')
->setCellValue('E1', 'Sales Value')
->setCellValue('F1', 'Expenditure');
-$dateTime = new DateTime();
-$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');
+$startYear = $endYear = $currentYear = date('Y');
--$startYear;
++$endYear;
@@ -54,27 +52,25 @@
foreach ($years as $year) {
foreach ($periods as $period) {
foreach ($countries as $country) {
- $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);
- $dateTime = new DateTime($dateString);
- $endDays = (int) $dateTime->format('t');
+ $endDays = date('t', mktime(0, 0, 0, $period, 1, $year));
for ($i = 1; $i <= $endDays; ++$i) {
$eDate = Date::formattedPHPToExcel(
$year,
$period,
$i
);
- $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $value = rand(500, 1000) * (1 + rand(-0.25, +0.25));
$salesValue = $invoiceValue = null;
- $incomeOrExpenditure = mt_rand(-1, 1);
+ $incomeOrExpenditure = rand(-1, 1);
if ($incomeOrExpenditure == -1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
$income = null;
} elseif ($incomeOrExpenditure == 1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
} else {
$expenditure = null;
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
}
$dataArray = [$year,
$period,
@@ -96,47 +92,42 @@
$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);
$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);
-$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);
+$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$spreadsheet->getActiveSheet()->freezePane('A2');
-$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));
-
// Set autofilter range
-$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();
-$helper->log("Set autofilter for cells {$filterRange}");
-// Always include the complete filter range if you can!
-// Excel does support setting only the caption row, but that's not a best practise...
-$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);
+$helper->log('Set autofilter range');
+// Always include the complete filter range!
+// Excel does support setting only the caption
+// row, but that's not a best practise...
+$spreadsheet->getActiveSheet()->setAutoFilter($spreadsheet->getActiveSheet()->calculateWorksheetDimension());
// Set active filters
$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
$helper->log('Set active filters');
-
// Filter the Country column on a filter value of countries beginning with the letter U (or Japan)
// We use * as a wildcard, so specify as U* and using a wildcard requires customFilter
$autoFilter->getColumn('C')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'u*')
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ 'u*'
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-
-$helper->log('Set country code filter (Column C) to countries beginning with "U" ("United States" and "UK")');
-
$autoFilter->getColumn('C')
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'japan')
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ 'japan'
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-
-$helper->log('Add "Japan" to the country code filter (Column C)');
-
-// Filter the Date column on a filter value of the last day of every period of the current year
-// We use a dateGroup ruletype for this, although it is still a standard filter
+// Filter the Date column on a filter value of the first day of every period of the current year
+// We us a dateGroup ruletype for this, although it is still a standard filter
foreach ($periods as $period) {
- $dateString = sprintf('%04d-%02d-01T00:00:00', $currentYear, $period);
- $dateTime = new DateTime($dateString);
- $endDate = (int) $dateTime->format('t');
+ $endDate = date('t', mktime(0, 0, 0, $period, 1, $currentYear));
$autoFilter->getColumn('D')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)
@@ -151,20 +142,15 @@
)
->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP);
}
-
-$helper->log('Add filter on the Date (Column D) to display only rows for the last day of each month');
-
// Display only sales values that are blank
-// Standard filter, operator equals, and value of NULL or empty space
+// Standard filter, operator equals, and value of NULL
$autoFilter->getColumn('E')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '');
-
-$helper->log('Add filter on Sales Values (Column E) to display only blank values');
-
-$helper->log('NOTE: We don\'t apply the filter rules in this example, so we can\'t see the result here; although Excel will apply the rules when the file is loaded');
-$helper->log('See 10_Autofilter_selection_display.php for an example that actually executes the filter rules');
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ ''
+ );
// Save
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Autofilter/10_Autofilter_selection_2.php b/samples/Autofilter/10_Autofilter_selection_2.php
index 456f149f08..1520c972b3 100644
--- a/samples/Autofilter/10_Autofilter_selection_2.php
+++ b/samples/Autofilter/10_Autofilter_selection_2.php
@@ -7,7 +7,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -32,8 +31,7 @@
->setCellValue('D1', 'Date')
->setCellValue('E1', 'Sales Value')
->setCellValue('F1', 'Expenditure');
-$dateTime = new DateTime();
-$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');
+$startYear = $endYear = $currentYear = date('Y');
--$startYear;
++$endYear;
@@ -54,27 +52,25 @@
foreach ($years as $year) {
foreach ($periods as $period) {
foreach ($countries as $country) {
- $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);
- $dateTime = new DateTime($dateString);
- $endDays = (int) $dateTime->format('t');
+ $endDays = date('t', mktime(0, 0, 0, $period, 1, $year));
for ($i = 1; $i <= $endDays; ++$i) {
$eDate = Date::formattedPHPToExcel(
$year,
$period,
$i
);
- $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $value = rand(500, 1000) * (1 + rand(-0.25, +0.25));
$salesValue = $invoiceValue = null;
- $incomeOrExpenditure = mt_rand(-1, 1);
+ $incomeOrExpenditure = rand(-1, 1);
if ($incomeOrExpenditure == -1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
$income = null;
} elseif ($incomeOrExpenditure == 1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
} else {
$expenditure = null;
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
}
$dataArray = [$year,
$period,
@@ -96,59 +92,57 @@
$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);
$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);
-$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);
+$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$spreadsheet->getActiveSheet()->freezePane('A2');
-$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));
-
// Set autofilter range
-$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();
-$helper->log("Set autofilter for cells {$filterRange}");
-// Always include the complete filter range if you can!
-// Excel does support setting only the caption row, but that's not a best practise...
-$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);
+$helper->log('Set autofilter range');
+// Always include the complete filter range!
+// Excel does support setting only the caption
+// row, but that's not a best practise...
+$spreadsheet->getActiveSheet()->setAutoFilter($spreadsheet->getActiveSheet()->calculateWorksheetDimension());
// Set active filters
$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
$helper->log('Set active filters');
-
// Filter the Country column on a filter value of Germany
// As it's just a simple value filter, we can use FILTERTYPE_FILTER
$autoFilter->getColumn('C')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'Germany');
-
-$helper->log('Set country code filter (Column C) to "Germany"');
-
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ 'Germany'
+ );
// Filter the Date column on a filter value of the year to date
$autoFilter->getColumn('D')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '', Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE)
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ null,
+ Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);
-
-$helper->log('Add filter on the Date (Column D) to display year to date');
-
// Display only sales values that are between 400 and 600
$autoFilter->getColumn('E')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 400)
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
+ 400
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-
$autoFilter->getColumn('E')
->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, 600)
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,
+ 600
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-$helper->log('Add filter on Sales Values (Column E) between 400 and 600');
-
-$helper->log('NOTE: We don\'t apply the filter rules in this example, so we can\'t see the result here; although Excel will apply the rules when the file is loaded');
-$helper->log('See 10_Autofilter_selection_display.php for an example that actually executes the filter rules inside PhpSpreadsheet');
-
// Save
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Autofilter/10_Autofilter_selection_display.php b/samples/Autofilter/10_Autofilter_selection_display.php
index c2d8f871c6..50986bfa5b 100644
--- a/samples/Autofilter/10_Autofilter_selection_display.php
+++ b/samples/Autofilter/10_Autofilter_selection_display.php
@@ -7,7 +7,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -32,8 +31,7 @@
->setCellValue('D1', 'Date')
->setCellValue('E1', 'Sales Value')
->setCellValue('F1', 'Expenditure');
-$dateTime = new DateTime();
-$startYear = $endYear = $currentYear = (int) $dateTime->format('Y');
+$startYear = $endYear = $currentYear = date('Y');
--$startYear;
++$endYear;
@@ -54,27 +52,25 @@
foreach ($years as $year) {
foreach ($periods as $period) {
foreach ($countries as $country) {
- $dateString = sprintf('%04d-%02d-01T00:00:00', $year, $period);
- $dateTime = new DateTime($dateString);
- $endDays = (int) $dateTime->format('t');
+ $endDays = date('t', mktime(0, 0, 0, $period, 1, $year));
for ($i = 1; $i <= $endDays; ++$i) {
$eDate = Date::formattedPHPToExcel(
$year,
$period,
$i
);
- $value = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $value = rand(500, 1000) * (1 + rand(-0.25, +0.25));
$salesValue = $invoiceValue = null;
- $incomeOrExpenditure = mt_rand(-1, 1);
+ $incomeOrExpenditure = rand(-1, 1);
if ($incomeOrExpenditure == -1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
$income = null;
} elseif ($incomeOrExpenditure == 1) {
- $expenditure = mt_rand(-1000, -500) * (1 + (mt_rand(-1, 1) / 4));
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $expenditure = rand(-500, -1000) * (1 + rand(-0.25, +0.25));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
} else {
$expenditure = null;
- $income = mt_rand(500, 1000) * (1 + (mt_rand(-1, 1) / 4));
+ $income = rand(500, 1000) * (1 + rand(-0.25, +0.25));
}
$dataArray = [$year,
$period,
@@ -96,19 +92,17 @@
$spreadsheet->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(true);
$spreadsheet->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$spreadsheet->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);
-$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_INTEGER);
+$spreadsheet->getActiveSheet()->getStyle('D2:D' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$spreadsheet->getActiveSheet()->getStyle('E2:F' . $row)->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$spreadsheet->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$spreadsheet->getActiveSheet()->freezePane('A2');
-$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true));
-
// Set autofilter range
-$filterRange = $spreadsheet->getActiveSheet()->calculateWorksheetDimension();
-$helper->log("Set autofilter for cells {$filterRange}");
-// Always include the complete filter range if you can!
-// Excel does support setting only the caption row, but that's not a best practise...
-$spreadsheet->getActiveSheet()->setAutoFilter($filterRange);
+$helper->log('Set autofilter range');
+// Always include the complete filter range!
+// Excel does support setting only the caption
+// row, but that's not a best practise...
+$spreadsheet->getActiveSheet()->setAutoFilter($spreadsheet->getActiveSheet()->calculateWorksheetDimension());
// Set active filters
$autoFilter = $spreadsheet->getActiveSheet()->getAutoFilter();
@@ -118,24 +112,22 @@
$autoFilter->getColumn('C')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'u*')
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ 'u*'
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-
-$helper->log('Set country code filter (Column C) to countries beginning with "U" ("United States" and "UK")');
-
$autoFilter->getColumn('C')
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, 'japan')
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ 'japan'
+ )
->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
-
-$helper->log('Add "Japan" to the country code filter (Column C)');
-
-// Filter the Date column on a filter value of the last day of every period of the current year
+// Filter the Date column on a filter value of the first day of every period of the current year
// We us a dateGroup ruletype for this, although it is still a standard filter
foreach ($periods as $period) {
- $dateString = sprintf('%04d-%02d-01T00:00:00', $currentYear, $period);
- $dateTime = new DateTime($dateString);
- $endDate = (int) $dateTime->format('t');
+ $endDate = date('t', mktime(0, 0, 0, $period, 1, $currentYear));
$autoFilter->getColumn('D')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)
@@ -150,20 +142,18 @@
)
->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP);
}
-
-$helper->log('Add filter on the Date (Column D) to display only rows for the last day of each month');
-
// Display only sales values that are blank
// Standard filter, operator equals, and value of NULL
$autoFilter->getColumn('E')
->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
- ->setRule(Rule::AUTOFILTER_COLUMN_RULE_EQUAL, '');
-
-$helper->log('Add filter on Sales Values (Column E) to display only blank values');
+ ->setRule(
+ Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ ''
+ );
// Execute filtering
-$helper->log('Execute filtering (apply the filter rules)');
+$helper->log('Execute filtering');
$autoFilter->showHideRows();
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
@@ -171,5 +161,10 @@
// Display Results of filtering
$helper->log('Display filtered rows');
-
-$helper->displayGrid($spreadsheet->getActiveSheet()->toArray(null, false, true, true, true));
+foreach ($spreadsheet->getActiveSheet()->getRowIterator() as $row) {
+ if ($spreadsheet->getActiveSheet()->getRowDimension($row->getRowIndex())->getVisible()) {
+ $helper->log(' Row number - ' . $row->getRowIndex());
+ $helper->log($spreadsheet->getActiveSheet()->getCell('C' . $row->getRowIndex())->getValue());
+ $helper->log($spreadsheet->getActiveSheet()->getCell('D' . $row->getRowIndex())->getFormattedValue());
+ }
+}
diff --git a/samples/Basic/01_Simple.php b/samples/Basic/01_Simple.php
index c61c1d660c..89aca6d056 100644
--- a/samples/Basic/01_Simple.php
+++ b/samples/Basic/01_Simple.php
@@ -3,7 +3,8 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
+$spreadsheet = new Spreadsheet();
$helper->log('Create new Spreadsheet object');
$spreadsheet = new Spreadsheet();
@@ -61,4 +62,4 @@
->setTitle('Simple');
// Save
-$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Ods']);
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic/01_Simple_download_ods.php b/samples/Basic/01_Simple_download_ods.php
index 98b5ca1966..0c38a0048c 100644
--- a/samples/Basic/01_Simple_download_ods.php
+++ b/samples/Basic/01_Simple_download_ods.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
-require_once __DIR__ . '/../Bootstrap.php';
+require_once __DIR__ . '/../../src/Bootstrap.php';
$helper = new Sample();
if ($helper->isCli()) {
diff --git a/samples/Basic/01_Simple_download_pdf.php b/samples/Basic/01_Simple_download_pdf.php
index 424bc2cab4..5f3e71d785 100644
--- a/samples/Basic/01_Simple_download_pdf.php
+++ b/samples/Basic/01_Simple_download_pdf.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
-require_once __DIR__ . '/../Bootstrap.php';
+require_once __DIR__ . '/../../src/Bootstrap.php';
$helper = new Sample();
if ($helper->isCli()) {
@@ -44,7 +44,7 @@
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$spreadsheet->setActiveSheetIndex(0);
-IOFactory::registerWriter('Pdf', PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class);
+IOFactory::registerWriter('Pdf', \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class);
// Redirect output to a client’s web browser (PDF)
header('Content-Type: application/pdf');
diff --git a/samples/Basic/01_Simple_download_xls.php b/samples/Basic/01_Simple_download_xls.php
index a7df25c486..46d1202221 100644
--- a/samples/Basic/01_Simple_download_xls.php
+++ b/samples/Basic/01_Simple_download_xls.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
-require_once __DIR__ . '/../Bootstrap.php';
+require_once __DIR__ . '/../../src/Bootstrap.php';
$helper = new Sample();
if ($helper->isCli()) {
diff --git a/samples/Basic/01_Simple_download_xlsx.php b/samples/Basic/01_Simple_download_xlsx.php
index c67a17d065..93efe73df1 100644
--- a/samples/Basic/01_Simple_download_xlsx.php
+++ b/samples/Basic/01_Simple_download_xlsx.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
-require_once __DIR__ . '/../Bootstrap.php';
+require_once __DIR__ . '/../../src/Bootstrap.php';
$helper = new Sample();
if ($helper->isCli()) {
diff --git a/samples/Basic/02_Types.php b/samples/Basic/02_Types.php
index caf6d7a1cc..79f109f510 100644
--- a/samples/Basic/02_Types.php
+++ b/samples/Basic/02_Types.php
@@ -1,6 +1,5 @@
log('Create new Spreadsheet object');
@@ -82,7 +80,7 @@
$spreadsheet->getActiveSheet()
->getStyle('C9')
->getNumberFormat()
- ->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD);
+ ->setFormatCode(NumberFormat::FORMAT_DATE_YYYYMMDD2);
$spreadsheet->getActiveSheet()
->setCellValue('A10', 'Date/Time')
@@ -110,9 +108,9 @@
$richText->createText('ä½ å¥½ ');
$payable = $richText->createTextRun('ä½ å¥½ å—?');
-$payable->getFontOrThrow()->setBold(true);
-$payable->getFontOrThrow()->setItalic(true);
-$payable->getFontOrThrow()->setColor(new Color(Color::COLOR_DARKGREEN));
+$payable->getFont()->setBold(true);
+$payable->getFont()->setItalic(true);
+$payable->getFont()->setColor(new Color(Color::COLOR_DARKGREEN));
$richText->createText(', unless specified otherwise on the invoice.');
@@ -124,7 +122,7 @@
$richText2->createText("black text\n");
$red = $richText2->createTextRun('red text');
-$red->getFontOrThrow()->setColor(new Color(Color::COLOR_RED));
+$red->getFont()->setColor(new Color(Color::COLOR_RED));
$spreadsheet->getActiveSheet()
->getCell('C14')
@@ -142,16 +140,9 @@
->getHyperlink()
->setUrl('https://github.com/PHPOffice/PhpSpreadsheet')
->setTooltip('Navigate to PhpSpreadsheet website');
-$spreadsheet->getActiveSheet()->getStyle('C17')->getFont()->setHyperlinkTheme();
$spreadsheet->getActiveSheet()
->setCellValue('C18', '=HYPERLINK("mailto:abc@def.com","abc@def.com")');
-$spreadsheet->getActiveSheet()->getStyle('C18')->getFont()->setHyperlinkTheme();
-
-$spreadsheet->getActiveSheet()
- ->setCellValue('A20', 'String')
- ->setCellValue('B20', 'inline')
- ->setCellValueExplicit('C20', 'This will not be added to sharedStrings.xml', DataType::TYPE_INLINE);
$spreadsheet->getActiveSheet()
->getColumnDimension('B')
diff --git a/samples/Basic/03_Formulas.php b/samples/Basic/03_Formulas.php
index 4d8aaf4d4a..e45382310b 100644
--- a/samples/Basic/03_Formulas.php
+++ b/samples/Basic/03_Formulas.php
@@ -3,7 +3,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -29,38 +28,38 @@
->setCellValue('B3', 7)
->setCellValue('B4', 13)
->setCellValue('B5', '=SUM(B2:B4)');
-$helper->log('Sum of Range #1 is ' . $spreadsheet->getActiveSheet()->getCell('B5')->getCalculatedValueString());
+$helper->log('Sum of Range #1 is ' . $spreadsheet->getActiveSheet()->getCell('B5')->getCalculatedValue());
$spreadsheet->getActiveSheet()->setCellValue('C1', 'Range #2')
->setCellValue('C2', 5)
->setCellValue('C3', 11)
->setCellValue('C4', 17)
->setCellValue('C5', '=SUM(C2:C4)');
-$helper->log('Sum of Range #2 is ' . $spreadsheet->getActiveSheet()->getCell('C5')->getCalculatedValueString());
+$helper->log('Sum of Range #2 is ' . $spreadsheet->getActiveSheet()->getCell('C5')->getCalculatedValue());
$spreadsheet->getActiveSheet()
->setCellValue('A7', 'Total of both ranges:');
$spreadsheet->getActiveSheet()
->setCellValue('B7', '=SUM(B5:C5)');
-$helper->log('Sum of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B7')->getCalculatedValueString());
+$helper->log('Sum of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B7')->getCalculatedValue());
$spreadsheet->getActiveSheet()
->setCellValue('A8', 'Minimum of both ranges:');
$spreadsheet->getActiveSheet()
->setCellValue('B8', '=MIN(B2:C4)');
-$helper->log('Minimum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B8')->getCalculatedValueString());
+$helper->log('Minimum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B8')->getCalculatedValue());
$spreadsheet->getActiveSheet()
->setCellValue('A9', 'Maximum of both ranges:');
$spreadsheet->getActiveSheet()
->setCellValue('B9', '=MAX(B2:C4)');
-$helper->log('Maximum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B9')->getCalculatedValueString());
+$helper->log('Maximum value in either Range is ' . $spreadsheet->getActiveSheet()->getCell('B9')->getCalculatedValue());
$spreadsheet->getActiveSheet()
->setCellValue('A10', 'Average of both ranges:');
$spreadsheet->getActiveSheet()
->setCellValue('B10', '=AVERAGE(B2:C4)');
-$helper->log('Average value of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B10')->getCalculatedValueString());
+$helper->log('Average value of both Ranges is ' . $spreadsheet->getActiveSheet()->getCell('B10')->getCalculatedValue());
$spreadsheet->getActiveSheet()
->getColumnDimension('A')
->setAutoSize(true);
diff --git a/samples/Basic/04_Printing.php b/samples/Basic/04_Printing.php
index 936e01a01b..5e90fc9192 100644
--- a/samples/Basic/04_Printing.php
+++ b/samples/Basic/04_Printing.php
@@ -6,7 +6,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic/05_Feature_demo.php b/samples/Basic/05_Feature_demo.php
index 7557df1e51..a85ebbc27f 100644
--- a/samples/Basic/05_Feature_demo.php
+++ b/samples/Basic/05_Feature_demo.php
@@ -1,9 +1,7 @@
write($spreadsheet, __FILE__);
diff --git a/samples/Basic/05_UnexpectedCharacters.php b/samples/Basic/05_UnexpectedCharacters.php
deleted file mode 100644
index 1766c6fccf..0000000000
--- a/samples/Basic/05_UnexpectedCharacters.php
+++ /dev/null
@@ -1,9 +0,0 @@
-write($spreadsheet, __FILE__);
diff --git a/samples/Basic/06_Largescale.php b/samples/Basic/06_Largescale.php
index 4dc8d4d196..2e8a3e67ed 100644
--- a/samples/Basic/06_Largescale.php
+++ b/samples/Basic/06_Largescale.php
@@ -1,9 +1,8 @@
write($spreadsheet, __FILE__);
diff --git a/samples/Basic/07_Reader.php b/samples/Basic/07_Reader.php
index c0fa4b2d7d..4d9bd79e2f 100644
--- a/samples/Basic/07_Reader.php
+++ b/samples/Basic/07_Reader.php
@@ -6,9 +6,7 @@
require __DIR__ . '/../Header.php';
// Create temporary file that will be read
-/** @var PhpOffice\PhpSpreadsheet\Spreadsheet */
$sampleSpreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
$filename = $helper->getTemporaryFilename();
$writer = new Xlsx($sampleSpreadsheet);
$writer->save($filename);
@@ -19,4 +17,3 @@
// Save
$helper->write($spreadsheet, __FILE__);
-unlink($filename);
diff --git a/samples/Basic/08_Conditional_formatting.php b/samples/Basic/08_Conditional_formatting.php
index 8bb6cc0861..2f54863214 100644
--- a/samples/Basic/08_Conditional_formatting.php
+++ b/samples/Basic/08_Conditional_formatting.php
@@ -7,7 +7,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -61,7 +60,7 @@
->addCondition('400');
$conditional1->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_YELLOW);
$conditional1->getStyle()->getFont()->setBold(true);
-$conditional1->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);
+$conditional1->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
$conditional2 = new Conditional();
$conditional2->setConditionType(Conditional::CONDITION_CELLIS)
@@ -69,7 +68,7 @@
->addCondition('0');
$conditional2->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_RED);
$conditional2->getStyle()->getFont()->setItalic(true);
-$conditional2->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);
+$conditional2->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
$conditional3 = new Conditional();
$conditional3->setConditionType(Conditional::CONDITION_CELLIS)
@@ -77,7 +76,7 @@
->addCondition('0');
$conditional3->getStyle()->getFont()->getColor()->setARGB(Color::COLOR_GREEN);
$conditional3->getStyle()->getFont()->setItalic(true);
-$conditional3->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_INTEGER);
+$conditional3->getStyle()->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
$conditionalStyles = $spreadsheet->getActiveSheet()->getStyle('B2')->getConditionalStyles();
$conditionalStyles[] = $conditional1;
diff --git a/samples/Basic/08_Conditional_formatting_2.php b/samples/Basic/08_Conditional_formatting_2.php
index 40b5e47c63..818cdd9f01 100644
--- a/samples/Basic/08_Conditional_formatting_2.php
+++ b/samples/Basic/08_Conditional_formatting_2.php
@@ -6,7 +6,6 @@
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic/09_Pagebreaks.php b/samples/Basic/09_Pagebreaks.php
index 7b81c77727..ab99a0790d 100644
--- a/samples/Basic/09_Pagebreaks.php
+++ b/samples/Basic/09_Pagebreaks.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic1/11_Documentsecurity.php b/samples/Basic/11_Documentsecurity.php
similarity index 80%
rename from samples/Basic1/11_Documentsecurity.php
rename to samples/Basic/11_Documentsecurity.php
index 567445a75d..ec537ab3f7 100644
--- a/samples/Basic1/11_Documentsecurity.php
+++ b/samples/Basic/11_Documentsecurity.php
@@ -3,7 +3,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -40,13 +39,10 @@
// Set sheet security
$helper->log('Set sheet security');
$spreadsheet->getActiveSheet()->getProtection()->setPassword('PhpSpreadsheet');
-// setSheet should be true in order to enable protection!
-$spreadsheet->getActiveSheet()->getProtection()->setSheet(true);
-// The following are set to false, i.e. user is allowed to
-// sort, insert rows, or format cells without unprotecting sheet.
-$spreadsheet->getActiveSheet()->getProtection()->setSort(false);
-$spreadsheet->getActiveSheet()->getProtection()->setInsertRows(false);
-$spreadsheet->getActiveSheet()->getProtection()->setFormatCells(false);
+$spreadsheet->getActiveSheet()->getProtection()->setSheet(true); // This should be enabled in order to enable any of the following!
+$spreadsheet->getActiveSheet()->getProtection()->setSort(true);
+$spreadsheet->getActiveSheet()->getProtection()->setInsertRows(true);
+$spreadsheet->getActiveSheet()->getProtection()->setFormatCells(true);
// Save
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic1/12_CellProtection.php b/samples/Basic/12_CellProtection.php
similarity index 96%
rename from samples/Basic1/12_CellProtection.php
rename to samples/Basic/12_CellProtection.php
index b30f7b0c98..8a1b2a0b60 100644
--- a/samples/Basic1/12_CellProtection.php
+++ b/samples/Basic/12_CellProtection.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Style\Protection;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic1/13_Calculation.php b/samples/Basic/13_Calculation.php
similarity index 96%
rename from samples/Basic1/13_Calculation.php
rename to samples/Basic/13_Calculation.php
index 3fcf808c66..087b443fe5 100644
--- a/samples/Basic1/13_Calculation.php
+++ b/samples/Basic/13_Calculation.php
@@ -6,7 +6,6 @@
mt_srand(1234567890);
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// List functions
$helper->log('List implemented functions');
@@ -158,12 +157,9 @@
$helper->log('Calculated data');
for ($col = 'B'; $col != 'G'; ++$col) {
for ($row = 14; $row <= 41; ++$row) {
- $formula = $spreadsheet->getActiveSheet()->getCell($col . $row)->getValue();
- if (
- is_string($formula)
- && ($formula[0] == '=')
- ) {
- $helper->log('Value of ' . $col . $row . ' [' . $formula . ']: ' . $spreadsheet->getActiveSheet()->getCell($col . $row)->getCalculatedValueString());
+ if ((($formula = $spreadsheet->getActiveSheet()->getCell($col . $row)->getValue()) !== null) &&
+ ($formula[0] == '=')) {
+ $helper->log('Value of ' . $col . $row . ' [' . $formula . ']: ' . $spreadsheet->getActiveSheet()->getCell($col . $row)->getCalculatedValue());
}
}
}
diff --git a/samples/Basic/13_CalculationCyclicFormulae.php b/samples/Basic/13_CalculationCyclicFormulae.php
new file mode 100644
index 0000000000..26e9784db4
--- /dev/null
+++ b/samples/Basic/13_CalculationCyclicFormulae.php
@@ -0,0 +1,33 @@
+log('Create new Spreadsheet object');
+$spreadsheet = new Spreadsheet();
+
+// Add some data, we will use some formulas here
+$helper->log('Add some data and formulas');
+$spreadsheet->getActiveSheet()->setCellValue('A1', '=B1')
+ ->setCellValue('A2', '=B2+1')
+ ->setCellValue('B1', '=A1+1')
+ ->setCellValue('B2', '=A2');
+
+Calculation::getInstance($spreadsheet)->cyclicFormulaCount = 100;
+
+// Calculated data
+$helper->log('Calculated data');
+for ($row = 1; $row <= 2; ++$row) {
+ for ($col = 'A'; $col != 'C'; ++$col) {
+ if ((($formula = $spreadsheet->getActiveSheet()->getCell($col . $row)->getValue()) !== null) &&
+ ($formula[0] == '=')) {
+ $helper->log('Value of ' . $col . $row . ' [' . $formula . ']: ' . $spreadsheet->getActiveSheet()->getCell($col . $row)->getCalculatedValue());
+ }
+ }
+}
+
+// Save
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic1/14_Xls.php b/samples/Basic/14_Xls.php
similarity index 77%
rename from samples/Basic1/14_Xls.php
rename to samples/Basic/14_Xls.php
index 3750f3c368..ce27eb8cd0 100644
--- a/samples/Basic1/14_Xls.php
+++ b/samples/Basic/14_Xls.php
@@ -3,10 +3,8 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Spreadsheet */
$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
$filename = $helper->getFilename(__FILE__, 'xls');
$writer = IOFactory::createWriter($spreadsheet, 'Xls');
diff --git a/samples/Basic1/15_Datavalidation.php b/samples/Basic/15_Datavalidation.php
similarity index 96%
rename from samples/Basic1/15_Datavalidation.php
rename to samples/Basic/15_Datavalidation.php
index 619d03235b..fb76b4dc2d 100644
--- a/samples/Basic1/15_Datavalidation.php
+++ b/samples/Basic/15_Datavalidation.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -48,8 +47,8 @@
$validation->setError('Only numbers between 10 and 20 are allowed!');
$validation->setPromptTitle('Allowed input');
$validation->setPrompt('Only numbers between 10 and 20 are allowed.');
-$validation->setFormula1('10');
-$validation->setFormula2('20');
+$validation->setFormula1(10);
+$validation->setFormula2(20);
$validation = $spreadsheet->getActiveSheet()->getCell('B5')->getDataValidation();
$validation->setType(DataValidation::TYPE_LIST);
diff --git a/samples/Basic/16_Csv.php b/samples/Basic/16_Csv.php
new file mode 100644
index 0000000000..ceb8b2f5c2
--- /dev/null
+++ b/samples/Basic/16_Csv.php
@@ -0,0 +1,38 @@
+log('Write to CSV format');
+$writer = IOFactory::createWriter($spreadsheet, 'Csv')->setDelimiter(',')
+ ->setEnclosure('"')
+ ->setSheetIndex(0);
+
+$callStartTime = microtime(true);
+$filename = $helper->getTemporaryFilename('csv');
+$writer->save($filename);
+$helper->logWrite($writer, $filename, $callStartTime);
+
+$helper->log('Read from CSV format');
+
+$reader = IOFactory::createReader('Csv')->setDelimiter(',')
+ ->setEnclosure('"')
+ ->setSheetIndex(0);
+
+$callStartTime = microtime(true);
+$spreadsheetFromCSV = $reader->load($filename);
+$helper->logRead('Csv', $filename, $callStartTime);
+
+// Write Xlsx
+$helper->write($spreadsheetFromCSV, __FILE__, ['Xlsx']);
+
+// Write CSV
+$filenameCSV = $helper->getFilename(__FILE__, 'csv');
+$writerCSV = IOFactory::createWriter($spreadsheetFromCSV, 'Csv');
+$writerCSV->setExcelCompatibility(true);
+
+$callStartTime = microtime(true);
+$writerCSV->save($filenameCSV);
+$helper->logWrite($writerCSV, $filenameCSV, $callStartTime);
diff --git a/samples/Basic/17_Html.php b/samples/Basic/17_Html.php
new file mode 100644
index 0000000000..b90b7212d0
--- /dev/null
+++ b/samples/Basic/17_Html.php
@@ -0,0 +1,13 @@
+getFilename(__FILE__, 'html');
+$writer = IOFactory::createWriter($spreadsheet, 'Html');
+
+$callStartTime = microtime(true);
+$writer->save($filename);
+$helper->logWrite($writer, $filename, $callStartTime);
diff --git a/samples/Basic1/18_Extendedcalculation.php b/samples/Basic/18_Extendedcalculation.php
similarity index 95%
rename from samples/Basic1/18_Extendedcalculation.php
rename to samples/Basic/18_Extendedcalculation.php
index 5acc1a5942..c1ec2c0a43 100644
--- a/samples/Basic1/18_Extendedcalculation.php
+++ b/samples/Basic/18_Extendedcalculation.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// List functions
$helper->log('List implemented functions');
@@ -65,6 +64,6 @@
// Calculated data
$helper->log('Calculated data');
-$helper->log('Value of B14 [=COUNT(B2:B12)]: ' . $spreadsheet->getActiveSheet()->getCell('B14')->getCalculatedValueString());
+$helper->log('Value of B14 [=COUNT(B2:B12)]: ' . $spreadsheet->getActiveSheet()->getCell('B14')->getCalculatedValue());
$helper->logEndingNotes();
diff --git a/samples/Basic1/19_Namedrange.php b/samples/Basic/19_Namedrange.php
similarity index 85%
rename from samples/Basic1/19_Namedrange.php
rename to samples/Basic/19_Namedrange.php
index e4b79f995f..d89e1b04d9 100644
--- a/samples/Basic1/19_Namedrange.php
+++ b/samples/Basic/19_Namedrange.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -32,14 +31,11 @@
// Define named ranges
$helper->log('Define named ranges');
-$spreadsheet->addNamedRange(new NamedRange('PersonName', $spreadsheet->getActiveSheet(), '$B$1'));
-$spreadsheet->addNamedRange(new NamedRange('PersonLN', $spreadsheet->getActiveSheet(), '$B$2'));
+$spreadsheet->addNamedRange(new NamedRange('PersonName', $spreadsheet->getActiveSheet(), 'B1'));
+$spreadsheet->addNamedRange(new NamedRange('PersonLN', $spreadsheet->getActiveSheet(), 'B2'));
// Rename named ranges
$helper->log('Rename named ranges');
-if ($spreadsheet->getNamedRange('PersonName') === null) {
- throw new Exception('named range not found');
-}
$spreadsheet->getNamedRange('PersonName')->setName('PersonFN');
// Rename worksheet
@@ -62,9 +58,9 @@
// Resolve range
$helper->log('Resolve range');
-$helper->log('Cell B1 {=PersonFN}: ' . $spreadsheet->getActiveSheet()->getCell('B1')->getCalculatedValueString());
-$helper->log('Cell B3 {=PersonFN & " " & PersonLN}: ' . $spreadsheet->getActiveSheet()->getCell('B3')->getCalculatedValueString());
-$helper->log('Cell Person!B1: ' . $spreadsheet->getActiveSheet()->getCell('Person!B1')->getCalculatedValueString());
+$helper->log('Cell B1 {=PersonFN}: ' . $spreadsheet->getActiveSheet()->getCell('B1')->getCalculatedValue());
+$helper->log('Cell B3 {=PersonFN & " " & PersonLN}: ' . $spreadsheet->getActiveSheet()->getCell('B3')->getCalculatedValue());
+$helper->log('Cell Person!B1: ' . $spreadsheet->getActiveSheet()->getCell('Person!B1')->getCalculatedValue());
// Rename worksheet
$helper->log('Rename worksheet');
diff --git a/samples/Basic/20_Read_Excel2003XML.php b/samples/Basic/20_Read_Excel2003XML.php
new file mode 100644
index 0000000000..44425e20a5
--- /dev/null
+++ b/samples/Basic/20_Read_Excel2003XML.php
@@ -0,0 +1,13 @@
+logRead('Xml', $filename, $callStartTime);
+
+// Save
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic2/20_Read_Gnumeric.php b/samples/Basic/20_Read_Gnumeric.php
similarity index 84%
rename from samples/Basic2/20_Read_Gnumeric.php
rename to samples/Basic/20_Read_Gnumeric.php
index 76b5e30254..2d6ce2215a 100644
--- a/samples/Basic2/20_Read_Gnumeric.php
+++ b/samples/Basic/20_Read_Gnumeric.php
@@ -3,7 +3,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$filename = __DIR__ . '/../templates/GnumericTest.gnumeric';
$callStartTime = microtime(true);
$spreadsheet = IOFactory::load($filename);
diff --git a/samples/Basic2/20_Read_Ods.php b/samples/Basic/20_Read_Ods.php
similarity index 84%
rename from samples/Basic2/20_Read_Ods.php
rename to samples/Basic/20_Read_Ods.php
index e9ec14f36f..64f54827b8 100644
--- a/samples/Basic2/20_Read_Ods.php
+++ b/samples/Basic/20_Read_Ods.php
@@ -3,7 +3,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$filename = __DIR__ . '/../templates/OOCalcTest.ods';
$callStartTime = microtime(true);
$spreadsheet = IOFactory::load($filename);
diff --git a/samples/Basic2/20_Read_Sylk.php b/samples/Basic/20_Read_Sylk.php
similarity index 84%
rename from samples/Basic2/20_Read_Sylk.php
rename to samples/Basic/20_Read_Sylk.php
index 12a3259191..1a0645938a 100644
--- a/samples/Basic2/20_Read_Sylk.php
+++ b/samples/Basic/20_Read_Sylk.php
@@ -3,7 +3,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$filename = __DIR__ . '/../templates/SylkTest.slk';
$callStartTime = microtime(true);
$spreadsheet = IOFactory::load($filename);
diff --git a/samples/Basic2/20_Read_Xls.php b/samples/Basic/20_Read_Xls.php
similarity index 82%
rename from samples/Basic2/20_Read_Xls.php
rename to samples/Basic/20_Read_Xls.php
index 23d488c348..9e5fa014ad 100644
--- a/samples/Basic2/20_Read_Xls.php
+++ b/samples/Basic/20_Read_Xls.php
@@ -3,11 +3,10 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Spreadsheet */
+
$spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';
// Write temporary file
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
$filename = $helper->getTemporaryFilename('xls');
$writer = IOFactory::createWriter($spreadsheet, 'Xls');
$callStartTime = microtime(true);
@@ -18,7 +17,6 @@
$callStartTime = microtime(true);
$spreadsheet = IOFactory::load($filename);
$helper->logRead('Xls', $filename, $callStartTime);
-unlink($filename);
// Save
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic/22_Heavily_formatted.php b/samples/Basic/22_Heavily_formatted.php
new file mode 100644
index 0000000000..d7ba861bc8
--- /dev/null
+++ b/samples/Basic/22_Heavily_formatted.php
@@ -0,0 +1,48 @@
+log('Create new Spreadsheet object');
+$spreadsheet = new Spreadsheet();
+
+// Set document properties
+$helper->log('Set document properties');
+$spreadsheet->getProperties()->setCreator('Maarten Balliauw')
+ ->setLastModifiedBy('Maarten Balliauw')
+ ->setTitle('Office 2007 XLSX Test Document')
+ ->setSubject('Office 2007 XLSX Test Document')
+ ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')
+ ->setKeywords('office 2007 openxml php')
+ ->setCategory('Test result file');
+
+// Add some data
+$helper->log('Add some data');
+$spreadsheet->setActiveSheetIndex(0);
+
+$spreadsheet->getActiveSheet()->getStyle('A1:T100')->applyFromArray(
+ ['fill' => [
+ 'fillType' => Fill::FILL_SOLID,
+ 'color' => ['argb' => 'FFCCFFCC'],
+ ],
+ 'borders' => [
+ 'bottom' => ['borderStyle' => Border::BORDER_THIN],
+ 'right' => ['borderStyle' => Border::BORDER_MEDIUM],
+ ],
+ ]
+);
+
+$spreadsheet->getActiveSheet()->getStyle('C5:R95')->applyFromArray(
+ ['fill' => [
+ 'fillType' => Fill::FILL_SOLID,
+ 'color' => ['argb' => 'FFFFFF00'],
+ ],
+ ]
+);
+
+// Save
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic/23_Sharedstyles.php b/samples/Basic/23_Sharedstyles.php
new file mode 100644
index 0000000000..b5398883fb
--- /dev/null
+++ b/samples/Basic/23_Sharedstyles.php
@@ -0,0 +1,59 @@
+log('Create new Spreadsheet object');
+$spreadsheet = new Spreadsheet();
+
+// Set document properties
+$helper->log('Set document properties');
+$spreadsheet->getProperties()->setCreator('Maarten Balliauw')
+ ->setLastModifiedBy('Maarten Balliauw')
+ ->setTitle('Office 2007 XLSX Test Document')
+ ->setSubject('Office 2007 XLSX Test Document')
+ ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')
+ ->setKeywords('office 2007 openxml php')
+ ->setCategory('Test result file');
+
+// Add some data
+$helper->log('Add some data');
+$spreadsheet->setActiveSheetIndex(0);
+
+$sharedStyle1 = new Style();
+$sharedStyle2 = new Style();
+
+$sharedStyle1->applyFromArray(
+ ['fill' => [
+ 'fillType' => Fill::FILL_SOLID,
+ 'color' => ['argb' => 'FFCCFFCC'],
+ ],
+ 'borders' => [
+ 'bottom' => ['borderStyle' => Border::BORDER_THIN],
+ 'right' => ['borderStyle' => Border::BORDER_MEDIUM],
+ ],
+ ]
+);
+
+$sharedStyle2->applyFromArray(
+ ['fill' => [
+ 'fillType' => Fill::FILL_SOLID,
+ 'color' => ['argb' => 'FFFFFF00'],
+ ],
+ 'borders' => [
+ 'bottom' => ['borderStyle' => Border::BORDER_THIN],
+ 'right' => ['borderStyle' => Border::BORDER_MEDIUM],
+ ],
+ ]
+);
+
+$spreadsheet->getActiveSheet()->duplicateStyle($sharedStyle1, 'A1:T100');
+$spreadsheet->getActiveSheet()->duplicateStyle($sharedStyle2, 'C5:R95');
+
+// Save
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic2/24_Readfilter.php b/samples/Basic/24_Readfilter.php
similarity index 80%
rename from samples/Basic2/24_Readfilter.php
rename to samples/Basic/24_Readfilter.php
index f0e29ad8b7..844996f249 100644
--- a/samples/Basic2/24_Readfilter.php
+++ b/samples/Basic/24_Readfilter.php
@@ -3,16 +3,13 @@
namespace PhpOffice\PhpSpreadsheet;
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
-use PhpOffice\PhpSpreadsheet\Reader\Xlsx as XlsxReader;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
require __DIR__ . '/../Header.php';
// Write temporary file
-/** @var Spreadsheet */
$largeSpreadsheet = require __DIR__ . '/../templates/largeSpreadsheet.php';
$writer = new Xlsx($largeSpreadsheet);
-/** @var Helper\Sample $helper */
$filename = $helper->getTemporaryFilename();
$callStartTime = microtime(true);
$writer->save($filename);
@@ -20,7 +17,7 @@
class MyReadFilter implements IReadFilter
{
- public function readCell(string $columnAddress, int $row, string $worksheetName = ''): bool
+ public function readCell($column, $row, $worksheetName = '')
{
// Read title row and rows 20 - 30
if ($row == 1 || ($row >= 20 && $row <= 30)) {
@@ -32,11 +29,10 @@ public function readCell(string $columnAddress, int $row, string $worksheetName
}
$helper->log('Load from Xlsx file');
-$reader = new XlsxReader();
+$reader = IOFactory::createReader('Xlsx');
$reader->setReadFilter(new MyReadFilter());
$callStartTime = microtime(true);
$spreadsheet = $reader->load($filename);
-unlink($filename);
$helper->logRead('Xlsx', $filename, $callStartTime);
$helper->log('Remove unnecessary rows');
$spreadsheet->getActiveSheet()->removeRow(2, 18);
diff --git a/samples/Basic/25_In_memory_image.php b/samples/Basic/25_In_memory_image.php
new file mode 100644
index 0000000000..a897486dfd
--- /dev/null
+++ b/samples/Basic/25_In_memory_image.php
@@ -0,0 +1,40 @@
+log('Create new Spreadsheet object');
+$spreadsheet = new Spreadsheet();
+
+// Set document properties
+$helper->log('Set document properties');
+$spreadsheet->getProperties()->setCreator('Maarten Balliauw')
+ ->setLastModifiedBy('Maarten Balliauw')
+ ->setTitle('Office 2007 XLSX Test Document')
+ ->setSubject('Office 2007 XLSX Test Document')
+ ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')
+ ->setKeywords('office 2007 openxml php')
+ ->setCategory('Test result file');
+
+// Generate an image
+$helper->log('Generate an image');
+$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream');
+$textColor = imagecolorallocate($gdImage, 255, 255, 255);
+imagestring($gdImage, 1, 5, 5, 'Created with PhpSpreadsheet', $textColor);
+
+// Add a drawing to the worksheet
+$helper->log('Add a drawing to the worksheet');
+$drawing = new MemoryDrawing();
+$drawing->setName('Sample image');
+$drawing->setDescription('Sample image');
+$drawing->setImageResource($gdImage);
+$drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG);
+$drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT);
+$drawing->setHeight(36);
+$drawing->setWorksheet($spreadsheet->getActiveSheet());
+
+// Save
+$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Html']);
diff --git a/samples/Basic/26_Utf8.php b/samples/Basic/26_Utf8.php
new file mode 100644
index 0000000000..af048246d3
--- /dev/null
+++ b/samples/Basic/26_Utf8.php
@@ -0,0 +1,39 @@
+log('Load Xlsx template file');
+$reader = IOFactory::createReader('Xlsx');
+$spreadsheet = $reader->load(__DIR__ . '/../templates/26template.xlsx');
+
+// at this point, we could do some manipulations with the template, but we skip this step
+$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Html']);
+
+// Export to PDF (.pdf)
+$helper->log('Write to PDF format');
+IOFactory::registerWriter('Pdf', \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class);
+$helper->write($spreadsheet, __FILE__, ['Pdf']);
+
+// Remove first two rows with field headers before exporting to CSV
+$helper->log('Removing first two heading rows for CSV export');
+$worksheet = $spreadsheet->getActiveSheet();
+$worksheet->removeRow(1, 2);
+
+// Export to CSV (.csv)
+$helper->log('Write to CSV format');
+$writer = IOFactory::createWriter($spreadsheet, 'Csv');
+$filename = $helper->getFilename(__FILE__, 'csv');
+$callStartTime = microtime(true);
+$writer->save($filename);
+$helper->logWrite($writer, $filename, $callStartTime);
+
+// Export to CSV with BOM (.csv)
+$filename = str_replace('.csv', '-bom.csv', $filename);
+$helper->log('Write to CSV format (with BOM)');
+$writer->setUseBOM(true);
+$callStartTime = microtime(true);
+$writer->save($filename);
+$helper->logWrite($writer, $filename, $callStartTime);
diff --git a/samples/Basic/27_Images_Xls.php b/samples/Basic/27_Images_Xls.php
new file mode 100644
index 0000000000..4c20a9ac8b
--- /dev/null
+++ b/samples/Basic/27_Images_Xls.php
@@ -0,0 +1,13 @@
+log('Load Xlsx template file');
+$reader = IOFactory::createReader('Xls');
+$spreadsheet = $reader->load(__DIR__ . '/../templates/27template.xls');
+
+// Save
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic/28_Iterator.php b/samples/Basic/28_Iterator.php
new file mode 100644
index 0000000000..4aec7a9203
--- /dev/null
+++ b/samples/Basic/28_Iterator.php
@@ -0,0 +1,34 @@
+getTemporaryFilename();
+$writer = new Xlsx($sampleSpreadsheet);
+$callStartTime = microtime(true);
+$writer->save($filename);
+$helper->logWrite($writer, $filename, $callStartTime);
+
+$callStartTime = microtime(true);
+$reader = IOFactory::createReader('Xlsx');
+$spreadsheet = $reader->load($filename);
+$helper->logRead('Xlsx', $filename, $callStartTime);
+$helper->log('Iterate worksheets');
+foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {
+ $helper->log('Worksheet - ' . $worksheet->getTitle());
+
+ foreach ($worksheet->getRowIterator() as $row) {
+ $helper->log(' Row number - ' . $row->getRowIndex());
+
+ $cellIterator = $row->getCellIterator();
+ $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set
+ foreach ($cellIterator as $cell) {
+ if ($cell !== null) {
+ $helper->log(' Cell - ' . $cell->getCoordinate() . ' - ' . $cell->getCalculatedValue());
+ }
+ }
+ }
+}
diff --git a/samples/Basic2/29_Advanced_value_binder.php b/samples/Basic/29_Advanced_value_binder.php
similarity index 98%
rename from samples/Basic2/29_Advanced_value_binder.php
rename to samples/Basic/29_Advanced_value_binder.php
index 07e9dccb09..74c16c21a4 100644
--- a/samples/Basic2/29_Advanced_value_binder.php
+++ b/samples/Basic/29_Advanced_value_binder.php
@@ -5,7 +5,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Set timezone
$helper->log('Set timezone');
diff --git a/samples/Basic3/30_Template.php b/samples/Basic/30_Template.php
similarity index 91%
rename from samples/Basic3/30_Template.php
rename to samples/Basic/30_Template.php
index 246a44ab76..b70c18b610 100644
--- a/samples/Basic3/30_Template.php
+++ b/samples/Basic/30_Template.php
@@ -4,16 +4,16 @@
use PhpOffice\PhpSpreadsheet\Shared\Date;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$helper->log('Load from Xls template');
$reader = IOFactory::createReader('Xls');
$spreadsheet = $reader->load(__DIR__ . '/../templates/30template.xls');
$helper->log('Add new data to the template');
$data = [['title' => 'Excel for dummies',
- 'price' => 17.99,
- 'quantity' => 2,
-],
+ 'price' => 17.99,
+ 'quantity' => 2,
+ ],
['title' => 'PHP for dummies',
'price' => 15.99,
'quantity' => 1,
diff --git a/samples/Basic3/31_Document_properties_write.php b/samples/Basic/31_Document_properties_write.php
similarity index 94%
rename from samples/Basic3/31_Document_properties_write.php
rename to samples/Basic/31_Document_properties_write.php
index 20ba4860f1..dec3cc32a8 100644
--- a/samples/Basic3/31_Document_properties_write.php
+++ b/samples/Basic/31_Document_properties_write.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$inputFileType = 'Xlsx';
$inputFileName = __DIR__ . '/../templates/31docproperties.xlsx';
@@ -56,7 +56,7 @@
$propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);
$propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);
if ($propertyType == Properties::PROPERTY_TYPE_DATE) {
- $formattedValue = is_numeric($propertyValue) ? date('d-M-Y H:i:s', (int) $propertyValue) : '*****INVALID*****';
+ $formattedValue = date('d-M-Y H:i:s', $propertyValue);
} elseif ($propertyType == Properties::PROPERTY_TYPE_BOOLEAN) {
$formattedValue = $propertyValue ? 'TRUE' : 'FALSE';
} else {
diff --git a/samples/Basic3/31_Document_properties_write_xls.php b/samples/Basic/31_Document_properties_write_xls.php
similarity index 94%
rename from samples/Basic3/31_Document_properties_write_xls.php
rename to samples/Basic/31_Document_properties_write_xls.php
index 03ce3b400f..d58c318270 100644
--- a/samples/Basic3/31_Document_properties_write_xls.php
+++ b/samples/Basic/31_Document_properties_write_xls.php
@@ -4,7 +4,7 @@
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$inputFileType = 'Xls';
$inputFileName = __DIR__ . '/../templates/31docproperties.xls';
@@ -56,7 +56,7 @@
$propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty);
$propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty);
if ($propertyType == Properties::PROPERTY_TYPE_DATE) {
- $formattedValue = is_numeric($propertyValue) ? date('d-M-Y H:i:s', (int) $propertyValue) : '*****INVALID*****';
+ $formattedValue = date('d-M-Y H:i:s', $propertyValue);
} elseif ($propertyType == Properties::PROPERTY_TYPE_BOOLEAN) {
$formattedValue = $propertyValue ? 'TRUE' : 'FALSE';
} else {
diff --git a/samples/Basic3/37_Page_layout_view.php b/samples/Basic/37_Page_layout_view.php
similarity index 94%
rename from samples/Basic3/37_Page_layout_view.php
rename to samples/Basic/37_Page_layout_view.php
index e54ccf299b..d9bac80a87 100644
--- a/samples/Basic3/37_Page_layout_view.php
+++ b/samples/Basic/37_Page_layout_view.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Worksheet\SheetView;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic3/38_Clone_worksheet.php b/samples/Basic/38_Clone_worksheet.php
similarity index 96%
rename from samples/Basic3/38_Clone_worksheet.php
rename to samples/Basic/38_Clone_worksheet.php
index ce17a03c8c..83f2d9ce53 100644
--- a/samples/Basic3/38_Clone_worksheet.php
+++ b/samples/Basic/38_Clone_worksheet.php
@@ -3,7 +3,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
diff --git a/samples/Basic3/39_Dropdown.php b/samples/Basic/39_Dropdown.php
similarity index 86%
rename from samples/Basic3/39_Dropdown.php
rename to samples/Basic/39_Dropdown.php
index 398d7e3620..e34d73e6ae 100644
--- a/samples/Basic3/39_Dropdown.php
+++ b/samples/Basic/39_Dropdown.php
@@ -5,7 +5,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -21,9 +20,7 @@
->setDescription('Test document for PhpSpreadsheet, generated using PHP classes.')
->setKeywords('Office PhpSpreadsheet php')
->setCategory('Test result file');
-
-/** @return array */
-function transpose(string $value): array
+function transpose($value)
{
return [$value];
}
@@ -33,23 +30,23 @@ function transpose(string $value): array
$column = 'F';
// Set data for dropdowns
-$continents = glob(__DIR__ . '/data/continents/*') ?: [];
+$continents = glob(__DIR__ . '/data/continents/*');
foreach ($continents as $key => $filename) {
$continent = pathinfo($filename, PATHINFO_FILENAME);
$helper->log("Loading $continent");
$continent = str_replace(' ', '_', $continent);
- $countries = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];
+ $countries = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$countryCount = count($countries);
// Transpose $countries from a row to a column array
- $countries = array_map(fn (mixed $value): array => [$value], $countries);
+ $countries = array_map('transpose', $countries);
$spreadsheet->getActiveSheet()
->fromArray($countries, null, $column . '1');
$spreadsheet->addNamedRange(
new NamedRange(
$continent,
$spreadsheet->getActiveSheet(),
- '$' . $column . '$1:$' . $column . '$' . $countryCount
+ $column . '1:' . $column . $countryCount
)
);
$spreadsheet->getActiveSheet()
@@ -71,7 +68,7 @@ function transpose(string $value): array
new NamedRange(
'Continents',
$spreadsheet->getActiveSheet(),
- '$' . $continentColumn . '$1:$' . $continentColumn . '$' . count($continents)
+ $continentColumn . '1:' . $continentColumn . count($continents)
)
);
@@ -129,5 +126,4 @@ function transpose(string $value): array
$spreadsheet->getActiveSheet()->getColumnDimension('B')->setWidth(30);
// Save
-$helper->log('Not writing to Xls - formulae with defined names not yet supported');
-$helper->write($spreadsheet, __FILE__, ['Xlsx']);
+$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic4/40_Duplicate_style.php b/samples/Basic/40_Duplicate_style.php
similarity index 87%
rename from samples/Basic4/40_Duplicate_style.php
rename to samples/Basic/40_Duplicate_style.php
index deb365c2df..a2dc5f5f39 100644
--- a/samples/Basic4/40_Duplicate_style.php
+++ b/samples/Basic/40_Duplicate_style.php
@@ -5,7 +5,7 @@
use PhpOffice\PhpSpreadsheet\Style\Style;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
+
$helper->log('Create new Spreadsheet object');
$spreadsheet = new Spreadsheet();
$worksheet = $spreadsheet->getActiveSheet();
@@ -30,7 +30,7 @@
}
}
$d = microtime(true) - $t;
-$helper->log('Add data (end) . time: ' . (string) round($d, 2) . ' s');
+$helper->log('Add data (end) . time: ' . round($d . 2) . ' s');
// Save
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic4/41_Password.php b/samples/Basic/41_Password.php
similarity index 77%
rename from samples/Basic4/41_Password.php
rename to samples/Basic/41_Password.php
index 7523aa21a3..9aa8e6db9c 100644
--- a/samples/Basic4/41_Password.php
+++ b/samples/Basic/41_Password.php
@@ -1,7 +1,6 @@
getSecurity()->setWorkbookPassword('secret');
// Save
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
$helper->write($spreadsheet, __FILE__);
diff --git a/samples/Basic4/42_RichText.php b/samples/Basic/42_RichText.php
similarity index 95%
rename from samples/Basic4/42_RichText.php
rename to samples/Basic/42_RichText.php
index 4bd8d35662..43b35a62c1 100644
--- a/samples/Basic4/42_RichText.php
+++ b/samples/Basic/42_RichText.php
@@ -4,7 +4,6 @@
use PhpOffice\PhpSpreadsheet\Spreadsheet;
require __DIR__ . '/../Header.php';
-/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Create new Spreadsheet object
$helper->log('Create new Spreadsheet object');
@@ -31,7 +30,7 @@
while this block uses an underline.
-