summaryrefslogtreecommitdiffstats
path: root/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation')
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php5327
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php20
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php608
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php1651
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php73
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php140
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php2760
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php26
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php22
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php2475
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php631
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php150
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php658
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php390
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php968
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php1815
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php3906
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php675
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php149
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web.php53
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt395
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config27
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions417
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config23
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config25
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config8
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config23
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions408
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions408
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions416
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions408
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config24
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions416
56 files changed, 30359 insertions, 0 deletions
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
new file mode 100644
index 0000000..d1eb83b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
@@ -0,0 +1,5327 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack;
+use PhpOffice\PhpSpreadsheet\Calculation\Engine\Logger;
+use PhpOffice\PhpSpreadsheet\Calculation\Token\Stack;
+use PhpOffice\PhpSpreadsheet\Cell\Cell;
+use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
+use PhpOffice\PhpSpreadsheet\DefinedName;
+use PhpOffice\PhpSpreadsheet\ReferenceHelper;
+use PhpOffice\PhpSpreadsheet\Shared;
+use PhpOffice\PhpSpreadsheet\Spreadsheet;
+use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
+use ReflectionMethod;
+
+class Calculation
+{
+ /** Constants */
+ /** Regular Expressions */
+ // Numeric operand
+ const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?';
+ // String operand
+ const CALCULATION_REGEXP_STRING = '"(?:[^"]|"")*"';
+ // Opening bracket
+ const CALCULATION_REGEXP_OPENBRACE = '\(';
+ // Function (allow for the old @ symbol that could be used to prefix a function, but we'll ignore it)
+ const CALCULATION_REGEXP_FUNCTION = '@?(?:_xlfn\.)?([\p{L}][\p{L}\p{N}\.]*)[\s]*\(';
+ // Cell reference (cell or range of cells, with or without a sheet reference)
+ const CALCULATION_REGEXP_CELLREF = '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?\b([a-z]{1,3})\$?(\d{1,7})(?![\w.])';
+ // Cell reference (with or without a sheet reference) ensuring absolute/relative
+ const CALCULATION_REGEXP_CELLREF_RELATIVE = '((([^\s\(,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?(\$?\b[a-z]{1,3})(\$?\d{1,7})(?![\w.])';
+ // Cell ranges ensuring absolute/relative
+ const CALCULATION_REGEXP_COLUMNRANGE_RELATIVE = '(\$?[a-z]{1,3}):(\$?[a-z]{1,3})';
+ const CALCULATION_REGEXP_ROWRANGE_RELATIVE = '(\$?\d{1,7}):(\$?\d{1,7})';
+ // Defined Names: Named Range of cells, or Named Formulae
+ const CALCULATION_REGEXP_DEFINEDNAME = '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_\p{L}][_\p{L}\p{N}\.]*)';
+ // Error
+ const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?';
+
+ /** constants */
+ const RETURN_ARRAY_AS_ERROR = 'error';
+ const RETURN_ARRAY_AS_VALUE = 'value';
+ const RETURN_ARRAY_AS_ARRAY = 'array';
+
+ const FORMULA_OPEN_FUNCTION_BRACE = '{';
+ const FORMULA_CLOSE_FUNCTION_BRACE = '}';
+ const FORMULA_STRING_QUOTE = '"';
+
+ private static $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE;
+
+ /**
+ * Instance of this class.
+ *
+ * @var Calculation
+ */
+ private static $instance;
+
+ /**
+ * Instance of the spreadsheet this Calculation Engine is using.
+ *
+ * @var Spreadsheet
+ */
+ private $spreadsheet;
+
+ /**
+ * Calculation cache.
+ *
+ * @var array
+ */
+ private $calculationCache = [];
+
+ /**
+ * Calculation cache enabled.
+ *
+ * @var bool
+ */
+ private $calculationCacheEnabled = true;
+
+ /**
+ * Used to generate unique store keys.
+ *
+ * @var int
+ */
+ private $branchStoreKeyCounter = 0;
+
+ private $branchPruningEnabled = true;
+
+ /**
+ * List of operators that can be used within formulae
+ * The true/false value indicates whether it is a binary operator or a unary operator.
+ *
+ * @var array
+ */
+ private static $operators = [
+ '+' => true, '-' => true, '*' => true, '/' => true,
+ '^' => true, '&' => true, '%' => false, '~' => false,
+ '>' => true, '<' => true, '=' => true, '>=' => true,
+ '<=' => true, '<>' => true, '|' => true, ':' => true,
+ ];
+
+ /**
+ * List of binary operators (those that expect two operands).
+ *
+ * @var array
+ */
+ private static $binaryOperators = [
+ '+' => true, '-' => true, '*' => true, '/' => true,
+ '^' => true, '&' => true, '>' => true, '<' => true,
+ '=' => true, '>=' => true, '<=' => true, '<>' => true,
+ '|' => true, ':' => true,
+ ];
+
+ /**
+ * The debug log generated by the calculation engine.
+ *
+ * @var Logger
+ */
+ private $debugLog;
+
+ /**
+ * Flag to determine how formula errors should be handled
+ * If true, then a user error will be triggered
+ * If false, then an exception will be thrown.
+ *
+ * @var bool
+ */
+ public $suppressFormulaErrors = false;
+
+ /**
+ * Error message for any error that was raised/thrown by the calculation engine.
+ *
+ * @var string
+ */
+ public $formulaError;
+
+ /**
+ * Reference Helper.
+ *
+ * @var ReferenceHelper
+ */
+ private static $referenceHelper;
+
+ /**
+ * An array of the nested cell references accessed by the calculation engine, used for the debug log.
+ *
+ * @var CyclicReferenceStack
+ */
+ private $cyclicReferenceStack;
+
+ private $cellStack = [];
+
+ /**
+ * Current iteration counter for cyclic formulae
+ * If the value is 0 (or less) then cyclic formulae will throw an exception,
+ * otherwise they will iterate to the limit defined here before returning a result.
+ *
+ * @var int
+ */
+ private $cyclicFormulaCounter = 1;
+
+ private $cyclicFormulaCell = '';
+
+ /**
+ * Number of iterations for cyclic formulae.
+ *
+ * @var int
+ */
+ public $cyclicFormulaCount = 1;
+
+ /**
+ * Epsilon Precision used for comparisons in calculations.
+ *
+ * @var float
+ */
+ private $delta = 0.1e-12;
+
+ /**
+ * The current locale setting.
+ *
+ * @var string
+ */
+ private static $localeLanguage = 'en_us'; // US English (default locale)
+
+ /**
+ * List of available locale settings
+ * Note that this is read for the locale subdirectory only when requested.
+ *
+ * @var string[]
+ */
+ private static $validLocaleLanguages = [
+ 'en', // English (default language)
+ ];
+
+ /**
+ * Locale-specific argument separator for function arguments.
+ *
+ * @var string
+ */
+ private static $localeArgumentSeparator = ',';
+
+ private static $localeFunctions = [];
+
+ /**
+ * Locale-specific translations for Excel constants (True, False and Null).
+ *
+ * @var string[]
+ */
+ public static $localeBoolean = [
+ 'TRUE' => 'TRUE',
+ 'FALSE' => 'FALSE',
+ 'NULL' => 'NULL',
+ ];
+
+ /**
+ * Excel constant string translations to their PHP equivalents
+ * Constant conversion from text name/value to actual (datatyped) value.
+ *
+ * @var string[]
+ */
+ private static $excelConstants = [
+ 'TRUE' => true,
+ 'FALSE' => false,
+ 'NULL' => null,
+ ];
+
+ // PhpSpreadsheet functions
+ private static $phpSpreadsheetFunctions = [
+ 'ABS' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'abs',
+ 'argumentCount' => '1',
+ ],
+ 'ACCRINT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'ACCRINT'],
+ 'argumentCount' => '4-7',
+ ],
+ 'ACCRINTM' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'ACCRINTM'],
+ 'argumentCount' => '3-5',
+ ],
+ 'ACOS' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'acos',
+ 'argumentCount' => '1',
+ ],
+ 'ACOSH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'acosh',
+ 'argumentCount' => '1',
+ ],
+ 'ACOT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ACOT'],
+ 'argumentCount' => '1',
+ ],
+ 'ACOTH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ACOTH'],
+ 'argumentCount' => '1',
+ ],
+ 'ADDRESS' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'cellAddress'],
+ 'argumentCount' => '2-5',
+ ],
+ 'AGGREGATE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3+',
+ ],
+ 'AMORDEGRC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'AMORDEGRC'],
+ 'argumentCount' => '6,7',
+ ],
+ 'AMORLINC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'AMORLINC'],
+ 'argumentCount' => '6,7',
+ ],
+ 'AND' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'logicalAnd'],
+ 'argumentCount' => '1+',
+ ],
+ 'ARABIC' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ARABIC'],
+ 'argumentCount' => '1',
+ ],
+ 'AREAS' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'ASC' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'ASIN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'asin',
+ 'argumentCount' => '1',
+ ],
+ 'ASINH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'asinh',
+ 'argumentCount' => '1',
+ ],
+ 'ATAN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'atan',
+ 'argumentCount' => '1',
+ ],
+ 'ATAN2' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ATAN2'],
+ 'argumentCount' => '2',
+ ],
+ 'ATANH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'atanh',
+ 'argumentCount' => '1',
+ ],
+ 'AVEDEV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'AVEDEV'],
+ 'argumentCount' => '1+',
+ ],
+ 'AVERAGE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'AVERAGE'],
+ 'argumentCount' => '1+',
+ ],
+ 'AVERAGEA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'AVERAGEA'],
+ 'argumentCount' => '1+',
+ ],
+ 'AVERAGEIF' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'AVERAGEIF'],
+ 'argumentCount' => '2,3',
+ ],
+ 'AVERAGEIFS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3+',
+ ],
+ 'BAHTTEXT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'BASE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'BASE'],
+ 'argumentCount' => '2,3',
+ ],
+ 'BESSELI' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BESSELI'],
+ 'argumentCount' => '2',
+ ],
+ 'BESSELJ' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BESSELJ'],
+ 'argumentCount' => '2',
+ ],
+ 'BESSELK' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BESSELK'],
+ 'argumentCount' => '2',
+ ],
+ 'BESSELY' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BESSELY'],
+ 'argumentCount' => '2',
+ ],
+ 'BETADIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'BETADIST'],
+ 'argumentCount' => '3-5',
+ ],
+ 'BETA.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '4-6',
+ ],
+ 'BETAINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'BETAINV'],
+ 'argumentCount' => '3-5',
+ ],
+ 'BETA.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'BETAINV'],
+ 'argumentCount' => '3-5',
+ ],
+ 'BIN2DEC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BINTODEC'],
+ 'argumentCount' => '1',
+ ],
+ 'BIN2HEX' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BINTOHEX'],
+ 'argumentCount' => '1,2',
+ ],
+ 'BIN2OCT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BINTOOCT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'BINOMDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'BINOMDIST'],
+ 'argumentCount' => '4',
+ ],
+ 'BINOM.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'BINOMDIST'],
+ 'argumentCount' => '4',
+ ],
+ 'BINOM.DIST.RANGE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3,4',
+ ],
+ 'BINOM.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'BITAND' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BITAND'],
+ 'argumentCount' => '2',
+ ],
+ 'BITOR' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BITOR'],
+ 'argumentCount' => '2',
+ ],
+ 'BITXOR' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BITOR'],
+ 'argumentCount' => '2',
+ ],
+ 'BITLSHIFT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BITLSHIFT'],
+ 'argumentCount' => '2',
+ ],
+ 'BITRSHIFT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'BITRSHIFT'],
+ 'argumentCount' => '2',
+ ],
+ 'CEILING' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'CEILING'],
+ 'argumentCount' => '2',
+ ],
+ 'CEILING.MATH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'CEILING.PRECISE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'CELL' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1,2',
+ ],
+ 'CHAR' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'CHARACTER'],
+ 'argumentCount' => '1',
+ ],
+ 'CHIDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CHIDIST'],
+ 'argumentCount' => '2',
+ ],
+ 'CHISQ.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'CHISQ.DIST.RT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CHIDIST'],
+ 'argumentCount' => '2',
+ ],
+ 'CHIINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CHIINV'],
+ 'argumentCount' => '2',
+ ],
+ 'CHISQ.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'CHISQ.INV.RT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CHIINV'],
+ 'argumentCount' => '2',
+ ],
+ 'CHITEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'CHISQ.TEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'CHOOSE' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'CHOOSE'],
+ 'argumentCount' => '2+',
+ ],
+ 'CLEAN' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'TRIMNONPRINTABLE'],
+ 'argumentCount' => '1',
+ ],
+ 'CODE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'ASCIICODE'],
+ 'argumentCount' => '1',
+ ],
+ 'COLUMN' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'COLUMN'],
+ 'argumentCount' => '-1',
+ 'passByReference' => [true],
+ ],
+ 'COLUMNS' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'COLUMNS'],
+ 'argumentCount' => '1',
+ ],
+ 'COMBIN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'COMBIN'],
+ 'argumentCount' => '2',
+ ],
+ 'COMBINA' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'COMPLEX' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'COMPLEX'],
+ 'argumentCount' => '2,3',
+ ],
+ 'CONCAT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'CONCATENATE'],
+ 'argumentCount' => '1+',
+ ],
+ 'CONCATENATE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'CONCATENATE'],
+ 'argumentCount' => '1+',
+ ],
+ 'CONFIDENCE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CONFIDENCE'],
+ 'argumentCount' => '3',
+ ],
+ 'CONFIDENCE.NORM' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CONFIDENCE'],
+ 'argumentCount' => '3',
+ ],
+ 'CONFIDENCE.T' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'CONVERT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'CONVERTUOM'],
+ 'argumentCount' => '3',
+ ],
+ 'CORREL' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CORREL'],
+ 'argumentCount' => '2',
+ ],
+ 'COS' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'cos',
+ 'argumentCount' => '1',
+ ],
+ 'COSH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'cosh',
+ 'argumentCount' => '1',
+ ],
+ 'COT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'COT'],
+ 'argumentCount' => '1',
+ ],
+ 'COTH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'COTH'],
+ 'argumentCount' => '1',
+ ],
+ 'COUNT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COUNT'],
+ 'argumentCount' => '1+',
+ ],
+ 'COUNTA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COUNTA'],
+ 'argumentCount' => '1+',
+ ],
+ 'COUNTBLANK' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COUNTBLANK'],
+ 'argumentCount' => '1',
+ ],
+ 'COUNTIF' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COUNTIF'],
+ 'argumentCount' => '2',
+ ],
+ 'COUNTIFS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COUNTIFS'],
+ 'argumentCount' => '2+',
+ ],
+ 'COUPDAYBS' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPDAYBS'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COUPDAYS' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPDAYS'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COUPDAYSNC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPDAYSNC'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COUPNCD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPNCD'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COUPNUM' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPNUM'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COUPPCD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'COUPPCD'],
+ 'argumentCount' => '3,4',
+ ],
+ 'COVAR' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COVAR'],
+ 'argumentCount' => '2',
+ ],
+ 'COVARIANCE.P' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'COVAR'],
+ 'argumentCount' => '2',
+ ],
+ 'COVARIANCE.S' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'CRITBINOM' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CRITBINOM'],
+ 'argumentCount' => '3',
+ ],
+ 'CSC' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'CSC'],
+ 'argumentCount' => '1',
+ ],
+ 'CSCH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'CSCH'],
+ 'argumentCount' => '1',
+ ],
+ 'CUBEKPIMEMBER' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBEMEMBER' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBEMEMBERPROPERTY' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBERANKEDMEMBER' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBESET' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBESETCOUNT' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUBEVALUE' => [
+ 'category' => Category::CATEGORY_CUBE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'CUMIPMT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'CUMIPMT'],
+ 'argumentCount' => '6',
+ ],
+ 'CUMPRINC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'CUMPRINC'],
+ 'argumentCount' => '6',
+ ],
+ 'DATE' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DATE'],
+ 'argumentCount' => '3',
+ ],
+ 'DATEDIF' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DATEDIF'],
+ 'argumentCount' => '2,3',
+ ],
+ 'DATEVALUE' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DATEVALUE'],
+ 'argumentCount' => '1',
+ ],
+ 'DAVERAGE' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DAVERAGE'],
+ 'argumentCount' => '3',
+ ],
+ 'DAY' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DAYOFMONTH'],
+ 'argumentCount' => '1',
+ ],
+ 'DAYS' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DAYS'],
+ 'argumentCount' => '2',
+ ],
+ 'DAYS360' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DAYS360'],
+ 'argumentCount' => '2,3',
+ ],
+ 'DB' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'DB'],
+ 'argumentCount' => '4,5',
+ ],
+ 'DBCS' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'DCOUNT' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DCOUNT'],
+ 'argumentCount' => '3',
+ ],
+ 'DCOUNTA' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DCOUNTA'],
+ 'argumentCount' => '3',
+ ],
+ 'DDB' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'DDB'],
+ 'argumentCount' => '4,5',
+ ],
+ 'DEC2BIN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'DECTOBIN'],
+ 'argumentCount' => '1,2',
+ ],
+ 'DEC2HEX' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'DECTOHEX'],
+ 'argumentCount' => '1,2',
+ ],
+ 'DEC2OCT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'DECTOOCT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'DECIMAL' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'DEGREES' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'rad2deg',
+ 'argumentCount' => '1',
+ ],
+ 'DELTA' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'DELTA'],
+ 'argumentCount' => '1,2',
+ ],
+ 'DEVSQ' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'DEVSQ'],
+ 'argumentCount' => '1+',
+ ],
+ 'DGET' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DGET'],
+ 'argumentCount' => '3',
+ ],
+ 'DISC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'DISC'],
+ 'argumentCount' => '4,5',
+ ],
+ 'DMAX' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DMAX'],
+ 'argumentCount' => '3',
+ ],
+ 'DMIN' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DMIN'],
+ 'argumentCount' => '3',
+ ],
+ 'DOLLAR' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'DOLLAR'],
+ 'argumentCount' => '1,2',
+ ],
+ 'DOLLARDE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'DOLLARDE'],
+ 'argumentCount' => '2',
+ ],
+ 'DOLLARFR' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'DOLLARFR'],
+ 'argumentCount' => '2',
+ ],
+ 'DPRODUCT' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DPRODUCT'],
+ 'argumentCount' => '3',
+ ],
+ 'DSTDEV' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DSTDEV'],
+ 'argumentCount' => '3',
+ ],
+ 'DSTDEVP' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DSTDEVP'],
+ 'argumentCount' => '3',
+ ],
+ 'DSUM' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DSUM'],
+ 'argumentCount' => '3',
+ ],
+ 'DURATION' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '5,6',
+ ],
+ 'DVAR' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DVAR'],
+ 'argumentCount' => '3',
+ ],
+ 'DVARP' => [
+ 'category' => Category::CATEGORY_DATABASE,
+ 'functionCall' => [Database::class, 'DVARP'],
+ 'argumentCount' => '3',
+ ],
+ 'EDATE' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'EDATE'],
+ 'argumentCount' => '2',
+ ],
+ 'EFFECT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'EFFECT'],
+ 'argumentCount' => '2',
+ ],
+ 'ENCODEURL' => [
+ 'category' => Category::CATEGORY_WEB,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'EOMONTH' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'EOMONTH'],
+ 'argumentCount' => '2',
+ ],
+ 'ERF' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'ERF'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ERF.PRECISE' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'ERFPRECISE'],
+ 'argumentCount' => '1',
+ ],
+ 'ERFC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'ERFC'],
+ 'argumentCount' => '1',
+ ],
+ 'ERFC.PRECISE' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'ERFC'],
+ 'argumentCount' => '1',
+ ],
+ 'ERROR.TYPE' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'errorType'],
+ 'argumentCount' => '1',
+ ],
+ 'EVEN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'EVEN'],
+ 'argumentCount' => '1',
+ ],
+ 'EXACT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'EXACT'],
+ 'argumentCount' => '2',
+ ],
+ 'EXP' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'exp',
+ 'argumentCount' => '1',
+ ],
+ 'EXPONDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'EXPONDIST'],
+ 'argumentCount' => '3',
+ ],
+ 'EXPON.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'EXPONDIST'],
+ 'argumentCount' => '3',
+ ],
+ 'FACT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'FACT'],
+ 'argumentCount' => '1',
+ ],
+ 'FACTDOUBLE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'FACTDOUBLE'],
+ 'argumentCount' => '1',
+ ],
+ 'FALSE' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'FALSE'],
+ 'argumentCount' => '0',
+ ],
+ 'FDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'F.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'FDIST2'],
+ 'argumentCount' => '4',
+ ],
+ 'F.DIST.RT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'FILTER' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3+',
+ ],
+ 'FILTERXML' => [
+ 'category' => Category::CATEGORY_WEB,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'FIND' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'],
+ 'argumentCount' => '2,3',
+ ],
+ 'FINDB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'],
+ 'argumentCount' => '2,3',
+ ],
+ 'FINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'F.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'F.INV.RT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'FISHER' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'FISHER'],
+ 'argumentCount' => '1',
+ ],
+ 'FISHERINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'FISHERINV'],
+ 'argumentCount' => '1',
+ ],
+ 'FIXED' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'FIXEDFORMAT'],
+ 'argumentCount' => '1-3',
+ ],
+ 'FLOOR' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'FLOOR'],
+ 'argumentCount' => '2',
+ ],
+ 'FLOOR.MATH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'FLOORMATH'],
+ 'argumentCount' => '3',
+ ],
+ 'FLOOR.PRECISE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'FLOORPRECISE'],
+ 'argumentCount' => '2',
+ ],
+ 'FORECAST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'FORECAST'],
+ 'argumentCount' => '3',
+ ],
+ 'FORECAST.ETS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3-6',
+ ],
+ 'FORECAST.ETS.CONFINT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3-6',
+ ],
+ 'FORECAST.ETS.SEASONALITY' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2-4',
+ ],
+ 'FORECAST.ETS.STAT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3-6',
+ ],
+ 'FORECAST.LINEAR' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'FORECAST'],
+ 'argumentCount' => '3',
+ ],
+ 'FORMULATEXT' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'FORMULATEXT'],
+ 'argumentCount' => '1',
+ 'passCellReference' => true,
+ 'passByReference' => [true],
+ ],
+ 'FREQUENCY' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'FTEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'F.TEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'FV' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'FV'],
+ 'argumentCount' => '3-5',
+ ],
+ 'FVSCHEDULE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'FVSCHEDULE'],
+ 'argumentCount' => '2',
+ ],
+ 'GAMMA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMAFunction'],
+ 'argumentCount' => '1',
+ ],
+ 'GAMMADIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMADIST'],
+ 'argumentCount' => '4',
+ ],
+ 'GAMMA.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMADIST'],
+ 'argumentCount' => '4',
+ ],
+ 'GAMMAINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMAINV'],
+ 'argumentCount' => '3',
+ ],
+ 'GAMMA.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMAINV'],
+ 'argumentCount' => '3',
+ ],
+ 'GAMMALN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMALN'],
+ 'argumentCount' => '1',
+ ],
+ 'GAMMALN.PRECISE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAMMALN'],
+ 'argumentCount' => '1',
+ ],
+ 'GAUSS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GAUSS'],
+ 'argumentCount' => '1',
+ ],
+ 'GCD' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'GCD'],
+ 'argumentCount' => '1+',
+ ],
+ 'GEOMEAN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GEOMEAN'],
+ 'argumentCount' => '1+',
+ ],
+ 'GESTEP' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'GESTEP'],
+ 'argumentCount' => '1,2',
+ ],
+ 'GETPIVOTDATA' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2+',
+ ],
+ 'GROWTH' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'GROWTH'],
+ 'argumentCount' => '1-4',
+ ],
+ 'HARMEAN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'HARMEAN'],
+ 'argumentCount' => '1+',
+ ],
+ 'HEX2BIN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'HEXTOBIN'],
+ 'argumentCount' => '1,2',
+ ],
+ 'HEX2DEC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'HEXTODEC'],
+ 'argumentCount' => '1',
+ ],
+ 'HEX2OCT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'HEXTOOCT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'HLOOKUP' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'HLOOKUP'],
+ 'argumentCount' => '3,4',
+ ],
+ 'HOUR' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'HOUROFDAY'],
+ 'argumentCount' => '1',
+ ],
+ 'HYPERLINK' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'HYPERLINK'],
+ 'argumentCount' => '1,2',
+ 'passCellReference' => true,
+ ],
+ 'HYPGEOMDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'HYPGEOMDIST'],
+ 'argumentCount' => '4',
+ ],
+ 'HYPGEOM.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '5',
+ ],
+ 'IF' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'statementIf'],
+ 'argumentCount' => '1-3',
+ ],
+ 'IFERROR' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'IFERROR'],
+ 'argumentCount' => '2',
+ ],
+ 'IFNA' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'IFNA'],
+ 'argumentCount' => '2',
+ ],
+ 'IFS' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'IFS'],
+ 'argumentCount' => '2+',
+ ],
+ 'IMABS' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMABS'],
+ 'argumentCount' => '1',
+ ],
+ 'IMAGINARY' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMAGINARY'],
+ 'argumentCount' => '1',
+ ],
+ 'IMARGUMENT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMARGUMENT'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCONJUGATE' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCONJUGATE'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCOS' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCOS'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCOSH' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCOSH'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCOT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCOT'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCSC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCSC'],
+ 'argumentCount' => '1',
+ ],
+ 'IMCSCH' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMCSCH'],
+ 'argumentCount' => '1',
+ ],
+ 'IMDIV' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMDIV'],
+ 'argumentCount' => '2',
+ ],
+ 'IMEXP' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMEXP'],
+ 'argumentCount' => '1',
+ ],
+ 'IMLN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMLN'],
+ 'argumentCount' => '1',
+ ],
+ 'IMLOG10' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMLOG10'],
+ 'argumentCount' => '1',
+ ],
+ 'IMLOG2' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMLOG2'],
+ 'argumentCount' => '1',
+ ],
+ 'IMPOWER' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMPOWER'],
+ 'argumentCount' => '2',
+ ],
+ 'IMPRODUCT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMPRODUCT'],
+ 'argumentCount' => '1+',
+ ],
+ 'IMREAL' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMREAL'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSEC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSEC'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSECH' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSECH'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSIN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSIN'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSINH' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSINH'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSQRT' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSQRT'],
+ 'argumentCount' => '1',
+ ],
+ 'IMSUB' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSUB'],
+ 'argumentCount' => '2',
+ ],
+ 'IMSUM' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMSUM'],
+ 'argumentCount' => '1+',
+ ],
+ 'IMTAN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'IMTAN'],
+ 'argumentCount' => '1',
+ ],
+ 'INDEX' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'INDEX'],
+ 'argumentCount' => '1-4',
+ ],
+ 'INDIRECT' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'INDIRECT'],
+ 'argumentCount' => '1,2',
+ 'passCellReference' => true,
+ ],
+ 'INFO' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'INT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'INT'],
+ 'argumentCount' => '1',
+ ],
+ 'INTERCEPT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'INTERCEPT'],
+ 'argumentCount' => '2',
+ ],
+ 'INTRATE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'INTRATE'],
+ 'argumentCount' => '4,5',
+ ],
+ 'IPMT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'IPMT'],
+ 'argumentCount' => '4-6',
+ ],
+ 'IRR' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'IRR'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ISBLANK' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isBlank'],
+ 'argumentCount' => '1',
+ ],
+ 'ISERR' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isErr'],
+ 'argumentCount' => '1',
+ ],
+ 'ISERROR' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isError'],
+ 'argumentCount' => '1',
+ ],
+ 'ISEVEN' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isEven'],
+ 'argumentCount' => '1',
+ ],
+ 'ISFORMULA' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isFormula'],
+ 'argumentCount' => '1',
+ 'passCellReference' => true,
+ 'passByReference' => [true],
+ ],
+ 'ISLOGICAL' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isLogical'],
+ 'argumentCount' => '1',
+ ],
+ 'ISNA' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isNa'],
+ 'argumentCount' => '1',
+ ],
+ 'ISNONTEXT' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isNonText'],
+ 'argumentCount' => '1',
+ ],
+ 'ISNUMBER' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isNumber'],
+ 'argumentCount' => '1',
+ ],
+ 'ISO.CEILING' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ISODD' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isOdd'],
+ 'argumentCount' => '1',
+ ],
+ 'ISOWEEKNUM' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'ISOWEEKNUM'],
+ 'argumentCount' => '1',
+ ],
+ 'ISPMT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'ISPMT'],
+ 'argumentCount' => '4',
+ ],
+ 'ISREF' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'ISTEXT' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'isText'],
+ 'argumentCount' => '1',
+ ],
+ 'JIS' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'KURT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'KURT'],
+ 'argumentCount' => '1+',
+ ],
+ 'LARGE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LARGE'],
+ 'argumentCount' => '2',
+ ],
+ 'LCM' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'LCM'],
+ 'argumentCount' => '1+',
+ ],
+ 'LEFT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'LEFT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'LEFTB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'LEFT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'LEN' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'STRINGLENGTH'],
+ 'argumentCount' => '1',
+ ],
+ 'LENB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'STRINGLENGTH'],
+ 'argumentCount' => '1',
+ ],
+ 'LINEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LINEST'],
+ 'argumentCount' => '1-4',
+ ],
+ 'LN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'log',
+ 'argumentCount' => '1',
+ ],
+ 'LOG' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'logBase'],
+ 'argumentCount' => '1,2',
+ ],
+ 'LOG10' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'log10',
+ 'argumentCount' => '1',
+ ],
+ 'LOGEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LOGEST'],
+ 'argumentCount' => '1-4',
+ ],
+ 'LOGINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LOGINV'],
+ 'argumentCount' => '3',
+ ],
+ 'LOGNORMDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LOGNORMDIST'],
+ 'argumentCount' => '3',
+ ],
+ 'LOGNORM.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LOGNORMDIST2'],
+ 'argumentCount' => '4',
+ ],
+ 'LOGNORM.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'LOGINV'],
+ 'argumentCount' => '3',
+ ],
+ 'LOOKUP' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'LOOKUP'],
+ 'argumentCount' => '2,3',
+ ],
+ 'LOWER' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'LOWERCASE'],
+ 'argumentCount' => '1',
+ ],
+ 'MATCH' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'MATCH'],
+ 'argumentCount' => '2,3',
+ ],
+ 'MAX' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MAX'],
+ 'argumentCount' => '1+',
+ ],
+ 'MAXA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MAXA'],
+ 'argumentCount' => '1+',
+ ],
+ 'MAXIFS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MAXIFS'],
+ 'argumentCount' => '3+',
+ ],
+ 'MDETERM' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MDETERM'],
+ 'argumentCount' => '1',
+ ],
+ 'MDURATION' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '5,6',
+ ],
+ 'MEDIAN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MEDIAN'],
+ 'argumentCount' => '1+',
+ ],
+ 'MEDIANIF' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2+',
+ ],
+ 'MID' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'MID'],
+ 'argumentCount' => '3',
+ ],
+ 'MIDB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'MID'],
+ 'argumentCount' => '3',
+ ],
+ 'MIN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MIN'],
+ 'argumentCount' => '1+',
+ ],
+ 'MINA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MINA'],
+ 'argumentCount' => '1+',
+ ],
+ 'MINIFS' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MINIFS'],
+ 'argumentCount' => '3+',
+ ],
+ 'MINUTE' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'MINUTE'],
+ 'argumentCount' => '1',
+ ],
+ 'MINVERSE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MINVERSE'],
+ 'argumentCount' => '1',
+ ],
+ 'MIRR' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'MIRR'],
+ 'argumentCount' => '3',
+ ],
+ 'MMULT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MMULT'],
+ 'argumentCount' => '2',
+ ],
+ 'MOD' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MOD'],
+ 'argumentCount' => '2',
+ ],
+ 'MODE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MODE'],
+ 'argumentCount' => '1+',
+ ],
+ 'MODE.MULT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1+',
+ ],
+ 'MODE.SNGL' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'MODE'],
+ 'argumentCount' => '1+',
+ ],
+ 'MONTH' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'MONTHOFYEAR'],
+ 'argumentCount' => '1',
+ ],
+ 'MROUND' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MROUND'],
+ 'argumentCount' => '2',
+ ],
+ 'MULTINOMIAL' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'MULTINOMIAL'],
+ 'argumentCount' => '1+',
+ ],
+ 'MUNIT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'N' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'n'],
+ 'argumentCount' => '1',
+ ],
+ 'NA' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'NA'],
+ 'argumentCount' => '0',
+ ],
+ 'NEGBINOMDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NEGBINOMDIST'],
+ 'argumentCount' => '3',
+ ],
+ 'NEGBINOM.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '4',
+ ],
+ 'NETWORKDAYS' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'NETWORKDAYS'],
+ 'argumentCount' => '2-3',
+ ],
+ 'NETWORKDAYS.INTL' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2-4',
+ ],
+ 'NOMINAL' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'NOMINAL'],
+ 'argumentCount' => '2',
+ ],
+ 'NORMDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMDIST'],
+ 'argumentCount' => '4',
+ ],
+ 'NORM.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMDIST'],
+ 'argumentCount' => '4',
+ ],
+ 'NORMINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMINV'],
+ 'argumentCount' => '3',
+ ],
+ 'NORM.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMINV'],
+ 'argumentCount' => '3',
+ ],
+ 'NORMSDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMSDIST'],
+ 'argumentCount' => '1',
+ ],
+ 'NORM.S.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMSDIST2'],
+ 'argumentCount' => '1,2',
+ ],
+ 'NORMSINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMSINV'],
+ 'argumentCount' => '1',
+ ],
+ 'NORM.S.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'NORMSINV'],
+ 'argumentCount' => '1',
+ ],
+ 'NOT' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'NOT'],
+ 'argumentCount' => '1',
+ ],
+ 'NOW' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DATETIMENOW'],
+ 'argumentCount' => '0',
+ ],
+ 'NPER' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'NPER'],
+ 'argumentCount' => '3-5',
+ ],
+ 'NPV' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'NPV'],
+ 'argumentCount' => '2+',
+ ],
+ 'NUMBERVALUE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'NUMBERVALUE'],
+ 'argumentCount' => '1+',
+ ],
+ 'OCT2BIN' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'OCTTOBIN'],
+ 'argumentCount' => '1,2',
+ ],
+ 'OCT2DEC' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'OCTTODEC'],
+ 'argumentCount' => '1',
+ ],
+ 'OCT2HEX' => [
+ 'category' => Category::CATEGORY_ENGINEERING,
+ 'functionCall' => [Engineering::class, 'OCTTOHEX'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ODD' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ODD'],
+ 'argumentCount' => '1',
+ ],
+ 'ODDFPRICE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '8,9',
+ ],
+ 'ODDFYIELD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '8,9',
+ ],
+ 'ODDLPRICE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '7,8',
+ ],
+ 'ODDLYIELD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '7,8',
+ ],
+ 'OFFSET' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'OFFSET'],
+ 'argumentCount' => '3-5',
+ 'passCellReference' => true,
+ 'passByReference' => [true],
+ ],
+ 'OR' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'logicalOr'],
+ 'argumentCount' => '1+',
+ ],
+ 'PDURATION' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PDURATION'],
+ 'argumentCount' => '3',
+ ],
+ 'PEARSON' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'CORREL'],
+ 'argumentCount' => '2',
+ ],
+ 'PERCENTILE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'PERCENTILE'],
+ 'argumentCount' => '2',
+ ],
+ 'PERCENTILE.EXC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'PERCENTILE.INC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'PERCENTILE'],
+ 'argumentCount' => '2',
+ ],
+ 'PERCENTRANK' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'PERCENTRANK'],
+ 'argumentCount' => '2,3',
+ ],
+ 'PERCENTRANK.EXC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2,3',
+ ],
+ 'PERCENTRANK.INC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'PERCENTRANK'],
+ 'argumentCount' => '2,3',
+ ],
+ 'PERMUT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'PERMUT'],
+ 'argumentCount' => '2',
+ ],
+ 'PERMUTATIONA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'PHONETIC' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'PHI' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1',
+ ],
+ 'PI' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'pi',
+ 'argumentCount' => '0',
+ ],
+ 'PMT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PMT'],
+ 'argumentCount' => '3-5',
+ ],
+ 'POISSON' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'POISSON'],
+ 'argumentCount' => '3',
+ ],
+ 'POISSON.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'POISSON'],
+ 'argumentCount' => '3',
+ ],
+ 'POWER' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'POWER'],
+ 'argumentCount' => '2',
+ ],
+ 'PPMT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PPMT'],
+ 'argumentCount' => '4-6',
+ ],
+ 'PRICE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PRICE'],
+ 'argumentCount' => '6,7',
+ ],
+ 'PRICEDISC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PRICEDISC'],
+ 'argumentCount' => '4,5',
+ ],
+ 'PRICEMAT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PRICEMAT'],
+ 'argumentCount' => '5,6',
+ ],
+ 'PROB' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3,4',
+ ],
+ 'PRODUCT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'PRODUCT'],
+ 'argumentCount' => '1+',
+ ],
+ 'PROPER' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'PROPERCASE'],
+ 'argumentCount' => '1',
+ ],
+ 'PV' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'PV'],
+ 'argumentCount' => '3-5',
+ ],
+ 'QUARTILE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'QUARTILE'],
+ 'argumentCount' => '2',
+ ],
+ 'QUARTILE.EXC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'QUARTILE.INC' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'QUARTILE'],
+ 'argumentCount' => '2',
+ ],
+ 'QUOTIENT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'QUOTIENT'],
+ 'argumentCount' => '2',
+ ],
+ 'RADIANS' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'deg2rad',
+ 'argumentCount' => '1',
+ ],
+ 'RAND' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'RAND'],
+ 'argumentCount' => '0',
+ ],
+ 'RANDARRAY' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '0-5',
+ ],
+ 'RANDBETWEEN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'RAND'],
+ 'argumentCount' => '2',
+ ],
+ 'RANK' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'RANK'],
+ 'argumentCount' => '2,3',
+ ],
+ 'RANK.AVG' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2,3',
+ ],
+ 'RANK.EQ' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'RANK'],
+ 'argumentCount' => '2,3',
+ ],
+ 'RATE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'RATE'],
+ 'argumentCount' => '3-6',
+ ],
+ 'RECEIVED' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'RECEIVED'],
+ 'argumentCount' => '4-5',
+ ],
+ 'REPLACE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'REPLACE'],
+ 'argumentCount' => '4',
+ ],
+ 'REPLACEB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'REPLACE'],
+ 'argumentCount' => '4',
+ ],
+ 'REPT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => 'str_repeat',
+ 'argumentCount' => '2',
+ ],
+ 'RIGHT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'RIGHT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'RIGHTB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'RIGHT'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ROMAN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ROMAN'],
+ 'argumentCount' => '1,2',
+ ],
+ 'ROUND' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'round',
+ 'argumentCount' => '2',
+ ],
+ 'ROUNDDOWN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ROUNDDOWN'],
+ 'argumentCount' => '2',
+ ],
+ 'ROUNDUP' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'ROUNDUP'],
+ 'argumentCount' => '2',
+ ],
+ 'ROW' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'ROW'],
+ 'argumentCount' => '-1',
+ 'passByReference' => [true],
+ ],
+ 'ROWS' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'ROWS'],
+ 'argumentCount' => '1',
+ ],
+ 'RRI' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'RRI'],
+ 'argumentCount' => '3',
+ ],
+ 'RSQ' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'RSQ'],
+ 'argumentCount' => '2',
+ ],
+ 'RTD' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1+',
+ ],
+ 'SEARCH' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'],
+ 'argumentCount' => '2,3',
+ ],
+ 'SEARCHB' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'],
+ 'argumentCount' => '2,3',
+ ],
+ 'SEC' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SEC'],
+ 'argumentCount' => '1',
+ ],
+ 'SECH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SECH'],
+ 'argumentCount' => '1',
+ ],
+ 'SECOND' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'SECOND'],
+ 'argumentCount' => '1',
+ ],
+ 'SEQUENCE' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'SERIESSUM' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SERIESSUM'],
+ 'argumentCount' => '4',
+ ],
+ 'SHEET' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '0,1',
+ ],
+ 'SHEETS' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '0,1',
+ ],
+ 'SIGN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SIGN'],
+ 'argumentCount' => '1',
+ ],
+ 'SIN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'sin',
+ 'argumentCount' => '1',
+ ],
+ 'SINH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'sinh',
+ 'argumentCount' => '1',
+ ],
+ 'SKEW' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'SKEW'],
+ 'argumentCount' => '1+',
+ ],
+ 'SKEW.P' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1+',
+ ],
+ 'SLN' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'SLN'],
+ 'argumentCount' => '3',
+ ],
+ 'SLOPE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'SLOPE'],
+ 'argumentCount' => '2',
+ ],
+ 'SMALL' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'SMALL'],
+ 'argumentCount' => '2',
+ ],
+ 'SORT' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1+',
+ ],
+ 'SORTBY' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2+',
+ ],
+ 'SQRT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'sqrt',
+ 'argumentCount' => '1',
+ ],
+ 'SQRTPI' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SQRTPI'],
+ 'argumentCount' => '1',
+ ],
+ 'STANDARDIZE' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STANDARDIZE'],
+ 'argumentCount' => '3',
+ ],
+ 'STDEV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEV'],
+ 'argumentCount' => '1+',
+ ],
+ 'STDEV.S' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEV'],
+ 'argumentCount' => '1+',
+ ],
+ 'STDEV.P' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEVP'],
+ 'argumentCount' => '1+',
+ ],
+ 'STDEVA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEVA'],
+ 'argumentCount' => '1+',
+ ],
+ 'STDEVP' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEVP'],
+ 'argumentCount' => '1+',
+ ],
+ 'STDEVPA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STDEVPA'],
+ 'argumentCount' => '1+',
+ ],
+ 'STEYX' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'STEYX'],
+ 'argumentCount' => '2',
+ ],
+ 'SUBSTITUTE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'SUBSTITUTE'],
+ 'argumentCount' => '3,4',
+ ],
+ 'SUBTOTAL' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUBTOTAL'],
+ 'argumentCount' => '2+',
+ 'passCellReference' => true,
+ ],
+ 'SUM' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUM'],
+ 'argumentCount' => '1+',
+ ],
+ 'SUMIF' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMIF'],
+ 'argumentCount' => '2,3',
+ ],
+ 'SUMIFS' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMIFS'],
+ 'argumentCount' => '3+',
+ ],
+ 'SUMPRODUCT' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMPRODUCT'],
+ 'argumentCount' => '1+',
+ ],
+ 'SUMSQ' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMSQ'],
+ 'argumentCount' => '1+',
+ ],
+ 'SUMX2MY2' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMX2MY2'],
+ 'argumentCount' => '2',
+ ],
+ 'SUMX2PY2' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMX2PY2'],
+ 'argumentCount' => '2',
+ ],
+ 'SUMXMY2' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'SUMXMY2'],
+ 'argumentCount' => '2',
+ ],
+ 'SWITCH' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'statementSwitch'],
+ 'argumentCount' => '3+',
+ ],
+ 'SYD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'SYD'],
+ 'argumentCount' => '4',
+ ],
+ 'T' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'RETURNSTRING'],
+ 'argumentCount' => '1',
+ ],
+ 'TAN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'tan',
+ 'argumentCount' => '1',
+ ],
+ 'TANH' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => 'tanh',
+ 'argumentCount' => '1',
+ ],
+ 'TBILLEQ' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'TBILLEQ'],
+ 'argumentCount' => '3',
+ ],
+ 'TBILLPRICE' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'TBILLPRICE'],
+ 'argumentCount' => '3',
+ ],
+ 'TBILLYIELD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'TBILLYIELD'],
+ 'argumentCount' => '3',
+ ],
+ 'TDIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'TDIST'],
+ 'argumentCount' => '3',
+ ],
+ 'T.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3',
+ ],
+ 'T.DIST.2T' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'T.DIST.RT' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'TEXT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'TEXTFORMAT'],
+ 'argumentCount' => '2',
+ ],
+ 'TEXTJOIN' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'TEXTJOIN'],
+ 'argumentCount' => '3+',
+ ],
+ 'TIME' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'TIME'],
+ 'argumentCount' => '3',
+ ],
+ 'TIMEVALUE' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'TIMEVALUE'],
+ 'argumentCount' => '1',
+ ],
+ 'TINV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'TINV'],
+ 'argumentCount' => '2',
+ ],
+ 'T.INV' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'TINV'],
+ 'argumentCount' => '2',
+ ],
+ 'T.INV.2T' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'TODAY' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'DATENOW'],
+ 'argumentCount' => '0',
+ ],
+ 'TRANSPOSE' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'TRANSPOSE'],
+ 'argumentCount' => '1',
+ ],
+ 'TREND' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'TREND'],
+ 'argumentCount' => '1-4',
+ ],
+ 'TRIM' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'TRIMSPACES'],
+ 'argumentCount' => '1',
+ ],
+ 'TRIMMEAN' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'TRIMMEAN'],
+ 'argumentCount' => '2',
+ ],
+ 'TRUE' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'TRUE'],
+ 'argumentCount' => '0',
+ ],
+ 'TRUNC' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [MathTrig::class, 'TRUNC'],
+ 'argumentCount' => '1,2',
+ ],
+ 'TTEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '4',
+ ],
+ 'T.TEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '4',
+ ],
+ 'TYPE' => [
+ 'category' => Category::CATEGORY_INFORMATION,
+ 'functionCall' => [Functions::class, 'TYPE'],
+ 'argumentCount' => '1',
+ ],
+ 'UNICHAR' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'CHARACTER'],
+ 'argumentCount' => '1',
+ ],
+ 'UNICODE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'ASCIICODE'],
+ 'argumentCount' => '1',
+ ],
+ 'UNIQUE' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1+',
+ ],
+ 'UPPER' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'UPPERCASE'],
+ 'argumentCount' => '1',
+ ],
+ 'USDOLLAR' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2',
+ ],
+ 'VALUE' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [TextData::class, 'VALUE'],
+ 'argumentCount' => '1',
+ ],
+ 'VAR' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARFunc'],
+ 'argumentCount' => '1+',
+ ],
+ 'VAR.P' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARP'],
+ 'argumentCount' => '1+',
+ ],
+ 'VAR.S' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARFunc'],
+ 'argumentCount' => '1+',
+ ],
+ 'VARA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARA'],
+ 'argumentCount' => '1+',
+ ],
+ 'VARP' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARP'],
+ 'argumentCount' => '1+',
+ ],
+ 'VARPA' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'VARPA'],
+ 'argumentCount' => '1+',
+ ],
+ 'VDB' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '5-7',
+ ],
+ 'VLOOKUP' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [LookupRef::class, 'VLOOKUP'],
+ 'argumentCount' => '3,4',
+ ],
+ 'WEBSERVICE' => [
+ 'category' => Category::CATEGORY_WEB,
+ 'functionCall' => [Web::class, 'WEBSERVICE'],
+ 'argumentCount' => '1',
+ ],
+ 'WEEKDAY' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'WEEKDAY'],
+ 'argumentCount' => '1,2',
+ ],
+ 'WEEKNUM' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'WEEKNUM'],
+ 'argumentCount' => '1,2',
+ ],
+ 'WEIBULL' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'WEIBULL'],
+ 'argumentCount' => '4',
+ ],
+ 'WEIBULL.DIST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'WEIBULL'],
+ 'argumentCount' => '4',
+ ],
+ 'WORKDAY' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'WORKDAY'],
+ 'argumentCount' => '2-3',
+ ],
+ 'WORKDAY.INTL' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2-4',
+ ],
+ 'XIRR' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'XIRR'],
+ 'argumentCount' => '2,3',
+ ],
+ 'XLOOKUP' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '3-6',
+ ],
+ 'XNPV' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'XNPV'],
+ 'argumentCount' => '3',
+ ],
+ 'XMATCH' => [
+ 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '2,3',
+ ],
+ 'XOR' => [
+ 'category' => Category::CATEGORY_LOGICAL,
+ 'functionCall' => [Logical::class, 'logicalXor'],
+ 'argumentCount' => '1+',
+ ],
+ 'YEAR' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'YEAR'],
+ 'argumentCount' => '1',
+ ],
+ 'YEARFRAC' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [DateTime::class, 'YEARFRAC'],
+ 'argumentCount' => '2,3',
+ ],
+ 'YIELD' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '6,7',
+ ],
+ 'YIELDDISC' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'YIELDDISC'],
+ 'argumentCount' => '4,5',
+ ],
+ 'YIELDMAT' => [
+ 'category' => Category::CATEGORY_FINANCIAL,
+ 'functionCall' => [Financial::class, 'YIELDMAT'],
+ 'argumentCount' => '5,6',
+ ],
+ 'ZTEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'ZTEST'],
+ 'argumentCount' => '2-3',
+ ],
+ 'Z.TEST' => [
+ 'category' => Category::CATEGORY_STATISTICAL,
+ 'functionCall' => [Statistical::class, 'ZTEST'],
+ 'argumentCount' => '2-3',
+ ],
+ ];
+
+ // Internal functions used for special control purposes
+ private static $controlFunctions = [
+ 'MKMATRIX' => [
+ 'argumentCount' => '*',
+ 'functionCall' => [__CLASS__, 'mkMatrix'],
+ ],
+ 'NAME.ERROR' => [
+ 'argumentCount' => '*',
+ 'functionCall' => [Functions::class, 'NAME'],
+ ],
+ ];
+
+ public function __construct(?Spreadsheet $spreadsheet = null)
+ {
+ $this->delta = 1 * 10 ** (0 - ini_get('precision'));
+
+ $this->spreadsheet = $spreadsheet;
+ $this->cyclicReferenceStack = new CyclicReferenceStack();
+ $this->debugLog = new Logger($this->cyclicReferenceStack);
+ self::$referenceHelper = ReferenceHelper::getInstance();
+ }
+
+ private static function loadLocales(): void
+ {
+ $localeFileDirectory = __DIR__ . '/locale/';
+ foreach (glob($localeFileDirectory . '*', GLOB_ONLYDIR) as $filename) {
+ $filename = substr($filename, strlen($localeFileDirectory));
+ if ($filename != 'en') {
+ self::$validLocaleLanguages[] = $filename;
+ }
+ }
+ }
+
+ /**
+ * Get an instance of this class.
+ *
+ * @param Spreadsheet $spreadsheet Injected spreadsheet for working with a PhpSpreadsheet Spreadsheet object,
+ * or NULL to create a standalone claculation engine
+ *
+ * @return Calculation
+ */
+ public static function getInstance(?Spreadsheet $spreadsheet = null)
+ {
+ if ($spreadsheet !== null) {
+ $instance = $spreadsheet->getCalculationEngine();
+ if (isset($instance)) {
+ return $instance;
+ }
+ }
+
+ if (!isset(self::$instance) || (self::$instance === null)) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Flush the calculation cache for any existing instance of this class
+ * but only if a Calculation instance exists.
+ */
+ public function flushInstance(): void
+ {
+ $this->clearCalculationCache();
+ $this->clearBranchStore();
+ }
+
+ /**
+ * Get the Logger for this calculation engine instance.
+ *
+ * @return Logger
+ */
+ public function getDebugLog()
+ {
+ return $this->debugLog;
+ }
+
+ /**
+ * __clone implementation. Cloning should not be allowed in a Singleton!
+ */
+ final public function __clone()
+ {
+ throw new Exception('Cloning the calculation engine is not allowed!');
+ }
+
+ /**
+ * Return the locale-specific translation of TRUE.
+ *
+ * @return string locale-specific translation of TRUE
+ */
+ public static function getTRUE()
+ {
+ return self::$localeBoolean['TRUE'];
+ }
+
+ /**
+ * Return the locale-specific translation of FALSE.
+ *
+ * @return string locale-specific translation of FALSE
+ */
+ public static function getFALSE()
+ {
+ return self::$localeBoolean['FALSE'];
+ }
+
+ /**
+ * Set the Array Return Type (Array or Value of first element in the array).
+ *
+ * @param string $returnType Array return type
+ *
+ * @return bool Success or failure
+ */
+ public static function setArrayReturnType($returnType)
+ {
+ if (
+ ($returnType == self::RETURN_ARRAY_AS_VALUE) ||
+ ($returnType == self::RETURN_ARRAY_AS_ERROR) ||
+ ($returnType == self::RETURN_ARRAY_AS_ARRAY)
+ ) {
+ self::$returnArrayAsType = $returnType;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return the Array Return Type (Array or Value of first element in the array).
+ *
+ * @return string $returnType Array return type
+ */
+ public static function getArrayReturnType()
+ {
+ return self::$returnArrayAsType;
+ }
+
+ /**
+ * Is calculation caching enabled?
+ *
+ * @return bool
+ */
+ public function getCalculationCacheEnabled()
+ {
+ return $this->calculationCacheEnabled;
+ }
+
+ /**
+ * Enable/disable calculation cache.
+ *
+ * @param bool $pValue
+ */
+ public function setCalculationCacheEnabled($pValue): void
+ {
+ $this->calculationCacheEnabled = $pValue;
+ $this->clearCalculationCache();
+ }
+
+ /**
+ * Enable calculation cache.
+ */
+ public function enableCalculationCache(): void
+ {
+ $this->setCalculationCacheEnabled(true);
+ }
+
+ /**
+ * Disable calculation cache.
+ */
+ public function disableCalculationCache(): void
+ {
+ $this->setCalculationCacheEnabled(false);
+ }
+
+ /**
+ * Clear calculation cache.
+ */
+ public function clearCalculationCache(): void
+ {
+ $this->calculationCache = [];
+ }
+
+ /**
+ * Clear calculation cache for a specified worksheet.
+ *
+ * @param string $worksheetName
+ */
+ public function clearCalculationCacheForWorksheet($worksheetName): void
+ {
+ if (isset($this->calculationCache[$worksheetName])) {
+ unset($this->calculationCache[$worksheetName]);
+ }
+ }
+
+ /**
+ * Rename calculation cache for a specified worksheet.
+ *
+ * @param string $fromWorksheetName
+ * @param string $toWorksheetName
+ */
+ public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksheetName): void
+ {
+ if (isset($this->calculationCache[$fromWorksheetName])) {
+ $this->calculationCache[$toWorksheetName] = &$this->calculationCache[$fromWorksheetName];
+ unset($this->calculationCache[$fromWorksheetName]);
+ }
+ }
+
+ /**
+ * Enable/disable calculation cache.
+ *
+ * @param mixed $enabled
+ */
+ public function setBranchPruningEnabled($enabled): void
+ {
+ $this->branchPruningEnabled = $enabled;
+ }
+
+ public function enableBranchPruning(): void
+ {
+ $this->setBranchPruningEnabled(true);
+ }
+
+ public function disableBranchPruning(): void
+ {
+ $this->setBranchPruningEnabled(false);
+ }
+
+ public function clearBranchStore(): void
+ {
+ $this->branchStoreKeyCounter = 0;
+ }
+
+ /**
+ * Get the currently defined locale code.
+ *
+ * @return string
+ */
+ public function getLocale()
+ {
+ return self::$localeLanguage;
+ }
+
+ /**
+ * Set the locale code.
+ *
+ * @param string $locale The locale to use for formula translation, eg: 'en_us'
+ *
+ * @return bool
+ */
+ public function setLocale($locale)
+ {
+ // Identify our locale and language
+ $language = $locale = strtolower($locale);
+ if (strpos($locale, '_') !== false) {
+ [$language] = explode('_', $locale);
+ }
+ if (count(self::$validLocaleLanguages) == 1) {
+ self::loadLocales();
+ }
+ // Test whether we have any language data for this language (any locale)
+ if (in_array($language, self::$validLocaleLanguages)) {
+ // initialise language/locale settings
+ self::$localeFunctions = [];
+ self::$localeArgumentSeparator = ',';
+ self::$localeBoolean = ['TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL'];
+ // Default is English, if user isn't requesting english, then read the necessary data from the locale files
+ if ($locale != 'en_us') {
+ // Search for a file with a list of function names for locale
+ $functionNamesFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions';
+ if (!file_exists($functionNamesFile)) {
+ // If there isn't a locale specific function file, look for a language specific function file
+ $functionNamesFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'functions';
+ if (!file_exists($functionNamesFile)) {
+ return false;
+ }
+ }
+ // Retrieve the list of locale or language specific function names
+ $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+ foreach ($localeFunctions as $localeFunction) {
+ [$localeFunction] = explode('##', $localeFunction); // Strip out comments
+ if (strpos($localeFunction, '=') !== false) {
+ [$fName, $lfName] = explode('=', $localeFunction);
+ $fName = trim($fName);
+ $lfName = trim($lfName);
+ if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) {
+ self::$localeFunctions[$fName] = $lfName;
+ }
+ }
+ }
+ // Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions
+ if (isset(self::$localeFunctions['TRUE'])) {
+ self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE'];
+ }
+ if (isset(self::$localeFunctions['FALSE'])) {
+ self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE'];
+ }
+
+ $configFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config';
+ if (!file_exists($configFile)) {
+ $configFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'config';
+ }
+ if (file_exists($configFile)) {
+ $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+ foreach ($localeSettings as $localeSetting) {
+ [$localeSetting] = explode('##', $localeSetting); // Strip out comments
+ if (strpos($localeSetting, '=') !== false) {
+ [$settingName, $settingValue] = explode('=', $localeSetting);
+ $settingName = strtoupper(trim($settingName));
+ switch ($settingName) {
+ case 'ARGUMENTSEPARATOR':
+ self::$localeArgumentSeparator = trim($settingValue);
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ self::$functionReplaceFromExcel = self::$functionReplaceToExcel =
+ self::$functionReplaceFromLocale = self::$functionReplaceToLocale = null;
+ self::$localeLanguage = $locale;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param string $fromSeparator
+ * @param string $toSeparator
+ * @param string $formula
+ * @param bool $inBraces
+ *
+ * @return string
+ */
+ public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces)
+ {
+ $strlen = mb_strlen($formula);
+ for ($i = 0; $i < $strlen; ++$i) {
+ $chr = mb_substr($formula, $i, 1);
+ switch ($chr) {
+ case self::FORMULA_OPEN_FUNCTION_BRACE:
+ $inBraces = true;
+
+ break;
+ case self::FORMULA_CLOSE_FUNCTION_BRACE:
+ $inBraces = false;
+
+ break;
+ case $fromSeparator:
+ if (!$inBraces) {
+ $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1);
+ }
+ }
+ }
+
+ return $formula;
+ }
+
+ /**
+ * @param string[] $from
+ * @param string[] $to
+ * @param string $formula
+ * @param string $fromSeparator
+ * @param string $toSeparator
+ *
+ * @return string
+ */
+ private static function translateFormula(array $from, array $to, $formula, $fromSeparator, $toSeparator)
+ {
+ // Convert any Excel function names to the required language
+ if (self::$localeLanguage !== 'en_us') {
+ $inBraces = false;
+ // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators
+ if (strpos($formula, self::FORMULA_STRING_QUOTE) !== false) {
+ // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded
+ // the formula
+ $temp = explode(self::FORMULA_STRING_QUOTE, $formula);
+ $i = false;
+ foreach ($temp as &$value) {
+ // Only count/replace in alternating array entries
+ if ($i = !$i) {
+ $value = preg_replace($from, $to, $value);
+ $value = self::translateSeparator($fromSeparator, $toSeparator, $value, $inBraces);
+ }
+ }
+ unset($value);
+ // Then rebuild the formula string
+ $formula = implode(self::FORMULA_STRING_QUOTE, $temp);
+ } else {
+ // If there's no quoted strings, then we do a simple count/replace
+ $formula = preg_replace($from, $to, $formula);
+ $formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces);
+ }
+ }
+
+ return $formula;
+ }
+
+ private static $functionReplaceFromExcel = null;
+
+ private static $functionReplaceToLocale = null;
+
+ public function _translateFormulaToLocale($formula)
+ {
+ if (self::$functionReplaceFromExcel === null) {
+ self::$functionReplaceFromExcel = [];
+ foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {
+ self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelFunctionName, '/') . '([\s]*\()/Ui';
+ }
+ foreach (array_keys(self::$localeBoolean) as $excelBoolean) {
+ self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui';
+ }
+ }
+
+ if (self::$functionReplaceToLocale === null) {
+ self::$functionReplaceToLocale = [];
+ foreach (self::$localeFunctions as $localeFunctionName) {
+ self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2';
+ }
+ foreach (self::$localeBoolean as $localeBoolean) {
+ self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2';
+ }
+ }
+
+ return self::translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator);
+ }
+
+ private static $functionReplaceFromLocale = null;
+
+ private static $functionReplaceToExcel = null;
+
+ public function _translateFormulaToEnglish($formula)
+ {
+ if (self::$functionReplaceFromLocale === null) {
+ self::$functionReplaceFromLocale = [];
+ foreach (self::$localeFunctions as $localeFunctionName) {
+ self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($localeFunctionName, '/') . '([\s]*\()/Ui';
+ }
+ foreach (self::$localeBoolean as $excelBoolean) {
+ self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui';
+ }
+ }
+
+ if (self::$functionReplaceToExcel === null) {
+ self::$functionReplaceToExcel = [];
+ foreach (array_keys(self::$localeFunctions) as $excelFunctionName) {
+ self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2';
+ }
+ foreach (array_keys(self::$localeBoolean) as $excelBoolean) {
+ self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2';
+ }
+ }
+
+ return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ',');
+ }
+
+ public static function localeFunc($function)
+ {
+ if (self::$localeLanguage !== 'en_us') {
+ $functionName = trim($function, '(');
+ if (isset(self::$localeFunctions[$functionName])) {
+ $brace = ($functionName != $function);
+ $function = self::$localeFunctions[$functionName];
+ if ($brace) {
+ $function .= '(';
+ }
+ }
+ }
+
+ return $function;
+ }
+
+ /**
+ * Wrap string values in quotes.
+ *
+ * @param mixed $value
+ *
+ * @return mixed
+ */
+ public static function wrapResult($value)
+ {
+ if (is_string($value)) {
+ // Error values cannot be "wrapped"
+ if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) {
+ // Return Excel errors "as is"
+ return $value;
+ }
+ // Return strings wrapped in quotes
+ return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE;
+ } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
+ // Convert numeric errors to NaN error
+ return Functions::NAN();
+ }
+
+ return $value;
+ }
+
+ /**
+ * Remove quotes used as a wrapper to identify string values.
+ *
+ * @param mixed $value
+ *
+ * @return mixed
+ */
+ public static function unwrapResult($value)
+ {
+ if (is_string($value)) {
+ if ((isset($value[0])) && ($value[0] == self::FORMULA_STRING_QUOTE) && (substr($value, -1) == self::FORMULA_STRING_QUOTE)) {
+ return substr($value, 1, -1);
+ }
+ // Convert numeric errors to NAN error
+ } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
+ return Functions::NAN();
+ }
+
+ return $value;
+ }
+
+ /**
+ * Calculate cell value (using formula from a cell ID)
+ * Retained for backward compatibility.
+ *
+ * @param Cell $pCell Cell to calculate
+ *
+ * @return mixed
+ */
+ public function calculate(?Cell $pCell = null)
+ {
+ try {
+ return $this->calculateCellValue($pCell);
+ } catch (\Exception $e) {
+ throw new Exception($e->getMessage());
+ }
+ }
+
+ /**
+ * Calculate the value of a cell formula.
+ *
+ * @param Cell $pCell Cell to calculate
+ * @param bool $resetLog Flag indicating whether the debug log should be reset or not
+ *
+ * @return mixed
+ */
+ public function calculateCellValue(?Cell $pCell = null, $resetLog = true)
+ {
+ if ($pCell === null) {
+ return null;
+ }
+
+ $returnArrayAsType = self::$returnArrayAsType;
+ if ($resetLog) {
+ // Initialise the logging settings if requested
+ $this->formulaError = null;
+ $this->debugLog->clearLog();
+ $this->cyclicReferenceStack->clear();
+ $this->cyclicFormulaCounter = 1;
+
+ self::$returnArrayAsType = self::RETURN_ARRAY_AS_ARRAY;
+ }
+
+ // Execute the calculation for the cell formula
+ $this->cellStack[] = [
+ 'sheet' => $pCell->getWorksheet()->getTitle(),
+ 'cell' => $pCell->getCoordinate(),
+ ];
+
+ try {
+ $result = self::unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell));
+ $cellAddress = array_pop($this->cellStack);
+ $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']);
+ } catch (\Exception $e) {
+ $cellAddress = array_pop($this->cellStack);
+ $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']);
+
+ throw new Exception($e->getMessage());
+ }
+
+ if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) {
+ self::$returnArrayAsType = $returnArrayAsType;
+ $testResult = Functions::flattenArray($result);
+ if (self::$returnArrayAsType == self::RETURN_ARRAY_AS_ERROR) {
+ return Functions::VALUE();
+ }
+ // If there's only a single cell in the array, then we allow it
+ if (count($testResult) != 1) {
+ // If keys are numeric, then it's a matrix result rather than a cell range result, so we permit it
+ $r = array_keys($result);
+ $r = array_shift($r);
+ if (!is_numeric($r)) {
+ return Functions::VALUE();
+ }
+ if (is_array($result[$r])) {
+ $c = array_keys($result[$r]);
+ $c = array_shift($c);
+ if (!is_numeric($c)) {
+ return Functions::VALUE();
+ }
+ }
+ }
+ $result = array_shift($testResult);
+ }
+ self::$returnArrayAsType = $returnArrayAsType;
+
+ if ($result === null && $pCell->getWorksheet()->getSheetView()->getShowZeros()) {
+ return 0;
+ } elseif ((is_float($result)) && ((is_nan($result)) || (is_infinite($result)))) {
+ return Functions::NAN();
+ }
+
+ return $result;
+ }
+
+ /**
+ * Validate and parse a formula string.
+ *
+ * @param string $formula Formula to parse
+ *
+ * @return array|bool
+ */
+ public function parseFormula($formula)
+ {
+ // Basic validation that this is indeed a formula
+ // We return an empty array if not
+ $formula = trim($formula);
+ if ((!isset($formula[0])) || ($formula[0] != '=')) {
+ return [];
+ }
+ $formula = ltrim(substr($formula, 1));
+ if (!isset($formula[0])) {
+ return [];
+ }
+
+ // Parse the formula and return the token stack
+ return $this->internalParseFormula($formula);
+ }
+
+ /**
+ * Calculate the value of a formula.
+ *
+ * @param string $formula Formula to parse
+ * @param string $cellID Address of the cell to calculate
+ * @param Cell $pCell Cell to calculate
+ *
+ * @return mixed
+ */
+ public function calculateFormula($formula, $cellID = null, ?Cell $pCell = null)
+ {
+ // Initialise the logging settings
+ $this->formulaError = null;
+ $this->debugLog->clearLog();
+ $this->cyclicReferenceStack->clear();
+
+ $resetCache = $this->getCalculationCacheEnabled();
+ if ($this->spreadsheet !== null && $cellID === null && $pCell === null) {
+ $cellID = 'A1';
+ $pCell = $this->spreadsheet->getActiveSheet()->getCell($cellID);
+ } else {
+ // Disable calculation cacheing because it only applies to cell calculations, not straight formulae
+ // But don't actually flush any cache
+ $this->calculationCacheEnabled = false;
+ }
+
+ // Execute the calculation
+ try {
+ $result = self::unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell));
+ } catch (\Exception $e) {
+ throw new Exception($e->getMessage());
+ }
+
+ if ($this->spreadsheet === null) {
+ // Reset calculation cacheing to its previous state
+ $this->calculationCacheEnabled = $resetCache;
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param string $cellReference
+ * @param mixed $cellValue
+ *
+ * @return bool
+ */
+ public function getValueFromCache($cellReference, &$cellValue)
+ {
+ // Is calculation cacheing enabled?
+ // Is the value present in calculation cache?
+ $this->debugLog->writeDebugLog('Testing cache value for cell ', $cellReference);
+ if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) {
+ $this->debugLog->writeDebugLog('Retrieving value for cell ', $cellReference, ' from cache');
+ // Return the cached result
+
+ $cellValue = $this->calculationCache[$cellReference];
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param string $cellReference
+ * @param mixed $cellValue
+ */
+ public function saveValueToCache($cellReference, $cellValue): void
+ {
+ if ($this->calculationCacheEnabled) {
+ $this->calculationCache[$cellReference] = $cellValue;
+ }
+ }
+
+ /**
+ * Parse a cell formula and calculate its value.
+ *
+ * @param string $formula The formula to parse and calculate
+ * @param string $cellID The ID (e.g. A3) of the cell that we are calculating
+ * @param Cell $pCell Cell to calculate
+ *
+ * @return mixed
+ */
+ public function _calculateFormulaValue($formula, $cellID = null, ?Cell $pCell = null)
+ {
+ $cellValue = null;
+
+ // Quote-Prefixed cell values cannot be formulae, but are treated as strings
+ if ($pCell !== null && $pCell->getStyle()->getQuotePrefix() === true) {
+ return self::wrapResult((string) $formula);
+ }
+
+ if (preg_match('/^=\s*cmd\s*\|/miu', $formula) !== 0) {
+ return self::wrapResult($formula);
+ }
+
+ // Basic validation that this is indeed a formula
+ // We simply return the cell value if not
+ $formula = trim($formula);
+ if ($formula[0] != '=') {
+ return self::wrapResult($formula);
+ }
+ $formula = ltrim(substr($formula, 1));
+ if (!isset($formula[0])) {
+ return self::wrapResult($formula);
+ }
+
+ $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null;
+ $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : "\x00Wrk";
+ $wsCellReference = $wsTitle . '!' . $cellID;
+
+ if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) {
+ return $cellValue;
+ }
+ $this->debugLog->writeDebugLog('Evaluating formula for cell ', $wsCellReference);
+
+ if (($wsTitle[0] !== "\x00") && ($this->cyclicReferenceStack->onStack($wsCellReference))) {
+ if ($this->cyclicFormulaCount <= 0) {
+ $this->cyclicFormulaCell = '';
+
+ return $this->raiseFormulaError('Cyclic Reference in Formula');
+ } elseif ($this->cyclicFormulaCell === $wsCellReference) {
+ ++$this->cyclicFormulaCounter;
+ if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) {
+ $this->cyclicFormulaCell = '';
+
+ return $cellValue;
+ }
+ } elseif ($this->cyclicFormulaCell == '') {
+ if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) {
+ return $cellValue;
+ }
+ $this->cyclicFormulaCell = $wsCellReference;
+ }
+ }
+
+ $this->debugLog->writeDebugLog('Formula for cell ', $wsCellReference, ' is ', $formula);
+ // Parse the formula onto the token stack and calculate the value
+ $this->cyclicReferenceStack->push($wsCellReference);
+ $cellValue = $this->processTokenStack($this->internalParseFormula($formula, $pCell), $cellID, $pCell);
+ $this->cyclicReferenceStack->pop();
+
+ // Save to calculation cache
+ if ($cellID !== null) {
+ $this->saveValueToCache($wsCellReference, $cellValue);
+ }
+
+ // Return the calculated value
+ return $cellValue;
+ }
+
+ /**
+ * Ensure that paired matrix operands are both matrices and of the same size.
+ *
+ * @param mixed &$operand1 First matrix operand
+ * @param mixed &$operand2 Second matrix operand
+ * @param int $resize Flag indicating whether the matrices should be resized to match
+ * and (if so), whether the smaller dimension should grow or the
+ * larger should shrink.
+ * 0 = no resize
+ * 1 = shrink to fit
+ * 2 = extend to fit
+ *
+ * @return array
+ */
+ private static function checkMatrixOperands(&$operand1, &$operand2, $resize = 1)
+ {
+ // Examine each of the two operands, and turn them into an array if they aren't one already
+ // Note that this function should only be called if one or both of the operand is already an array
+ if (!is_array($operand1)) {
+ [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand2);
+ $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1));
+ $resize = 0;
+ } elseif (!is_array($operand2)) {
+ [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand1);
+ $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2));
+ $resize = 0;
+ }
+
+ [$matrix1Rows, $matrix1Columns] = self::getMatrixDimensions($operand1);
+ [$matrix2Rows, $matrix2Columns] = self::getMatrixDimensions($operand2);
+ if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) {
+ $resize = 1;
+ }
+
+ if ($resize == 2) {
+ // Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger
+ self::resizeMatricesExtend($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns);
+ } elseif ($resize == 1) {
+ // Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller
+ self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns);
+ }
+
+ return [$matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns];
+ }
+
+ /**
+ * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0.
+ *
+ * @param array &$matrix matrix operand
+ *
+ * @return int[] An array comprising the number of rows, and number of columns
+ */
+ public static function getMatrixDimensions(array &$matrix)
+ {
+ $matrixRows = count($matrix);
+ $matrixColumns = 0;
+ foreach ($matrix as $rowKey => $rowValue) {
+ if (!is_array($rowValue)) {
+ $matrix[$rowKey] = [$rowValue];
+ $matrixColumns = max(1, $matrixColumns);
+ } else {
+ $matrix[$rowKey] = array_values($rowValue);
+ $matrixColumns = max(count($rowValue), $matrixColumns);
+ }
+ }
+ $matrix = array_values($matrix);
+
+ return [$matrixRows, $matrixColumns];
+ }
+
+ /**
+ * Ensure that paired matrix operands are both matrices of the same size.
+ *
+ * @param mixed &$matrix1 First matrix operand
+ * @param mixed &$matrix2 Second matrix operand
+ * @param int $matrix1Rows Row size of first matrix operand
+ * @param int $matrix1Columns Column size of first matrix operand
+ * @param int $matrix2Rows Row size of second matrix operand
+ * @param int $matrix2Columns Column size of second matrix operand
+ */
+ private static function resizeMatricesShrink(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns): void
+ {
+ if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
+ if ($matrix2Rows < $matrix1Rows) {
+ for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) {
+ unset($matrix1[$i]);
+ }
+ }
+ if ($matrix2Columns < $matrix1Columns) {
+ for ($i = 0; $i < $matrix1Rows; ++$i) {
+ for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) {
+ unset($matrix1[$i][$j]);
+ }
+ }
+ }
+ }
+
+ if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) {
+ if ($matrix1Rows < $matrix2Rows) {
+ for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) {
+ unset($matrix2[$i]);
+ }
+ }
+ if ($matrix1Columns < $matrix2Columns) {
+ for ($i = 0; $i < $matrix2Rows; ++$i) {
+ for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) {
+ unset($matrix2[$i][$j]);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Ensure that paired matrix operands are both matrices of the same size.
+ *
+ * @param mixed &$matrix1 First matrix operand
+ * @param mixed &$matrix2 Second matrix operand
+ * @param int $matrix1Rows Row size of first matrix operand
+ * @param int $matrix1Columns Column size of first matrix operand
+ * @param int $matrix2Rows Row size of second matrix operand
+ * @param int $matrix2Columns Column size of second matrix operand
+ */
+ private static function resizeMatricesExtend(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns): void
+ {
+ if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
+ if ($matrix2Columns < $matrix1Columns) {
+ for ($i = 0; $i < $matrix2Rows; ++$i) {
+ $x = $matrix2[$i][$matrix2Columns - 1];
+ for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) {
+ $matrix2[$i][$j] = $x;
+ }
+ }
+ }
+ if ($matrix2Rows < $matrix1Rows) {
+ $x = $matrix2[$matrix2Rows - 1];
+ for ($i = 0; $i < $matrix1Rows; ++$i) {
+ $matrix2[$i] = $x;
+ }
+ }
+ }
+
+ if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) {
+ if ($matrix1Columns < $matrix2Columns) {
+ for ($i = 0; $i < $matrix1Rows; ++$i) {
+ $x = $matrix1[$i][$matrix1Columns - 1];
+ for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) {
+ $matrix1[$i][$j] = $x;
+ }
+ }
+ }
+ if ($matrix1Rows < $matrix2Rows) {
+ $x = $matrix1[$matrix1Rows - 1];
+ for ($i = 0; $i < $matrix2Rows; ++$i) {
+ $matrix1[$i] = $x;
+ }
+ }
+ }
+ }
+
+ /**
+ * Format details of an operand for display in the log (based on operand type).
+ *
+ * @param mixed $value First matrix operand
+ *
+ * @return mixed
+ */
+ private function showValue($value)
+ {
+ if ($this->debugLog->getWriteDebugLog()) {
+ $testArray = Functions::flattenArray($value);
+ if (count($testArray) == 1) {
+ $value = array_pop($testArray);
+ }
+
+ if (is_array($value)) {
+ $returnMatrix = [];
+ $pad = $rpad = ', ';
+ foreach ($value as $row) {
+ if (is_array($row)) {
+ $returnMatrix[] = implode($pad, array_map([$this, 'showValue'], $row));
+ $rpad = '; ';
+ } else {
+ $returnMatrix[] = $this->showValue($row);
+ }
+ }
+
+ return '{ ' . implode($rpad, $returnMatrix) . ' }';
+ } elseif (is_string($value) && (trim($value, self::FORMULA_STRING_QUOTE) == $value)) {
+ return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE;
+ } elseif (is_bool($value)) {
+ return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];
+ }
+ }
+
+ return Functions::flattenSingleValue($value);
+ }
+
+ /**
+ * Format type and details of an operand for display in the log (based on operand type).
+ *
+ * @param mixed $value First matrix operand
+ *
+ * @return null|string
+ */
+ private function showTypeDetails($value)
+ {
+ if ($this->debugLog->getWriteDebugLog()) {
+ $testArray = Functions::flattenArray($value);
+ if (count($testArray) == 1) {
+ $value = array_pop($testArray);
+ }
+
+ if ($value === null) {
+ return 'a NULL value';
+ } elseif (is_float($value)) {
+ $typeString = 'a floating point number';
+ } elseif (is_int($value)) {
+ $typeString = 'an integer number';
+ } elseif (is_bool($value)) {
+ $typeString = 'a boolean';
+ } elseif (is_array($value)) {
+ $typeString = 'a matrix';
+ } else {
+ if ($value == '') {
+ return 'an empty string';
+ } elseif ($value[0] == '#') {
+ return 'a ' . $value . ' error';
+ }
+ $typeString = 'a string';
+ }
+
+ return $typeString . ' with a value of ' . $this->showValue($value);
+ }
+ }
+
+ /**
+ * @param string $formula
+ *
+ * @return false|string False indicates an error
+ */
+ private function convertMatrixReferences($formula)
+ {
+ static $matrixReplaceFrom = [self::FORMULA_OPEN_FUNCTION_BRACE, ';', self::FORMULA_CLOSE_FUNCTION_BRACE];
+ static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'];
+
+ // Convert any Excel matrix references to the MKMATRIX() function
+ if (strpos($formula, self::FORMULA_OPEN_FUNCTION_BRACE) !== false) {
+ // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators
+ if (strpos($formula, self::FORMULA_STRING_QUOTE) !== false) {
+ // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded
+ // the formula
+ $temp = explode(self::FORMULA_STRING_QUOTE, $formula);
+ // Open and Closed counts used for trapping mismatched braces in the formula
+ $openCount = $closeCount = 0;
+ $i = false;
+ foreach ($temp as &$value) {
+ // Only count/replace in alternating array entries
+ if ($i = !$i) {
+ $openCount += substr_count($value, self::FORMULA_OPEN_FUNCTION_BRACE);
+ $closeCount += substr_count($value, self::FORMULA_CLOSE_FUNCTION_BRACE);
+ $value = str_replace($matrixReplaceFrom, $matrixReplaceTo, $value);
+ }
+ }
+ unset($value);
+ // Then rebuild the formula string
+ $formula = implode(self::FORMULA_STRING_QUOTE, $temp);
+ } else {
+ // If there's no quoted strings, then we do a simple count/replace
+ $openCount = substr_count($formula, self::FORMULA_OPEN_FUNCTION_BRACE);
+ $closeCount = substr_count($formula, self::FORMULA_CLOSE_FUNCTION_BRACE);
+ $formula = str_replace($matrixReplaceFrom, $matrixReplaceTo, $formula);
+ }
+ // Trap for mismatched braces and trigger an appropriate error
+ if ($openCount < $closeCount) {
+ if ($openCount > 0) {
+ return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '}'");
+ }
+
+ return $this->raiseFormulaError("Formula Error: Unexpected '}' encountered");
+ } elseif ($openCount > $closeCount) {
+ if ($closeCount > 0) {
+ return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '{'");
+ }
+
+ return $this->raiseFormulaError("Formula Error: Unexpected '{' encountered");
+ }
+ }
+
+ return $formula;
+ }
+
+ private static function mkMatrix(...$args)
+ {
+ return $args;
+ }
+
+ // Binary Operators
+ // These operators always work on two values
+ // Array key is the operator, the value indicates whether this is a left or right associative operator
+ private static $operatorAssociativity = [
+ '^' => 0, // Exponentiation
+ '*' => 0, '/' => 0, // Multiplication and Division
+ '+' => 0, '-' => 0, // Addition and Subtraction
+ '&' => 0, // Concatenation
+ '|' => 0, ':' => 0, // Intersect and Range
+ '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison
+ ];
+
+ // Comparison (Boolean) Operators
+ // These operators work on two values, but always return a boolean result
+ private static $comparisonOperators = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true];
+
+ // Operator Precedence
+ // This list includes all valid operators, whether binary (including boolean) or unary (such as %)
+ // Array key is the operator, the value is its precedence
+ private static $operatorPrecedence = [
+ ':' => 8, // Range
+ '|' => 7, // Intersect
+ '~' => 6, // Negation
+ '%' => 5, // Percentage
+ '^' => 4, // Exponentiation
+ '*' => 3, '/' => 3, // Multiplication and Division
+ '+' => 2, '-' => 2, // Addition and Subtraction
+ '&' => 1, // Concatenation
+ '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison
+ ];
+
+ // Convert infix to postfix notation
+
+ /**
+ * @param string $formula
+ *
+ * @return bool
+ */
+ private function internalParseFormula($formula, ?Cell $pCell = null)
+ {
+ if (($formula = $this->convertMatrixReferences(trim($formula))) === false) {
+ return false;
+ }
+
+ // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet),
+ // so we store the parent worksheet so that we can re-attach it when necessary
+ $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null;
+
+ $regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION .
+ '|' . self::CALCULATION_REGEXP_CELLREF .
+ '|' . self::CALCULATION_REGEXP_NUMBER .
+ '|' . self::CALCULATION_REGEXP_STRING .
+ '|' . self::CALCULATION_REGEXP_OPENBRACE .
+ '|' . self::CALCULATION_REGEXP_DEFINEDNAME .
+ '|' . self::CALCULATION_REGEXP_ERROR .
+ ')/sui';
+
+ // Start with initialisation
+ $index = 0;
+ $stack = new Stack();
+ $output = [];
+ $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a
+ // - is a negation or + is a positive operator rather than an operation
+ $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand
+ // should be null in a function call
+
+ // IF branch pruning
+ // currently pending storeKey (last item of the storeKeysStack
+ $pendingStoreKey = null;
+ // stores a list of storeKeys (string[])
+ $pendingStoreKeysStack = [];
+ $expectingConditionMap = []; // ['storeKey' => true, ...]
+ $expectingThenMap = []; // ['storeKey' => true, ...]
+ $expectingElseMap = []; // ['storeKey' => true, ...]
+ $parenthesisDepthMap = []; // ['storeKey' => 4, ...]
+
+ // The guts of the lexical parser
+ // Loop through the formula extracting each operator and operand in turn
+ while (true) {
+ // Branch pruning: we adapt the output item to the context (it will
+ // be used to limit its computation)
+ $currentCondition = null;
+ $currentOnlyIf = null;
+ $currentOnlyIfNot = null;
+ $previousStoreKey = null;
+ $pendingStoreKey = end($pendingStoreKeysStack);
+
+ if ($this->branchPruningEnabled) {
+ // this is a condition ?
+ if (isset($expectingConditionMap[$pendingStoreKey]) && $expectingConditionMap[$pendingStoreKey]) {
+ $currentCondition = $pendingStoreKey;
+ $stackDepth = count($pendingStoreKeysStack);
+ if ($stackDepth > 1) { // nested if
+ $previousStoreKey = $pendingStoreKeysStack[$stackDepth - 2];
+ }
+ }
+ if (isset($expectingThenMap[$pendingStoreKey]) && $expectingThenMap[$pendingStoreKey]) {
+ $currentOnlyIf = $pendingStoreKey;
+ } elseif (isset($previousStoreKey)) {
+ if (isset($expectingThenMap[$previousStoreKey]) && $expectingThenMap[$previousStoreKey]) {
+ $currentOnlyIf = $previousStoreKey;
+ }
+ }
+ if (isset($expectingElseMap[$pendingStoreKey]) && $expectingElseMap[$pendingStoreKey]) {
+ $currentOnlyIfNot = $pendingStoreKey;
+ } elseif (isset($previousStoreKey)) {
+ if (isset($expectingElseMap[$previousStoreKey]) && $expectingElseMap[$previousStoreKey]) {
+ $currentOnlyIfNot = $previousStoreKey;
+ }
+ }
+ }
+
+ $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
+
+ if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula[$index + 1]]))) {
+ $opCharacter .= $formula[++$index];
+ }
+ // Find out if we're currently at the beginning of a number, variable, cell reference, function, parenthesis or operand
+ $isOperandOrFunction = preg_match($regexpMatchString, substr($formula, $index), $match);
+ if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus?
+ // Put a negation on the stack
+ $stack->push('Unary Operator', '~', null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ ++$index; // and drop the negation symbol
+ } elseif ($opCharacter == '%' && $expectingOperator) {
+ // Put a percentage on the stack
+ $stack->push('Unary Operator', '%', null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ ++$index;
+ } elseif ($opCharacter == '+' && !$expectingOperator) { // Positive (unary plus rather than binary operator plus) can be discarded?
+ ++$index; // Drop the redundant plus symbol
+ } elseif ((($opCharacter == '~') || ($opCharacter == '|')) && (!$isOperandOrFunction)) { // We have to explicitly deny a tilde or pipe, because they are legal
+ return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression
+ } elseif ((isset(self::$operators[$opCharacter]) || $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack?
+ while (
+ $stack->count() > 0 &&
+ ($o2 = $stack->last()) &&
+ isset(self::$operators[$o2['value']]) &&
+ @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])
+ ) {
+ $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output
+ }
+
+ // Finally put our current operator onto the stack
+ $stack->push('Binary Operator', $opCharacter, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+
+ ++$index;
+ $expectingOperator = false;
+ } elseif ($opCharacter == ')' && $expectingOperator) { // Are we expecting to close a parenthesis?
+ $expectingOperand = false;
+ while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last (
+ if ($o2 === null) {
+ return $this->raiseFormulaError('Formula Error: Unexpected closing brace ")"');
+ }
+ $output[] = $o2;
+ }
+ $d = $stack->last(2);
+
+ // Branch pruning we decrease the depth whether is it a function
+ // call or a parenthesis
+ if (!empty($pendingStoreKey)) {
+ --$parenthesisDepthMap[$pendingStoreKey];
+ }
+
+ if (is_array($d) && preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $d['value'], $matches)) { // Did this parenthesis just close a function?
+ if (!empty($pendingStoreKey) && $parenthesisDepthMap[$pendingStoreKey] == -1) {
+ // we are closing an IF(
+ if ($d['value'] != 'IF(') {
+ return $this->raiseFormulaError('Parser bug we should be in an "IF("');
+ }
+ if ($expectingConditionMap[$pendingStoreKey]) {
+ return $this->raiseFormulaError('We should not be expecting a condition');
+ }
+ $expectingThenMap[$pendingStoreKey] = false;
+ $expectingElseMap[$pendingStoreKey] = false;
+ --$parenthesisDepthMap[$pendingStoreKey];
+ array_pop($pendingStoreKeysStack);
+ unset($pendingStoreKey);
+ }
+
+ $functionName = $matches[1]; // Get the function name
+ $d = $stack->pop();
+ $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack)
+ $output[] = $d; // Dump the argument count on the output
+ $output[] = $stack->pop(); // Pop the function and push onto the output
+ if (isset(self::$controlFunctions[$functionName])) {
+ $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount'];
+ $functionCall = self::$controlFunctions[$functionName]['functionCall'];
+ } elseif (isset(self::$phpSpreadsheetFunctions[$functionName])) {
+ $expectedArgumentCount = self::$phpSpreadsheetFunctions[$functionName]['argumentCount'];
+ $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall'];
+ } else { // did we somehow push a non-function on the stack? this should never happen
+ return $this->raiseFormulaError('Formula Error: Internal error, non-function on stack');
+ }
+ // Check the argument count
+ $argumentCountError = false;
+ if (is_numeric($expectedArgumentCount)) {
+ if ($expectedArgumentCount < 0) {
+ if ($argumentCount > abs($expectedArgumentCount)) {
+ $argumentCountError = true;
+ $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount);
+ }
+ } else {
+ if ($argumentCount != $expectedArgumentCount) {
+ $argumentCountError = true;
+ $expectedArgumentCountString = $expectedArgumentCount;
+ }
+ }
+ } elseif ($expectedArgumentCount != '*') {
+ $isOperandOrFunction = preg_match('/(\d*)([-+,])(\d*)/', $expectedArgumentCount, $argMatch);
+ switch ($argMatch[2]) {
+ case '+':
+ if ($argumentCount < $argMatch[1]) {
+ $argumentCountError = true;
+ $expectedArgumentCountString = $argMatch[1] . ' or more ';
+ }
+
+ break;
+ case '-':
+ if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) {
+ $argumentCountError = true;
+ $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3];
+ }
+
+ break;
+ case ',':
+ if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) {
+ $argumentCountError = true;
+ $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3];
+ }
+
+ break;
+ }
+ }
+ if ($argumentCountError) {
+ return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, " . $expectedArgumentCountString . ' expected');
+ }
+ }
+ ++$index;
+ } elseif ($opCharacter == ',') { // Is this the separator for function arguments?
+ if (
+ !empty($pendingStoreKey) &&
+ $parenthesisDepthMap[$pendingStoreKey] == 0
+ ) {
+ // We must go to the IF next argument
+ if ($expectingConditionMap[$pendingStoreKey]) {
+ $expectingConditionMap[$pendingStoreKey] = false;
+ $expectingThenMap[$pendingStoreKey] = true;
+ } elseif ($expectingThenMap[$pendingStoreKey]) {
+ $expectingThenMap[$pendingStoreKey] = false;
+ $expectingElseMap[$pendingStoreKey] = true;
+ } elseif ($expectingElseMap[$pendingStoreKey]) {
+ return $this->raiseFormulaError('Reaching fourth argument of an IF');
+ }
+ }
+ while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last (
+ if ($o2 === null) {
+ return $this->raiseFormulaError('Formula Error: Unexpected ,');
+ }
+ $output[] = $o2; // pop the argument expression stuff and push onto the output
+ }
+ // If we've a comma when we're expecting an operand, then what we actually have is a null operand;
+ // so push a null onto the stack
+ if (($expectingOperand) || (!$expectingOperator)) {
+ $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null];
+ }
+ // make sure there was a function
+ $d = $stack->last(2);
+ if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $d['value'], $matches)) {
+ return $this->raiseFormulaError('Formula Error: Unexpected ,');
+ }
+ $d = $stack->pop();
+ $itemStoreKey = $d['storeKey'] ?? null;
+ $itemOnlyIf = $d['onlyIf'] ?? null;
+ $itemOnlyIfNot = $d['onlyIfNot'] ?? null;
+ $stack->push($d['type'], ++$d['value'], $d['reference'], $itemStoreKey, $itemOnlyIf, $itemOnlyIfNot); // increment the argument count
+ $stack->push('Brace', '(', null, $itemStoreKey, $itemOnlyIf, $itemOnlyIfNot); // put the ( back on, we'll need to pop back to it again
+ $expectingOperator = false;
+ $expectingOperand = true;
+ ++$index;
+ } elseif ($opCharacter == '(' && !$expectingOperator) {
+ if (!empty($pendingStoreKey)) { // Branch pruning: we go deeper
+ ++$parenthesisDepthMap[$pendingStoreKey];
+ }
+ $stack->push('Brace', '(', null, $currentCondition, $currentOnlyIf, $currentOnlyIf);
+ ++$index;
+ } elseif ($isOperandOrFunction && !$expectingOperator) { // do we now have a function/variable/number?
+ $expectingOperator = true;
+ $expectingOperand = false;
+ $val = $match[1];
+ $length = strlen($val);
+ if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $val, $matches)) {
+ $val = preg_replace('/\s/u', '', $val);
+ if (isset(self::$phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function
+ $valToUpper = strtoupper($val);
+ } else {
+ $valToUpper = 'NAME.ERROR(';
+ }
+ // here $matches[1] will contain values like "IF"
+ // and $val "IF("
+ if ($this->branchPruningEnabled && ($valToUpper == 'IF(')) { // we handle a new if
+ $pendingStoreKey = $this->getUnusedBranchStoreKey();
+ $pendingStoreKeysStack[] = $pendingStoreKey;
+ $expectingConditionMap[$pendingStoreKey] = true;
+ $parenthesisDepthMap[$pendingStoreKey] = 0;
+ } else { // this is not an if but we go deeper
+ if (!empty($pendingStoreKey) && array_key_exists($pendingStoreKey, $parenthesisDepthMap)) {
+ ++$parenthesisDepthMap[$pendingStoreKey];
+ }
+ }
+
+ $stack->push('Function', $valToUpper, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ // tests if the function is closed right after opening
+ $ax = preg_match('/^\s*\)/u', substr($formula, $index + $length));
+ if ($ax) {
+ $stack->push('Operand Count for Function ' . $valToUpper . ')', 0, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ $expectingOperator = true;
+ } else {
+ $stack->push('Operand Count for Function ' . $valToUpper . ')', 1, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ $expectingOperator = false;
+ }
+ $stack->push('Brace', '(');
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $val, $matches)) {
+ // Watch for this case-change when modifying to allow cell references in different worksheets...
+ // Should only be applied to the actual cell column, not the worksheet name
+ // If the last entry on the stack was a : operator, then we have a cell range reference
+ $testPrevOp = $stack->last(1);
+ if ($testPrevOp !== null && $testPrevOp['value'] == ':') {
+ // If we have a worksheet reference, then we're playing with a 3D reference
+ if ($matches[2] == '') {
+ // Otherwise, we 'inherit' the worksheet reference from the start cell reference
+ // The start of the cell range reference should be the last entry in $output
+ $rangeStartCellRef = $output[count($output) - 1]['value'];
+ preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $rangeStartCellRef, $rangeStartMatches);
+ if ($rangeStartMatches[2] > '') {
+ $val = $rangeStartMatches[2] . '!' . $val;
+ }
+ } else {
+ $rangeStartCellRef = $output[count($output) - 1]['value'];
+ preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $rangeStartCellRef, $rangeStartMatches);
+ if ($rangeStartMatches[2] !== $matches[2]) {
+ return $this->raiseFormulaError('3D Range references are not yet supported');
+ }
+ }
+ }
+
+ $outputItem = $stack->getStackItem('Cell Reference', $val, $val, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+
+ $output[] = $outputItem;
+ } else { // it's a variable, constant, string, number or boolean
+ // If the last entry on the stack was a : operator, then we may have a row or column range reference
+ $testPrevOp = $stack->last(1);
+ if ($testPrevOp !== null && $testPrevOp['value'] === ':') {
+ $startRowColRef = $output[count($output) - 1]['value'];
+ [$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true);
+ $rangeSheetRef = $rangeWS1;
+ if ($rangeWS1 != '') {
+ $rangeWS1 .= '!';
+ }
+ [$rangeWS2, $val] = Worksheet::extractSheetTitle($val, true);
+ if ($rangeWS2 != '') {
+ $rangeWS2 .= '!';
+ } else {
+ $rangeWS2 = $rangeWS1;
+ }
+ $refSheet = $pCellParent;
+ if ($pCellParent !== null && $rangeSheetRef !== $pCellParent->getTitle()) {
+ $refSheet = $pCellParent->getParent()->getSheetByName($rangeSheetRef);
+ }
+ if (
+ (is_int($startRowColRef)) && (ctype_digit($val)) &&
+ ($startRowColRef <= 1048576) && ($val <= 1048576)
+ ) {
+ // Row range
+ $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007
+ $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef;
+ $val = $rangeWS2 . $endRowColRef . $val;
+ } elseif (
+ (ctype_alpha($startRowColRef)) && (ctype_alpha($val)) &&
+ (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)
+ ) {
+ // Column range
+ $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007
+ $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1';
+ $val = $rangeWS2 . $val . $endRowColRef;
+ }
+ }
+
+ $localeConstant = false;
+ $stackItemType = 'Value';
+ $stackItemReference = null;
+ if ($opCharacter == self::FORMULA_STRING_QUOTE) {
+ // UnEscape any quotes within the string
+ $val = self::wrapResult(str_replace('""', self::FORMULA_STRING_QUOTE, self::unwrapResult($val)));
+ } elseif (is_numeric($val)) {
+ if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) {
+ $val = (float) $val;
+ } else {
+ $val = (int) $val;
+ }
+ } elseif (isset(self::$excelConstants[trim(strtoupper($val))])) {
+ $stackItemType = 'Constant';
+ $excelConstant = trim(strtoupper($val));
+ $val = self::$excelConstants[$excelConstant];
+ } elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) {
+ $stackItemType = 'Constant';
+ $val = self::$excelConstants[$localeConstant];
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', $val, $match)) {
+ $stackItemType = 'Defined Name';
+ $stackItemReference = $val;
+ }
+ $details = $stack->getStackItem($stackItemType, $val, $stackItemReference, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
+ if ($localeConstant) {
+ $details['localeValue'] = $localeConstant;
+ }
+ $output[] = $details;
+ }
+ $index += $length;
+ } elseif ($opCharacter == '$') { // absolute row or column range
+ ++$index;
+ } elseif ($opCharacter == ')') { // miscellaneous error checking
+ if ($expectingOperand) {
+ $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null];
+ $expectingOperand = false;
+ $expectingOperator = true;
+ } else {
+ return $this->raiseFormulaError("Formula Error: Unexpected ')'");
+ }
+ } elseif (isset(self::$operators[$opCharacter]) && !$expectingOperator) {
+ return $this->raiseFormulaError("Formula Error: Unexpected operator '$opCharacter'");
+ } else { // I don't even want to know what you did to get here
+ return $this->raiseFormulaError('Formula Error: An unexpected error occurred');
+ }
+ // Test for end of formula string
+ if ($index == strlen($formula)) {
+ // Did we end with an operator?.
+ // Only valid for the % unary operator
+ if ((isset(self::$operators[$opCharacter])) && ($opCharacter != '%')) {
+ return $this->raiseFormulaError("Formula Error: Operator '$opCharacter' has no operands");
+ }
+
+ break;
+ }
+ // Ignore white space
+ while (($formula[$index] == "\n") || ($formula[$index] == "\r")) {
+ ++$index;
+ }
+
+ if ($formula[$index] == ' ') {
+ while ($formula[$index] == ' ') {
+ ++$index;
+ }
+
+ // If we're expecting an operator, but only have a space between the previous and next operands (and both are
+ // Cell References) then we have an INTERSECTION operator
+ if (
+ ($expectingOperator) &&
+ ((preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) &&
+ ($output[count($output) - 1]['type'] == 'Cell Reference') ||
+ (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', substr($formula, $index), $match)) &&
+ ($output[count($output) - 1]['type'] == 'Defined Name' || $output[count($output) - 1]['type'] == 'Value')
+ )
+ ) {
+ while (
+ $stack->count() > 0 &&
+ ($o2 = $stack->last()) &&
+ isset(self::$operators[$o2['value']]) &&
+ @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])
+ ) {
+ $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output
+ }
+ $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack
+ $expectingOperator = false;
+ }
+ }
+ }
+
+ while (($op = $stack->pop()) !== null) { // pop everything off the stack and push onto output
+ if ((is_array($op) && $op['value'] == '(') || ($op === '(')) {
+ return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced
+ }
+ $output[] = $op;
+ }
+
+ return $output;
+ }
+
+ private static function dataTestReference(&$operandData)
+ {
+ $operand = $operandData['value'];
+ if (($operandData['reference'] === null) && (is_array($operand))) {
+ $rKeys = array_keys($operand);
+ $rowKey = array_shift($rKeys);
+ $cKeys = array_keys(array_keys($operand[$rowKey]));
+ $colKey = array_shift($cKeys);
+ if (ctype_upper($colKey)) {
+ $operandData['reference'] = $colKey . $rowKey;
+ }
+ }
+
+ return $operand;
+ }
+
+ // evaluate postfix notation
+
+ /**
+ * @param mixed $tokens
+ * @param null|string $cellID
+ *
+ * @return bool
+ */
+ private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null)
+ {
+ if ($tokens == false) {
+ return false;
+ }
+
+ // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent cell collection),
+ // so we store the parent cell collection so that we can re-attach it when necessary
+ $pCellWorksheet = ($pCell !== null) ? $pCell->getWorksheet() : null;
+ $pCellParent = ($pCell !== null) ? $pCell->getParent() : null;
+ $stack = new Stack();
+
+ // Stores branches that have been pruned
+ $fakedForBranchPruning = [];
+ // help us to know when pruning ['branchTestId' => true/false]
+ $branchStore = [];
+ // Loop through each token in turn
+ foreach ($tokens as $tokenData) {
+ $token = $tokenData['value'];
+
+ // Branch pruning: skip useless resolutions
+ $storeKey = $tokenData['storeKey'] ?? null;
+ if ($this->branchPruningEnabled && isset($tokenData['onlyIf'])) {
+ $onlyIfStoreKey = $tokenData['onlyIf'];
+ $storeValue = $branchStore[$onlyIfStoreKey] ?? null;
+ $storeValueAsBool = ($storeValue === null) ?
+ true : (bool) Functions::flattenSingleValue($storeValue);
+ if (is_array($storeValue)) {
+ $wrappedItem = end($storeValue);
+ $storeValue = end($wrappedItem);
+ }
+
+ if (
+ isset($storeValue)
+ && (
+ !$storeValueAsBool
+ || Functions::isError($storeValue)
+ || ($storeValue === 'Pruned branch')
+ )
+ ) {
+ // If branching value is not true, we don't need to compute
+ if (!isset($fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey])) {
+ $stack->push('Value', 'Pruned branch (only if ' . $onlyIfStoreKey . ') ' . $token);
+ $fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey] = true;
+ }
+
+ if (isset($storeKey)) {
+ // We are processing an if condition
+ // We cascade the pruning to the depending branches
+ $branchStore[$storeKey] = 'Pruned branch';
+ $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true;
+ $fakedForBranchPruning['onlyIf-' . $storeKey] = true;
+ }
+
+ continue;
+ }
+ }
+
+ if ($this->branchPruningEnabled && isset($tokenData['onlyIfNot'])) {
+ $onlyIfNotStoreKey = $tokenData['onlyIfNot'];
+ $storeValue = $branchStore[$onlyIfNotStoreKey] ?? null;
+ $storeValueAsBool = ($storeValue === null) ?
+ true : (bool) Functions::flattenSingleValue($storeValue);
+ if (is_array($storeValue)) {
+ $wrappedItem = end($storeValue);
+ $storeValue = end($wrappedItem);
+ }
+ if (
+ isset($storeValue)
+ && (
+ $storeValueAsBool
+ || Functions::isError($storeValue)
+ || ($storeValue === 'Pruned branch'))
+ ) {
+ // If branching value is true, we don't need to compute
+ if (!isset($fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey])) {
+ $stack->push('Value', 'Pruned branch (only if not ' . $onlyIfNotStoreKey . ') ' . $token);
+ $fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey] = true;
+ }
+
+ if (isset($storeKey)) {
+ // We are processing an if condition
+ // We cascade the pruning to the depending branches
+ $branchStore[$storeKey] = 'Pruned branch';
+ $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true;
+ $fakedForBranchPruning['onlyIf-' . $storeKey] = true;
+ }
+
+ continue;
+ }
+ }
+
+ // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack
+ if (isset(self::$binaryOperators[$token])) {
+ // We must have two operands, error if we don't
+ if (($operand2Data = $stack->pop()) === null) {
+ return $this->raiseFormulaError('Internal error - Operand value missing from stack');
+ }
+ if (($operand1Data = $stack->pop()) === null) {
+ return $this->raiseFormulaError('Internal error - Operand value missing from stack');
+ }
+
+ $operand1 = self::dataTestReference($operand1Data);
+ $operand2 = self::dataTestReference($operand2Data);
+
+ // Log what we're doing
+ if ($token == ':') {
+ $this->debugLog->writeDebugLog('Evaluating Range ', $this->showValue($operand1Data['reference']), ' ', $token, ' ', $this->showValue($operand2Data['reference']));
+ } else {
+ $this->debugLog->writeDebugLog('Evaluating ', $this->showValue($operand1), ' ', $token, ' ', $this->showValue($operand2));
+ }
+
+ // Process the operation in the appropriate manner
+ switch ($token) {
+ // Comparison (Boolean) Operators
+ case '>': // Greater than
+ case '<': // Less than
+ case '>=': // Greater than or Equal to
+ case '<=': // Less than or Equal to
+ case '=': // Equality
+ case '<>': // Inequality
+ $result = $this->executeBinaryComparisonOperation($cellID, $operand1, $operand2, $token, $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ // Binary Operators
+ case ':': // Range
+ if (strpos($operand1Data['reference'], '!') !== false) {
+ [$sheet1, $operand1Data['reference']] = Worksheet::extractSheetTitle($operand1Data['reference'], true);
+ } else {
+ $sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : '';
+ }
+
+ [$sheet2, $operand2Data['reference']] = Worksheet::extractSheetTitle($operand2Data['reference'], true);
+ if (empty($sheet2)) {
+ $sheet2 = $sheet1;
+ }
+
+ if ($sheet1 == $sheet2) {
+ if ($operand1Data['reference'] === null) {
+ if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) {
+ $operand1Data['reference'] = $pCell->getColumn() . $operand1Data['value'];
+ } elseif (trim($operand1Data['reference']) == '') {
+ $operand1Data['reference'] = $pCell->getCoordinate();
+ } else {
+ $operand1Data['reference'] = $operand1Data['value'] . $pCell->getRow();
+ }
+ }
+ if ($operand2Data['reference'] === null) {
+ if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) {
+ $operand2Data['reference'] = $pCell->getColumn() . $operand2Data['value'];
+ } elseif (trim($operand2Data['reference']) == '') {
+ $operand2Data['reference'] = $pCell->getCoordinate();
+ } else {
+ $operand2Data['reference'] = $operand2Data['value'] . $pCell->getRow();
+ }
+ }
+
+ $oData = array_merge(explode(':', $operand1Data['reference']), explode(':', $operand2Data['reference']));
+ $oCol = $oRow = [];
+ foreach ($oData as $oDatum) {
+ $oCR = Coordinate::coordinateFromString($oDatum);
+ $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1;
+ $oRow[] = $oCR[1];
+ }
+ $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow);
+ if ($pCellParent !== null) {
+ $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false);
+ } else {
+ return $this->raiseFormulaError('Unable to access Cell Reference');
+ }
+ $stack->push('Cell Reference', $cellValue, $cellRef);
+ } else {
+ $stack->push('Error', Functions::REF(), null);
+ }
+
+ break;
+ case '+': // Addition
+ $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'plusEquals', $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '-': // Subtraction
+ $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'minusEquals', $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '*': // Multiplication
+ $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayTimesEquals', $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '/': // Division
+ $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayRightDivide', $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '^': // Exponential
+ $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'power', $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '&': // Concatenation
+ // If either of the operands is a matrix, we need to treat them both as matrices
+ // (converting the other operand to a matrix if need be); then perform the required
+ // matrix operation
+ if (is_bool($operand1)) {
+ $operand1 = ($operand1) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];
+ }
+ if (is_bool($operand2)) {
+ $operand2 = ($operand2) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE'];
+ }
+ if ((is_array($operand1)) || (is_array($operand2))) {
+ // Ensure that both operands are arrays/matrices
+ self::checkMatrixOperands($operand1, $operand2, 2);
+
+ try {
+ // Convert operand 1 from a PHP array to a matrix
+ $matrix = new Shared\JAMA\Matrix($operand1);
+ // Perform the required operation against the operand 1 matrix, passing in operand 2
+ $matrixResult = $matrix->concat($operand2);
+ $result = $matrixResult->getArray();
+ } catch (\Exception $ex) {
+ $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage());
+ $result = '#VALUE!';
+ }
+ } else {
+ $result = self::FORMULA_STRING_QUOTE . str_replace('""', self::FORMULA_STRING_QUOTE, self::unwrapResult($operand1) . self::unwrapResult($operand2)) . self::FORMULA_STRING_QUOTE;
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result));
+ $stack->push('Value', $result);
+
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+
+ break;
+ case '|': // Intersect
+ $rowIntersect = array_intersect_key($operand1, $operand2);
+ $cellIntersect = $oCol = $oRow = [];
+ foreach (array_keys($rowIntersect) as $row) {
+ $oRow[] = $row;
+ foreach ($rowIntersect[$row] as $col => $data) {
+ $oCol[] = Coordinate::columnIndexFromString($col) - 1;
+ $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]);
+ }
+ }
+ if (count(Functions::flattenArray($cellIntersect)) === 0) {
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect));
+ $stack->push('Error', Functions::null(), null);
+ } else {
+ $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' .
+ Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow);
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect));
+ $stack->push('Value', $cellIntersect, $cellRef);
+ }
+
+ break;
+ }
+
+ // if the token is a unary operator, pop one value off the stack, do the operation, and push it back on
+ } elseif (($token === '~') || ($token === '%')) {
+ if (($arg = $stack->pop()) === null) {
+ return $this->raiseFormulaError('Internal error - Operand value missing from stack');
+ }
+ $arg = $arg['value'];
+ if ($token === '~') {
+ $this->debugLog->writeDebugLog('Evaluating Negation of ', $this->showValue($arg));
+ $multiplier = -1;
+ } else {
+ $this->debugLog->writeDebugLog('Evaluating Percentile of ', $this->showValue($arg));
+ $multiplier = 0.01;
+ }
+ if (is_array($arg)) {
+ self::checkMatrixOperands($arg, $multiplier, 2);
+
+ try {
+ $matrix1 = new Shared\JAMA\Matrix($arg);
+ $matrixResult = $matrix1->arrayTimesEquals($multiplier);
+ $result = $matrixResult->getArray();
+ } catch (\Exception $ex) {
+ $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage());
+ $result = '#VALUE!';
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result));
+ $stack->push('Value', $result);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+ } else {
+ $this->executeNumericBinaryOperation($multiplier, $arg, '*', 'arrayTimesEquals', $stack);
+ }
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) {
+ $cellRef = null;
+ if (isset($matches[8])) {
+ if ($pCell === null) {
+ // We can't access the range, so return a REF error
+ $cellValue = Functions::REF();
+ } else {
+ $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
+ if ($matches[2] > '') {
+ $matches[2] = trim($matches[2], "\"'");
+ if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
+ // It's a Reference to an external spreadsheet (not currently supported)
+ return $this->raiseFormulaError('Unable to access External Workbook');
+ }
+ $matches[2] = trim($matches[2], "\"'");
+ $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]);
+ if ($pCellParent !== null) {
+ $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false);
+ } else {
+ return $this->raiseFormulaError('Unable to access Cell Reference');
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue));
+ } else {
+ $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in current worksheet');
+ if ($pCellParent !== null) {
+ $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false);
+ } else {
+ return $this->raiseFormulaError('Unable to access Cell Reference');
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' is ', $this->showTypeDetails($cellValue));
+ }
+ }
+ } else {
+ if ($pCell === null) {
+ // We can't access the cell, so return a REF error
+ $cellValue = Functions::REF();
+ } else {
+ $cellRef = $matches[6] . $matches[7];
+ if ($matches[2] > '') {
+ $matches[2] = trim($matches[2], "\"'");
+ if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
+ // It's a Reference to an external spreadsheet (not currently supported)
+ return $this->raiseFormulaError('Unable to access External Workbook');
+ }
+ $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]);
+ if ($pCellParent !== null) {
+ $cellSheet = $this->spreadsheet->getSheetByName($matches[2]);
+ if ($cellSheet && $cellSheet->cellExists($cellRef)) {
+ $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false);
+ $pCell->attach($pCellParent);
+ } else {
+ $cellValue = null;
+ }
+ } else {
+ return $this->raiseFormulaError('Unable to access Cell Reference');
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue));
+ } else {
+ $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in current worksheet');
+ if ($pCellParent->has($cellRef)) {
+ $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false);
+ $pCell->attach($pCellParent);
+ } else {
+ $cellValue = null;
+ }
+ $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' is ', $this->showTypeDetails($cellValue));
+ }
+ }
+ }
+ $stack->push('Value', $cellValue, $cellRef);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $cellValue;
+ }
+
+ // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token, $matches)) {
+ if ($pCellParent) {
+ $pCell->attach($pCellParent);
+ }
+
+ $functionName = $matches[1];
+ $argCount = $stack->pop();
+ $argCount = $argCount['value'];
+ if ($functionName != 'MKMATRIX') {
+ $this->debugLog->writeDebugLog('Evaluating Function ', self::localeFunc($functionName), '() with ', (($argCount == 0) ? 'no' : $argCount), ' argument', (($argCount == 1) ? '' : 's'));
+ }
+ if ((isset(self::$phpSpreadsheetFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) { // function
+ if (isset(self::$phpSpreadsheetFunctions[$functionName])) {
+ $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall'];
+ $passByReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference']);
+ $passCellReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passCellReference']);
+ } elseif (isset(self::$controlFunctions[$functionName])) {
+ $functionCall = self::$controlFunctions[$functionName]['functionCall'];
+ $passByReference = isset(self::$controlFunctions[$functionName]['passByReference']);
+ $passCellReference = isset(self::$controlFunctions[$functionName]['passCellReference']);
+ }
+ // get the arguments for this function
+ $args = $argArrayVals = [];
+ for ($i = 0; $i < $argCount; ++$i) {
+ $arg = $stack->pop();
+ $a = $argCount - $i - 1;
+ if (
+ ($passByReference) &&
+ (isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) &&
+ (self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])
+ ) {
+ if ($arg['reference'] === null) {
+ $args[] = $cellID;
+ if ($functionName != 'MKMATRIX') {
+ $argArrayVals[] = $this->showValue($cellID);
+ }
+ } else {
+ $args[] = $arg['reference'];
+ if ($functionName != 'MKMATRIX') {
+ $argArrayVals[] = $this->showValue($arg['reference']);
+ }
+ }
+ } else {
+ $args[] = self::unwrapResult($arg['value']);
+ if ($functionName != 'MKMATRIX') {
+ $argArrayVals[] = $this->showValue($arg['value']);
+ }
+ }
+ }
+
+ // Reverse the order of the arguments
+ krsort($args);
+
+ if (($passByReference) && ($argCount == 0)) {
+ $args[] = $cellID;
+ $argArrayVals[] = $this->showValue($cellID);
+ }
+
+ if ($functionName != 'MKMATRIX') {
+ if ($this->debugLog->getWriteDebugLog()) {
+ krsort($argArrayVals);
+ $this->debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator . ' ', Functions::flattenArray($argArrayVals)), ' )');
+ }
+ }
+
+ // Process the argument with the appropriate function call
+ $args = $this->addCellReference($args, $passCellReference, $functionCall, $pCell);
+
+ if (!is_array($functionCall)) {
+ foreach ($args as &$arg) {
+ $arg = Functions::flattenSingleValue($arg);
+ }
+ unset($arg);
+ }
+
+ $result = call_user_func_array($functionCall, $args);
+
+ if ($functionName != 'MKMATRIX') {
+ $this->debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($result));
+ }
+ $stack->push('Value', self::wrapResult($result));
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+ }
+ } else {
+ // if the token is a number, boolean, string or an Excel error, push it onto the stack
+ if (isset(self::$excelConstants[strtoupper($token)])) {
+ $excelConstant = strtoupper($token);
+ $stack->push('Constant Value', self::$excelConstants[$excelConstant]);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = self::$excelConstants[$excelConstant];
+ }
+ $this->debugLog->writeDebugLog('Evaluating Constant ', $excelConstant, ' as ', $this->showTypeDetails(self::$excelConstants[$excelConstant]));
+ } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token[0] == self::FORMULA_STRING_QUOTE) || ($token[0] == '#')) {
+ $stack->push('Value', $token);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $token;
+ }
+ // if the token is a named range or formula, evaluate it and push the result onto the stack
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '$/miu', $token, $matches)) {
+ $definedName = $matches[6];
+ if ($pCell === null || $pCellWorksheet === null) {
+ return $this->raiseFormulaError("undefined name '$token'");
+ }
+
+ $this->debugLog->writeDebugLog('Evaluating Defined Name ', $definedName);
+ $namedRange = DefinedName::resolveName($definedName, $pCellWorksheet);
+ if ($namedRange === null) {
+ return $this->raiseFormulaError("undefined name '$definedName'");
+ }
+
+ $result = $this->evaluateDefinedName($pCell, $namedRange, $pCellWorksheet, $stack);
+ if (isset($storeKey)) {
+ $branchStore[$storeKey] = $result;
+ }
+ } else {
+ return $this->raiseFormulaError("undefined name '$token'");
+ }
+ }
+ }
+ // when we're out of tokens, the stack should have a single element, the final result
+ if ($stack->count() != 1) {
+ return $this->raiseFormulaError('internal error');
+ }
+ $output = $stack->pop();
+ $output = $output['value'];
+
+ return $output;
+ }
+
+ private function validateBinaryOperand(&$operand, &$stack)
+ {
+ if (is_array($operand)) {
+ if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) {
+ do {
+ $operand = array_pop($operand);
+ } while (is_array($operand));
+ }
+ }
+ // Numbers, matrices and booleans can pass straight through, as they're already valid
+ if (is_string($operand)) {
+ // We only need special validations for the operand if it is a string
+ // Start by stripping off the quotation marks we use to identify true excel string values internally
+ if ($operand > '' && $operand[0] == self::FORMULA_STRING_QUOTE) {
+ $operand = self::unwrapResult($operand);
+ }
+ // If the string is a numeric value, we treat it as a numeric, so no further testing
+ if (!is_numeric($operand)) {
+ // If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations
+ if ($operand > '' && $operand[0] == '#') {
+ $stack->push('Value', $operand);
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($operand));
+
+ return false;
+ } elseif (!Shared\StringHelper::convertToNumberIfFraction($operand)) {
+ // If not a numeric or a fraction, then it's a text string, and so can't be used in mathematical binary operations
+ $stack->push('Error', '#VALUE!');
+ $this->debugLog->writeDebugLog('Evaluation Result is a ', $this->showTypeDetails('#VALUE!'));
+
+ return false;
+ }
+ }
+ }
+
+ // return a true if the value of the operand is one that we can use in normal binary operations
+ return true;
+ }
+
+ /**
+ * @param null|string $cellID
+ * @param mixed $operand1
+ * @param mixed $operand2
+ * @param string $operation
+ * @param bool $recursingArrays
+ *
+ * @return mixed
+ */
+ private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false)
+ {
+ // If we're dealing with matrix operations, we want a matrix result
+ if ((is_array($operand1)) || (is_array($operand2))) {
+ $result = [];
+ if ((is_array($operand1)) && (!is_array($operand2))) {
+ foreach ($operand1 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2));
+ $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ } elseif ((!is_array($operand1)) && (is_array($operand2))) {
+ foreach ($operand2 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData));
+ $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ } else {
+ if (!$recursingArrays) {
+ self::checkMatrixOperands($operand1, $operand2, 2);
+ }
+ foreach ($operand1 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x]));
+ $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ }
+ // Log the result details
+ $this->debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result));
+ // And push the result onto the stack
+ $stack->push('Array', $result);
+
+ return $result;
+ }
+
+ // Simple validate the two operands if they are string values
+ if (is_string($operand1) && $operand1 > '' && $operand1[0] == self::FORMULA_STRING_QUOTE) {
+ $operand1 = self::unwrapResult($operand1);
+ }
+ if (is_string($operand2) && $operand2 > '' && $operand2[0] == self::FORMULA_STRING_QUOTE) {
+ $operand2 = self::unwrapResult($operand2);
+ }
+
+ // Use case insensitive comparaison if not OpenOffice mode
+ if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) {
+ if (is_string($operand1)) {
+ $operand1 = strtoupper($operand1);
+ }
+ if (is_string($operand2)) {
+ $operand2 = strtoupper($operand2);
+ }
+ }
+
+ $useLowercaseFirstComparison = is_string($operand1) && is_string($operand2) && Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE;
+
+ // execute the necessary operation
+ switch ($operation) {
+ // Greater than
+ case '>':
+ if ($useLowercaseFirstComparison) {
+ $result = $this->strcmpLowercaseFirst($operand1, $operand2) > 0;
+ } else {
+ $result = ($operand1 > $operand2);
+ }
+
+ break;
+ // Less than
+ case '<':
+ if ($useLowercaseFirstComparison) {
+ $result = $this->strcmpLowercaseFirst($operand1, $operand2) < 0;
+ } else {
+ $result = ($operand1 < $operand2);
+ }
+
+ break;
+ // Equality
+ case '=':
+ if (is_numeric($operand1) && is_numeric($operand2)) {
+ $result = (abs($operand1 - $operand2) < $this->delta);
+ } else {
+ $result = strcmp($operand1, $operand2) == 0;
+ }
+
+ break;
+ // Greater than or equal
+ case '>=':
+ if (is_numeric($operand1) && is_numeric($operand2)) {
+ $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 > $operand2));
+ } elseif ($useLowercaseFirstComparison) {
+ $result = $this->strcmpLowercaseFirst($operand1, $operand2) >= 0;
+ } else {
+ $result = strcmp($operand1, $operand2) >= 0;
+ }
+
+ break;
+ // Less than or equal
+ case '<=':
+ if (is_numeric($operand1) && is_numeric($operand2)) {
+ $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 < $operand2));
+ } elseif ($useLowercaseFirstComparison) {
+ $result = $this->strcmpLowercaseFirst($operand1, $operand2) <= 0;
+ } else {
+ $result = strcmp($operand1, $operand2) <= 0;
+ }
+
+ break;
+ // Inequality
+ case '<>':
+ if (is_numeric($operand1) && is_numeric($operand2)) {
+ $result = (abs($operand1 - $operand2) > 1E-14);
+ } else {
+ $result = strcmp($operand1, $operand2) != 0;
+ }
+
+ break;
+ }
+
+ // Log the result details
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result));
+ // And push the result onto the stack
+ $stack->push('Value', $result);
+
+ return $result;
+ }
+
+ /**
+ * Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters.
+ *
+ * @param string $str1 First string value for the comparison
+ * @param string $str2 Second string value for the comparison
+ *
+ * @return int
+ */
+ private function strcmpLowercaseFirst($str1, $str2)
+ {
+ $inversedStr1 = Shared\StringHelper::strCaseReverse($str1);
+ $inversedStr2 = Shared\StringHelper::strCaseReverse($str2);
+
+ return strcmp($inversedStr1, $inversedStr2);
+ }
+
+ /**
+ * @param mixed $operand1
+ * @param mixed $operand2
+ * @param mixed $operation
+ * @param string $matrixFunction
+ * @param mixed $stack
+ *
+ * @return bool|mixed
+ */
+ private function executeNumericBinaryOperation($operand1, $operand2, $operation, $matrixFunction, &$stack)
+ {
+ // Validate the two operands
+ if (!$this->validateBinaryOperand($operand1, $stack)) {
+ return false;
+ }
+ if (!$this->validateBinaryOperand($operand2, $stack)) {
+ return false;
+ }
+
+ // If either of the operands is a matrix, we need to treat them both as matrices
+ // (converting the other operand to a matrix if need be); then perform the required
+ // matrix operation
+ if ((is_array($operand1)) || (is_array($operand2))) {
+ // Ensure that both operands are arrays/matrices of the same size
+ self::checkMatrixOperands($operand1, $operand2, 2);
+
+ try {
+ // Convert operand 1 from a PHP array to a matrix
+ $matrix = new Shared\JAMA\Matrix($operand1);
+ // Perform the required operation against the operand 1 matrix, passing in operand 2
+ $matrixResult = $matrix->$matrixFunction($operand2);
+ $result = $matrixResult->getArray();
+ } catch (\Exception $ex) {
+ $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage());
+ $result = '#VALUE!';
+ }
+ } else {
+ if (
+ (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) &&
+ ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1) > 0) ||
+ (is_string($operand2) && !is_numeric($operand2) && strlen($operand2) > 0))
+ ) {
+ $result = Functions::VALUE();
+ } else {
+ // If we're dealing with non-matrix operations, execute the necessary operation
+ switch ($operation) {
+ // Addition
+ case '+':
+ $result = $operand1 + $operand2;
+
+ break;
+ // Subtraction
+ case '-':
+ $result = $operand1 - $operand2;
+
+ break;
+ // Multiplication
+ case '*':
+ $result = $operand1 * $operand2;
+
+ break;
+ // Division
+ case '/':
+ if ($operand2 == 0) {
+ // Trap for Divide by Zero error
+ $stack->push('Error', '#DIV/0!');
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails('#DIV/0!'));
+
+ return false;
+ }
+ $result = $operand1 / $operand2;
+
+ break;
+ // Power
+ case '^':
+ $result = $operand1 ** $operand2;
+
+ break;
+ }
+ }
+ }
+
+ // Log the result details
+ $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result));
+ // And push the result onto the stack
+ $stack->push('Value', $result);
+
+ return $result;
+ }
+
+ // trigger an error, but nicely, if need be
+ protected function raiseFormulaError($errorMessage)
+ {
+ $this->formulaError = $errorMessage;
+ $this->cyclicReferenceStack->clear();
+ if (!$this->suppressFormulaErrors) {
+ throw new Exception($errorMessage);
+ }
+ trigger_error($errorMessage, E_USER_ERROR);
+
+ return false;
+ }
+
+ /**
+ * Extract range values.
+ *
+ * @param string &$pRange String based range representation
+ * @param Worksheet $pSheet Worksheet
+ * @param bool $resetLog Flag indicating whether calculation log should be reset or not
+ *
+ * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned.
+ */
+ public function extractCellRange(&$pRange = 'A1', ?Worksheet $pSheet = null, $resetLog = true)
+ {
+ // Return value
+ $returnValue = [];
+
+ if ($pSheet !== null) {
+ $pSheetName = $pSheet->getTitle();
+ if (strpos($pRange, '!') !== false) {
+ [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true);
+ $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
+ }
+
+ // Extract range
+ $aReferences = Coordinate::extractAllCellReferencesInRange($pRange);
+ $pRange = $pSheetName . '!' . $pRange;
+ if (!isset($aReferences[1])) {
+ $currentCol = '';
+ $currentRow = 0;
+ // Single cell in range
+ sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow);
+ if ($pSheet->cellExists($aReferences[0])) {
+ $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog);
+ } else {
+ $returnValue[$currentRow][$currentCol] = null;
+ }
+ } else {
+ // Extract cell data for all cells in the range
+ foreach ($aReferences as $reference) {
+ $currentCol = '';
+ $currentRow = 0;
+ // Extract range
+ sscanf($reference, '%[A-Z]%d', $currentCol, $currentRow);
+ if ($pSheet->cellExists($reference)) {
+ $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog);
+ } else {
+ $returnValue[$currentRow][$currentCol] = null;
+ }
+ }
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * Extract range values.
+ *
+ * @param string &$pRange String based range representation
+ * @param Worksheet $pSheet Worksheet
+ * @param bool $resetLog Flag indicating whether calculation log should be reset or not
+ *
+ * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned.
+ */
+ public function extractNamedRange(&$pRange = 'A1', ?Worksheet $pSheet = null, $resetLog = true)
+ {
+ // Return value
+ $returnValue = [];
+
+ if ($pSheet !== null) {
+ $pSheetName = $pSheet->getTitle();
+ if (strpos($pRange, '!') !== false) {
+ [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true);
+ $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
+ }
+
+ // Named range?
+ $namedRange = DefinedName::resolveName($pRange, $pSheet);
+ if ($namedRange === null) {
+ return Functions::REF();
+ }
+
+ $pSheet = $namedRange->getWorksheet();
+ $pRange = $namedRange->getValue();
+ $splitRange = Coordinate::splitRange($pRange);
+ // Convert row and column references
+ if (ctype_alpha($splitRange[0][0])) {
+ $pRange = $splitRange[0][0] . '1:' . $splitRange[0][1] . $namedRange->getWorksheet()->getHighestRow();
+ } elseif (ctype_digit($splitRange[0][0])) {
+ $pRange = 'A' . $splitRange[0][0] . ':' . $namedRange->getWorksheet()->getHighestColumn() . $splitRange[0][1];
+ }
+
+ // Extract range
+ $aReferences = Coordinate::extractAllCellReferencesInRange($pRange);
+ if (!isset($aReferences[1])) {
+ // Single cell (or single column or row) in range
+ [$currentCol, $currentRow] = Coordinate::coordinateFromString($aReferences[0]);
+ if ($pSheet->cellExists($aReferences[0])) {
+ $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog);
+ } else {
+ $returnValue[$currentRow][$currentCol] = null;
+ }
+ } else {
+ // Extract cell data for all cells in the range
+ foreach ($aReferences as $reference) {
+ // Extract range
+ [$currentCol, $currentRow] = Coordinate::coordinateFromString($reference);
+ if ($pSheet->cellExists($reference)) {
+ $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog);
+ } else {
+ $returnValue[$currentRow][$currentCol] = null;
+ }
+ }
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * Is a specific function implemented?
+ *
+ * @param string $pFunction Function Name
+ *
+ * @return bool
+ */
+ public function isImplemented($pFunction)
+ {
+ $pFunction = strtoupper($pFunction);
+ $notImplemented = !isset(self::$phpSpreadsheetFunctions[$pFunction]) || (is_array(self::$phpSpreadsheetFunctions[$pFunction]['functionCall']) && self::$phpSpreadsheetFunctions[$pFunction]['functionCall'][1] === 'DUMMY');
+
+ return !$notImplemented;
+ }
+
+ /**
+ * Get a list of all implemented functions as an array of function objects.
+ *
+ * @return array of Category
+ */
+ public function getFunctions()
+ {
+ return self::$phpSpreadsheetFunctions;
+ }
+
+ /**
+ * Get a list of implemented Excel function names.
+ *
+ * @return array
+ */
+ public function getImplementedFunctionNames()
+ {
+ $returnValue = [];
+ foreach (self::$phpSpreadsheetFunctions as $functionName => $function) {
+ if ($this->isImplemented($functionName)) {
+ $returnValue[] = $functionName;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * Add cell reference if needed while making sure that it is the last argument.
+ *
+ * @param bool $passCellReference
+ * @param array|string $functionCall
+ *
+ * @return array
+ */
+ private function addCellReference(array $args, $passCellReference, $functionCall, ?Cell $pCell = null)
+ {
+ if ($passCellReference) {
+ if (is_array($functionCall)) {
+ $className = $functionCall[0];
+ $methodName = $functionCall[1];
+
+ $reflectionMethod = new ReflectionMethod($className, $methodName);
+ $argumentCount = count($reflectionMethod->getParameters());
+ while (count($args) < $argumentCount - 1) {
+ $args[] = null;
+ }
+ }
+
+ $args[] = $pCell;
+ }
+
+ return $args;
+ }
+
+ private function getUnusedBranchStoreKey()
+ {
+ $storeKeyValue = 'storeKey-' . $this->branchStoreKeyCounter;
+ ++$this->branchStoreKeyCounter;
+
+ return $storeKeyValue;
+ }
+
+ private function getTokensAsString($tokens)
+ {
+ $tokensStr = array_map(function ($token) {
+ $value = $token['value'] ?? 'no value';
+ while (is_array($value)) {
+ $value = array_pop($value);
+ }
+
+ return $value;
+ }, $tokens);
+
+ return '[ ' . implode(' | ', $tokensStr) . ' ]';
+ }
+
+ /**
+ * @return mixed|string
+ */
+ private function evaluateDefinedName(Cell $pCell, DefinedName $namedRange, Worksheet $pCellWorksheet, Stack $stack)
+ {
+ $definedNameScope = $namedRange->getScope();
+ if ($definedNameScope !== null && $definedNameScope !== $pCellWorksheet) {
+ // The defined name isn't in our current scope, so #REF
+ $result = Functions::REF();
+ $stack->push('Error', $result, $namedRange->getName());
+
+ return $result;
+ }
+
+ $definedNameValue = $namedRange->getValue();
+ $definedNameType = $namedRange->isFormula() ? 'Formula' : 'Range';
+ $definedNameWorksheet = $namedRange->getWorksheet();
+
+ if ($definedNameValue[0] !== '=') {
+ $definedNameValue = '=' . $definedNameValue;
+ }
+
+ $this->debugLog->writeDebugLog("Defined Name is a {$definedNameType} with a value of {$definedNameValue}");
+
+ $recursiveCalculationCell = ($definedNameWorksheet !== null && $definedNameWorksheet !== $pCellWorksheet)
+ ? $definedNameWorksheet->getCell('A1')
+ : $pCell;
+ $recursiveCalculationCellAddress = $recursiveCalculationCell !== null
+ ? $recursiveCalculationCell->getCoordinate()
+ : null;
+
+ // Adjust relative references in ranges and formulae so that we execute the calculation for the correct rows and columns
+ $definedNameValue = self::$referenceHelper->updateFormulaReferencesAnyWorksheet(
+ $definedNameValue,
+ Coordinate::columnIndexFromString($pCell->getColumn()) - 1,
+ $pCell->getRow() - 1
+ );
+
+ $this->debugLog->writeDebugLog("Value adjusted for relative references is {$definedNameValue}");
+
+ $recursiveCalculator = new self($this->spreadsheet);
+ $recursiveCalculator->getDebugLog()->setWriteDebugLog($this->getDebugLog()->getWriteDebugLog());
+ $recursiveCalculator->getDebugLog()->setEchoDebugLog($this->getDebugLog()->getEchoDebugLog());
+ $result = $recursiveCalculator->_calculateFormulaValue($definedNameValue, $recursiveCalculationCellAddress, $recursiveCalculationCell);
+
+ if ($this->getDebugLog()->getWriteDebugLog()) {
+ $this->debugLog->mergeDebugLog(array_slice($recursiveCalculator->getDebugLog()->getLog(), 3));
+ $this->debugLog->writeDebugLog("Evaluation Result for Named {$definedNameType} {$namedRange->getName()} is {$this->showTypeDetails($result)}");
+ }
+
+ $stack->push('Defined Name', $result, $namedRange->getName());
+
+ return $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php
new file mode 100644
index 0000000..e218225
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+abstract class Category
+{
+ // Function categories
+ const CATEGORY_CUBE = 'Cube';
+ const CATEGORY_DATABASE = 'Database';
+ const CATEGORY_DATE_AND_TIME = 'Date and Time';
+ const CATEGORY_ENGINEERING = 'Engineering';
+ const CATEGORY_FINANCIAL = 'Financial';
+ const CATEGORY_INFORMATION = 'Information';
+ const CATEGORY_LOGICAL = 'Logical';
+ const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';
+ const CATEGORY_MATH_AND_TRIG = 'Math and Trig';
+ const CATEGORY_STATISTICAL = 'Statistical';
+ const CATEGORY_TEXT_AND_DATA = 'Text and Data';
+ const CATEGORY_WEB = 'Web';
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php
new file mode 100644
index 0000000..b9d9268
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php
@@ -0,0 +1,608 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+class Database
+{
+ /**
+ * fieldExtract.
+ *
+ * Extracts the column ID to use for the data field.
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param mixed $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ *
+ * @return null|string
+ */
+ private static function fieldExtract($database, $field)
+ {
+ $field = strtoupper(Functions::flattenSingleValue($field));
+ $fieldNames = array_map('strtoupper', array_shift($database));
+
+ if (is_numeric($field)) {
+ $keys = array_keys($fieldNames);
+
+ return $keys[$field - 1];
+ }
+ $key = array_search($field, $fieldNames);
+
+ return ($key) ? $key : null;
+ }
+
+ /**
+ * filter.
+ *
+ * Parses the selection criteria, extracts the database rows that match those criteria, and
+ * returns that subset of rows.
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return array of mixed
+ */
+ private static function filter($database, $criteria)
+ {
+ $fieldNames = array_shift($database);
+ $criteriaNames = array_shift($criteria);
+
+ // Convert the criteria into a set of AND/OR conditions with [:placeholders]
+ $testConditions = $testValues = [];
+ $testConditionsCount = 0;
+ foreach ($criteriaNames as $key => $criteriaName) {
+ $testCondition = [];
+ $testConditionCount = 0;
+ foreach ($criteria as $row => $criterion) {
+ if ($criterion[$key] > '') {
+ $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]);
+ ++$testConditionCount;
+ }
+ }
+ if ($testConditionCount > 1) {
+ $testConditions[] = 'OR(' . implode(',', $testCondition) . ')';
+ ++$testConditionsCount;
+ } elseif ($testConditionCount == 1) {
+ $testConditions[] = $testCondition[0];
+ ++$testConditionsCount;
+ }
+ }
+
+ if ($testConditionsCount > 1) {
+ $testConditionSet = 'AND(' . implode(',', $testConditions) . ')';
+ } elseif ($testConditionsCount == 1) {
+ $testConditionSet = $testConditions[0];
+ }
+
+ // Loop through each row of the database
+ foreach ($database as $dataRow => $dataValues) {
+ // Substitute actual values from the database row for our [:placeholders]
+ $testConditionList = $testConditionSet;
+ foreach ($criteriaNames as $key => $criteriaName) {
+ $k = array_search($criteriaName, $fieldNames);
+ if (isset($dataValues[$k])) {
+ $dataValue = $dataValues[$k];
+ $dataValue = (is_string($dataValue)) ? Calculation::wrapResult(strtoupper($dataValue)) : $dataValue;
+ $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList);
+ }
+ }
+ // evaluate the criteria against the row data
+ $result = Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList);
+ // If the row failed to meet the criteria, remove it from the database
+ if (!$result) {
+ unset($database[$dataRow]);
+ }
+ }
+
+ return $database;
+ }
+
+ private static function getFilteredColumn($database, $field, $criteria)
+ {
+ // reduce the database to a set of rows that match all the criteria
+ $database = self::filter($database, $criteria);
+ // extract an array of values for the requested column
+ $colData = [];
+ foreach ($database as $row) {
+ $colData[] = $row[$field];
+ }
+
+ return $colData;
+ }
+
+ /**
+ * DAVERAGE.
+ *
+ * Averages the values in a column of a list or database that match conditions you specify.
+ *
+ * Excel Function:
+ * DAVERAGE(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float|string
+ */
+ public static function DAVERAGE($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::AVERAGE(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DCOUNT.
+ *
+ * Counts the cells that contain numbers in a column of a list or database that match conditions
+ * that you specify.
+ *
+ * Excel Function:
+ * DCOUNT(database,[field],criteria)
+ *
+ * Excel Function:
+ * DAVERAGE(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return int
+ *
+ * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the
+ * database that match the criteria.
+ */
+ public static function DCOUNT($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::COUNT(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DCOUNTA.
+ *
+ * Counts the nonblank cells in a column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DCOUNTA(database,[field],criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return int
+ *
+ * @TODO The field argument is optional. If field is omitted, DCOUNTA counts all records in the
+ * database that match the criteria.
+ */
+ public static function DCOUNTA($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // reduce the database to a set of rows that match all the criteria
+ $database = self::filter($database, $criteria);
+ // extract an array of values for the requested column
+ $colData = [];
+ foreach ($database as $row) {
+ $colData[] = $row[$field];
+ }
+
+ // Return
+ return Statistical::COUNTA(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DGET.
+ *
+ * Extracts a single value from a column of a list or database that matches conditions that you
+ * specify.
+ *
+ * Excel Function:
+ * DGET(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return mixed
+ */
+ public static function DGET($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ $colData = self::getFilteredColumn($database, $field, $criteria);
+ if (count($colData) > 1) {
+ return Functions::NAN();
+ }
+
+ return $colData[0];
+ }
+
+ /**
+ * DMAX.
+ *
+ * Returns the largest number in a column of a list or database that matches conditions you that
+ * specify.
+ *
+ * Excel Function:
+ * DMAX(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float
+ */
+ public static function DMAX($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::MAX(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DMIN.
+ *
+ * Returns the smallest number in a column of a list or database that matches conditions you that
+ * specify.
+ *
+ * Excel Function:
+ * DMIN(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float
+ */
+ public static function DMIN($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::MIN(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DPRODUCT.
+ *
+ * Multiplies the values in a column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DPRODUCT(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float
+ */
+ public static function DPRODUCT($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return MathTrig::PRODUCT(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DSTDEV.
+ *
+ * Estimates the standard deviation of a population based on a sample by using the numbers in a
+ * column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DSTDEV(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float|string
+ */
+ public static function DSTDEV($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::STDEV(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DSTDEVP.
+ *
+ * Calculates the standard deviation of a population based on the entire population by using the
+ * numbers in a column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DSTDEVP(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float|string
+ */
+ public static function DSTDEVP($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::STDEVP(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DSUM.
+ *
+ * Adds the numbers in a column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DSUM(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float
+ */
+ public static function DSUM($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return MathTrig::SUM(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DVAR.
+ *
+ * Estimates the variance of a population based on a sample by using the numbers in a column
+ * of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DVAR(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function DVAR($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::VARFunc(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+
+ /**
+ * DVARP.
+ *
+ * Calculates the variance of a population based on the entire population by using the numbers
+ * in a column of a list or database that match conditions that you specify.
+ *
+ * Excel Function:
+ * DVARP(database,field,criteria)
+ *
+ * @param mixed[] $database The range of cells that makes up the list or database.
+ * A database is a list of related data in which rows of related
+ * information are records, and columns of data are fields. The
+ * first row of the list contains labels for each column.
+ * @param int|string $field Indicates which column is used in the function. Enter the
+ * column label enclosed between double quotation marks, such as
+ * "Age" or "Yield," or a number (without quotation marks) that
+ * represents the position of the column within the list: 1 for
+ * the first column, 2 for the second column, and so on.
+ * @param mixed[] $criteria The range of cells that contains the conditions you specify.
+ * You can use any range for the criteria argument, as long as it
+ * includes at least one column label and at least one cell below
+ * the column label in which you specify a condition for the
+ * column.
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function DVARP($database, $field, $criteria)
+ {
+ $field = self::fieldExtract($database, $field);
+ if ($field === null) {
+ return null;
+ }
+
+ // Return
+ return Statistical::VARP(
+ self::getFilteredColumn($database, $field, $criteria)
+ );
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
new file mode 100644
index 0000000..96f2380
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
@@ -0,0 +1,1651 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use DateTimeImmutable;
+use DateTimeInterface;
+use PhpOffice\PhpSpreadsheet\Shared\Date;
+use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
+
+class DateTime
+{
+ /**
+ * Identify if a year is a leap year or not.
+ *
+ * @param int|string $year The year to test
+ *
+ * @return bool TRUE if the year is a leap year, otherwise FALSE
+ */
+ public static function isLeapYear($year)
+ {
+ return (($year % 4) === 0) && (($year % 100) !== 0) || (($year % 400) === 0);
+ }
+
+ /**
+ * Return the number of days between two dates based on a 360 day calendar.
+ *
+ * @param int $startDay Day of month of the start date
+ * @param int $startMonth Month of the start date
+ * @param int $startYear Year of the start date
+ * @param int $endDay Day of month of the start date
+ * @param int $endMonth Month of the start date
+ * @param int $endYear Year of the start date
+ * @param bool $methodUS Whether to use the US method or the European method of calculation
+ *
+ * @return int Number of days between the start date and the end date
+ */
+ private static function dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, $methodUS)
+ {
+ if ($startDay == 31) {
+ --$startDay;
+ } elseif ($methodUS && ($startMonth == 2 && ($startDay == 29 || ($startDay == 28 && !self::isLeapYear($startYear))))) {
+ $startDay = 30;
+ }
+ if ($endDay == 31) {
+ if ($methodUS && $startDay != 30) {
+ $endDay = 1;
+ if ($endMonth == 12) {
+ ++$endYear;
+ $endMonth = 1;
+ } else {
+ ++$endMonth;
+ }
+ } else {
+ $endDay = 30;
+ }
+ }
+
+ return $endDay + $endMonth * 30 + $endYear * 360 - $startDay - $startMonth * 30 - $startYear * 360;
+ }
+
+ /**
+ * getDateValue.
+ *
+ * @param mixed $dateValue
+ *
+ * @return mixed Excel date/time serial value, or string if error
+ */
+ public static function getDateValue($dateValue)
+ {
+ if (!is_numeric($dateValue)) {
+ if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) {
+ $dateValue = Date::PHPToExcel($dateValue);
+ } else {
+ $saveReturnDateType = Functions::getReturnDateType();
+ Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
+ $dateValue = self::DATEVALUE($dateValue);
+ Functions::setReturnDateType($saveReturnDateType);
+ }
+ }
+
+ return $dateValue;
+ }
+
+ /**
+ * getTimeValue.
+ *
+ * @param string $timeValue
+ *
+ * @return mixed Excel date/time serial value, or string if error
+ */
+ private static function getTimeValue($timeValue)
+ {
+ $saveReturnDateType = Functions::getReturnDateType();
+ Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
+ $timeValue = self::TIMEVALUE($timeValue);
+ Functions::setReturnDateType($saveReturnDateType);
+
+ return $timeValue;
+ }
+
+ private static function adjustDateByMonths($dateValue = 0, $adjustmentMonths = 0)
+ {
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+ $oMonth = (int) $PHPDateObject->format('m');
+ $oYear = (int) $PHPDateObject->format('Y');
+
+ $adjustmentMonthsString = (string) $adjustmentMonths;
+ if ($adjustmentMonths > 0) {
+ $adjustmentMonthsString = '+' . $adjustmentMonths;
+ }
+ if ($adjustmentMonths != 0) {
+ $PHPDateObject->modify($adjustmentMonthsString . ' months');
+ }
+ $nMonth = (int) $PHPDateObject->format('m');
+ $nYear = (int) $PHPDateObject->format('Y');
+
+ $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
+ if ($monthDiff != $adjustmentMonths) {
+ $adjustDays = (int) $PHPDateObject->format('d');
+ $adjustDaysString = '-' . $adjustDays . ' days';
+ $PHPDateObject->modify($adjustDaysString);
+ }
+
+ return $PHPDateObject;
+ }
+
+ /**
+ * DATETIMENOW.
+ *
+ * Returns the current date and time.
+ * The NOW function is useful when you need to display the current date and time on a worksheet or
+ * calculate a value based on the current date and time, and have that value updated each time you
+ * open the worksheet.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
+ * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * NOW()
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function DATETIMENOW()
+ {
+ $saveTimeZone = date_default_timezone_get();
+ date_default_timezone_set('UTC');
+ $retValue = false;
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ $retValue = (float) Date::PHPToExcel(time());
+
+ break;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ $retValue = (int) time();
+
+ break;
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ $retValue = new \DateTime();
+
+ break;
+ }
+ date_default_timezone_set($saveTimeZone);
+
+ return $retValue;
+ }
+
+ /**
+ * DATENOW.
+ *
+ * Returns the current date.
+ * The NOW function is useful when you need to display the current date and time on a worksheet or
+ * calculate a value based on the current date and time, and have that value updated each time you
+ * open the worksheet.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
+ * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * TODAY()
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function DATENOW()
+ {
+ $saveTimeZone = date_default_timezone_get();
+ date_default_timezone_set('UTC');
+ $retValue = false;
+ $excelDateTime = floor(Date::PHPToExcel(time()));
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ $retValue = (float) $excelDateTime;
+
+ break;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ $retValue = (int) Date::excelToTimestamp($excelDateTime);
+
+ break;
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ $retValue = Date::excelToDateTimeObject($excelDateTime);
+
+ break;
+ }
+ date_default_timezone_set($saveTimeZone);
+
+ return $retValue;
+ }
+
+ /**
+ * DATE.
+ *
+ * The DATE function returns a value that represents a particular date.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
+ * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * DATE(year,month,day)
+ *
+ * PhpSpreadsheet is a lot more forgiving than MS Excel when passing non numeric values to this function.
+ * A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted,
+ * as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language.
+ *
+ * @param int $year The value of the year argument can include one to four digits.
+ * Excel interprets the year argument according to the configured
+ * date system: 1900 or 1904.
+ * If year is between 0 (zero) and 1899 (inclusive), Excel adds that
+ * value to 1900 to calculate the year. For example, DATE(108,1,2)
+ * returns January 2, 2008 (1900+108).
+ * If year is between 1900 and 9999 (inclusive), Excel uses that
+ * value as the year. For example, DATE(2008,1,2) returns January 2,
+ * 2008.
+ * If year is less than 0 or is 10000 or greater, Excel returns the
+ * #NUM! error value.
+ * @param int $month A positive or negative integer representing the month of the year
+ * from 1 to 12 (January to December).
+ * If month is greater than 12, month adds that number of months to
+ * the first month in the year specified. For example, DATE(2008,14,2)
+ * returns the serial number representing February 2, 2009.
+ * If month is less than 1, month subtracts the magnitude of that
+ * number of months, plus 1, from the first month in the year
+ * specified. For example, DATE(2008,-3,2) returns the serial number
+ * representing September 2, 2007.
+ * @param int $day A positive or negative integer representing the day of the month
+ * from 1 to 31.
+ * If day is greater than the number of days in the month specified,
+ * day adds that number of days to the first day in the month. For
+ * example, DATE(2008,1,35) returns the serial number representing
+ * February 4, 2008.
+ * If day is less than 1, day subtracts the magnitude that number of
+ * days, plus one, from the first day of the month specified. For
+ * example, DATE(2008,1,-15) returns the serial number representing
+ * December 16, 2007.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function DATE($year = 0, $month = 1, $day = 1)
+ {
+ $year = Functions::flattenSingleValue($year);
+ $month = Functions::flattenSingleValue($month);
+ $day = Functions::flattenSingleValue($day);
+
+ if (($month !== null) && (!is_numeric($month))) {
+ $month = Date::monthStringToNumber($month);
+ }
+
+ if (($day !== null) && (!is_numeric($day))) {
+ $day = Date::dayStringToNumber($day);
+ }
+
+ $year = ($year !== null) ? StringHelper::testStringAsNumeric($year) : 0;
+ $month = ($month !== null) ? StringHelper::testStringAsNumeric($month) : 0;
+ $day = ($day !== null) ? StringHelper::testStringAsNumeric($day) : 0;
+ if (
+ (!is_numeric($year)) ||
+ (!is_numeric($month)) ||
+ (!is_numeric($day))
+ ) {
+ return Functions::VALUE();
+ }
+ $year = (int) $year;
+ $month = (int) $month;
+ $day = (int) $day;
+
+ $baseYear = Date::getExcelCalendar();
+ // Validate parameters
+ if ($year < ($baseYear - 1900)) {
+ return Functions::NAN();
+ }
+ if ((($baseYear - 1900) != 0) && ($year < $baseYear) && ($year >= 1900)) {
+ return Functions::NAN();
+ }
+
+ if (($year < $baseYear) && ($year >= ($baseYear - 1900))) {
+ $year += 1900;
+ }
+
+ if ($month < 1) {
+ // Handle year/month adjustment if month < 1
+ --$month;
+ $year += ceil($month / 12) - 1;
+ $month = 13 - abs($month % 12);
+ } elseif ($month > 12) {
+ // Handle year/month adjustment if month > 12
+ $year += floor($month / 12);
+ $month = ($month % 12);
+ }
+
+ // Re-validate the year parameter after adjustments
+ if (($year < $baseYear) || ($year >= 10000)) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $excelDateValue = Date::formattedPHPToExcel($year, $month, $day);
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) $excelDateValue;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp($excelDateValue);
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return Date::excelToDateTimeObject($excelDateValue);
+ }
+ }
+
+ /**
+ * TIME.
+ *
+ * The TIME function returns a value that represents a particular time.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time
+ * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * TIME(hour,minute,second)
+ *
+ * @param int $hour A number from 0 (zero) to 32767 representing the hour.
+ * Any value greater than 23 will be divided by 24 and the remainder
+ * will be treated as the hour value. For example, TIME(27,0,0) =
+ * TIME(3,0,0) = .125 or 3:00 AM.
+ * @param int $minute A number from 0 to 32767 representing the minute.
+ * Any value greater than 59 will be converted to hours and minutes.
+ * For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM.
+ * @param int $second A number from 0 to 32767 representing the second.
+ * Any value greater than 59 will be converted to hours, minutes,
+ * and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148
+ * or 12:33:20 AM
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function TIME($hour = 0, $minute = 0, $second = 0)
+ {
+ $hour = Functions::flattenSingleValue($hour);
+ $minute = Functions::flattenSingleValue($minute);
+ $second = Functions::flattenSingleValue($second);
+
+ if ($hour == '') {
+ $hour = 0;
+ }
+ if ($minute == '') {
+ $minute = 0;
+ }
+ if ($second == '') {
+ $second = 0;
+ }
+
+ if ((!is_numeric($hour)) || (!is_numeric($minute)) || (!is_numeric($second))) {
+ return Functions::VALUE();
+ }
+ $hour = (int) $hour;
+ $minute = (int) $minute;
+ $second = (int) $second;
+
+ if ($second < 0) {
+ $minute += floor($second / 60);
+ $second = 60 - abs($second % 60);
+ if ($second == 60) {
+ $second = 0;
+ }
+ } elseif ($second >= 60) {
+ $minute += floor($second / 60);
+ $second = $second % 60;
+ }
+ if ($minute < 0) {
+ $hour += floor($minute / 60);
+ $minute = 60 - abs($minute % 60);
+ if ($minute == 60) {
+ $minute = 0;
+ }
+ } elseif ($minute >= 60) {
+ $hour += floor($minute / 60);
+ $minute = $minute % 60;
+ }
+
+ if ($hour > 23) {
+ $hour = $hour % 24;
+ } elseif ($hour < 0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ $date = 0;
+ $calendar = Date::getExcelCalendar();
+ if ($calendar != Date::CALENDAR_WINDOWS_1900) {
+ $date = 1;
+ }
+
+ return (float) Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp(Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ $dayAdjust = 0;
+ if ($hour < 0) {
+ $dayAdjust = floor($hour / 24);
+ $hour = 24 - abs($hour % 24);
+ if ($hour == 24) {
+ $hour = 0;
+ }
+ } elseif ($hour >= 24) {
+ $dayAdjust = floor($hour / 24);
+ $hour = $hour % 24;
+ }
+ $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);
+ if ($dayAdjust != 0) {
+ $phpDateObject->modify($dayAdjust . ' days');
+ }
+
+ return $phpDateObject;
+ }
+ }
+
+ /**
+ * DATEVALUE.
+ *
+ * Returns a value that represents a particular date.
+ * Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp
+ * value.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
+ * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * DATEVALUE(dateValue)
+ *
+ * @param string $dateValue Text that represents a date in a Microsoft Excel date format.
+ * For example, "1/30/2008" or "30-Jan-2008" are text strings within
+ * quotation marks that represent dates. Using the default date
+ * system in Excel for Windows, date_text must represent a date from
+ * January 1, 1900, to December 31, 9999. Using the default date
+ * system in Excel for the Macintosh, date_text must represent a date
+ * from January 1, 1904, to December 31, 9999. DATEVALUE returns the
+ * #VALUE! error value if date_text is out of this range.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function DATEVALUE($dateValue = 1)
+ {
+ $dateValue = trim(Functions::flattenSingleValue($dateValue), '"');
+ // Strip any ordinals because they're allowed in Excel (English only)
+ $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue);
+ // Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany)
+ $dateValue = str_replace(['/', '.', '-', ' '], ' ', $dateValue);
+
+ $yearFound = false;
+ $t1 = explode(' ', $dateValue);
+ foreach ($t1 as &$t) {
+ if ((is_numeric($t)) && ($t > 31)) {
+ if ($yearFound) {
+ return Functions::VALUE();
+ }
+ if ($t < 100) {
+ $t += 1900;
+ }
+ $yearFound = true;
+ }
+ }
+ if ((count($t1) == 1) && (strpos($t, ':') !== false)) {
+ // We've been fed a time value without any date
+ return 0.0;
+ } elseif (count($t1) == 2) {
+ // We only have two parts of the date: either day/month or month/year
+ if ($yearFound) {
+ array_unshift($t1, 1);
+ } else {
+ if (is_numeric($t1[1]) && $t1[1] > 29) {
+ $t1[1] += 1900;
+ array_unshift($t1, 1);
+ } else {
+ $t1[] = date('Y');
+ }
+ }
+ }
+ unset($t);
+ $dateValue = implode(' ', $t1);
+
+ $PHPDateArray = date_parse($dateValue);
+ if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
+ $testVal1 = strtok($dateValue, '- ');
+ if ($testVal1 !== false) {
+ $testVal2 = strtok('- ');
+ if ($testVal2 !== false) {
+ $testVal3 = strtok('- ');
+ if ($testVal3 === false) {
+ $testVal3 = strftime('%Y');
+ }
+ } else {
+ return Functions::VALUE();
+ }
+ } else {
+ return Functions::VALUE();
+ }
+ if ($testVal1 < 31 && $testVal2 < 12 && $testVal3 < 12 && strlen($testVal3) == 2) {
+ $testVal3 += 2000;
+ }
+ $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3);
+ if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
+ $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3);
+ if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
+ return Functions::VALUE();
+ }
+ }
+ }
+
+ if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
+ // Execute function
+ if ($PHPDateArray['year'] == '') {
+ $PHPDateArray['year'] = strftime('%Y');
+ }
+ if ($PHPDateArray['year'] < 1900) {
+ return Functions::VALUE();
+ }
+ if ($PHPDateArray['month'] == '') {
+ $PHPDateArray['month'] = strftime('%m');
+ }
+ if ($PHPDateArray['day'] == '') {
+ $PHPDateArray['day'] = strftime('%d');
+ }
+ if (!checkdate($PHPDateArray['month'], $PHPDateArray['day'], $PHPDateArray['year'])) {
+ return Functions::VALUE();
+ }
+ $excelDateValue = floor(
+ Date::formattedPHPToExcel(
+ $PHPDateArray['year'],
+ $PHPDateArray['month'],
+ $PHPDateArray['day'],
+ $PHPDateArray['hour'],
+ $PHPDateArray['minute'],
+ $PHPDateArray['second']
+ )
+ );
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) $excelDateValue;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp($excelDateValue);
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00');
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * TIMEVALUE.
+ *
+ * Returns a value that represents a particular time.
+ * Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp
+ * value.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time
+ * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * TIMEVALUE(timeValue)
+ *
+ * @param string $timeValue A text string that represents a time in any one of the Microsoft
+ * Excel time formats; for example, "6:45 PM" and "18:45" text strings
+ * within quotation marks that represent time.
+ * Date information in time_text is ignored.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function TIMEVALUE($timeValue)
+ {
+ $timeValue = trim(Functions::flattenSingleValue($timeValue), '"');
+ $timeValue = str_replace(['/', '.'], '-', $timeValue);
+
+ $arraySplit = preg_split('/[\/:\-\s]/', $timeValue);
+ if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) {
+ $arraySplit[0] = ($arraySplit[0] % 24);
+ $timeValue = implode(':', $arraySplit);
+ }
+
+ $PHPDateArray = date_parse($timeValue);
+ if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $excelDateValue = Date::formattedPHPToExcel(
+ $PHPDateArray['year'],
+ $PHPDateArray['month'],
+ $PHPDateArray['day'],
+ $PHPDateArray['hour'],
+ $PHPDateArray['minute'],
+ $PHPDateArray['second']
+ );
+ } else {
+ $excelDateValue = Date::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1;
+ }
+
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) $excelDateValue;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) $phpDateValue = Date::excelToTimestamp($excelDateValue + 25569) - 3600;
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * DATEDIF.
+ *
+ * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object
+ * or a standard date string
+ * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object
+ * or a standard date string
+ * @param string $unit
+ *
+ * @return int|string Interval between the dates
+ */
+ public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 'D')
+ {
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDate = Functions::flattenSingleValue($endDate);
+ $unit = strtoupper(Functions::flattenSingleValue($unit));
+
+ if (is_string($startDate = self::getDateValue($startDate))) {
+ return Functions::VALUE();
+ }
+ if (is_string($endDate = self::getDateValue($endDate))) {
+ return Functions::VALUE();
+ }
+
+ // Validate parameters
+ if ($startDate > $endDate) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $difference = $endDate - $startDate;
+
+ $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
+ $startDays = $PHPStartDateObject->format('j');
+ $startMonths = $PHPStartDateObject->format('n');
+ $startYears = $PHPStartDateObject->format('Y');
+
+ $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
+ $endDays = $PHPEndDateObject->format('j');
+ $endMonths = $PHPEndDateObject->format('n');
+ $endYears = $PHPEndDateObject->format('Y');
+
+ $PHPDiffDateObject = $PHPEndDateObject->diff($PHPStartDateObject);
+
+ switch ($unit) {
+ case 'D':
+ $retVal = (int) $difference;
+
+ break;
+ case 'M':
+ $retVal = (int) 12 * $PHPDiffDateObject->format('%y') + $PHPDiffDateObject->format('%m');
+
+ break;
+ case 'Y':
+ $retVal = (int) $PHPDiffDateObject->format('%y');
+
+ break;
+ case 'MD':
+ if ($endDays < $startDays) {
+ $retVal = $endDays;
+ $PHPEndDateObject->modify('-' . $endDays . ' days');
+ $adjustDays = $PHPEndDateObject->format('j');
+ $retVal += ($adjustDays - $startDays);
+ } else {
+ $retVal = (int) $PHPDiffDateObject->format('%d');
+ }
+
+ break;
+ case 'YM':
+ $retVal = (int) $PHPDiffDateObject->format('%m');
+
+ break;
+ case 'YD':
+ $retVal = (int) $difference;
+ if ($endYears > $startYears) {
+ $isLeapStartYear = $PHPStartDateObject->format('L');
+ $wasLeapEndYear = $PHPEndDateObject->format('L');
+
+ // Adjust end year to be as close as possible as start year
+ while ($PHPEndDateObject >= $PHPStartDateObject) {
+ $PHPEndDateObject->modify('-1 year');
+ $endYears = $PHPEndDateObject->format('Y');
+ }
+ $PHPEndDateObject->modify('+1 year');
+
+ // Get the result
+ $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
+
+ // Adjust for leap years cases
+ $isLeapEndYear = $PHPEndDateObject->format('L');
+ $limit = new \DateTime($PHPEndDateObject->format('Y-02-29'));
+ if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {
+ --$retVal;
+ }
+ }
+
+ break;
+ default:
+ $retVal = Functions::VALUE();
+ }
+
+ return $retVal;
+ }
+
+ /**
+ * DAYS.
+ *
+ * Returns the number of days between two dates
+ *
+ * Excel Function:
+ * DAYS(endDate, startDate)
+ *
+ * @param DateTimeImmutable|float|int|string $endDate Excel date serial value (float),
+ * PHP date timestamp (integer), PHP DateTime object, or a standard date string
+ * @param DateTimeImmutable|float|int|string $startDate Excel date serial value (float),
+ * PHP date timestamp (integer), PHP DateTime object, or a standard date string
+ *
+ * @return int|string Number of days between start date and end date or an error
+ */
+ public static function DAYS($endDate = 0, $startDate = 0)
+ {
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDate = Functions::flattenSingleValue($endDate);
+
+ $startDate = self::getDateValue($startDate);
+ if (is_string($startDate)) {
+ return Functions::VALUE();
+ }
+
+ $endDate = self::getDateValue($endDate);
+ if (is_string($endDate)) {
+ return Functions::VALUE();
+ }
+
+ // Execute function
+ $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
+ $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
+
+ $diff = $PHPStartDateObject->diff($PHPEndDateObject);
+ $days = $diff->days;
+
+ if ($diff->invert) {
+ $days = -$days;
+ }
+
+ return $days;
+ }
+
+ /**
+ * DAYS360.
+ *
+ * Returns the number of days between two dates based on a 360-day year (twelve 30-day months),
+ * which is used in some accounting calculations. Use this function to help compute payments if
+ * your accounting system is based on twelve 30-day months.
+ *
+ * Excel Function:
+ * DAYS360(startDate,endDate[,method])
+ *
+ * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param bool $method US or European Method
+ * FALSE or omitted: U.S. (NASD) method. If the starting date is
+ * the last day of a month, it becomes equal to the 30th of the
+ * same month. If the ending date is the last day of a month and
+ * the starting date is earlier than the 30th of a month, the
+ * ending date becomes equal to the 1st of the next month;
+ * otherwise the ending date becomes equal to the 30th of the
+ * same month.
+ * TRUE: European method. Starting dates and ending dates that
+ * occur on the 31st of a month become equal to the 30th of the
+ * same month.
+ *
+ * @return int|string Number of days between start date and end date
+ */
+ public static function DAYS360($startDate = 0, $endDate = 0, $method = false)
+ {
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDate = Functions::flattenSingleValue($endDate);
+
+ if (is_string($startDate = self::getDateValue($startDate))) {
+ return Functions::VALUE();
+ }
+ if (is_string($endDate = self::getDateValue($endDate))) {
+ return Functions::VALUE();
+ }
+
+ if (!is_bool($method)) {
+ return Functions::VALUE();
+ }
+
+ // Execute function
+ $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
+ $startDay = $PHPStartDateObject->format('j');
+ $startMonth = $PHPStartDateObject->format('n');
+ $startYear = $PHPStartDateObject->format('Y');
+
+ $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
+ $endDay = $PHPEndDateObject->format('j');
+ $endMonth = $PHPEndDateObject->format('n');
+ $endYear = $PHPEndDateObject->format('Y');
+
+ return self::dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, !$method);
+ }
+
+ /**
+ * YEARFRAC.
+ *
+ * Calculates the fraction of the year represented by the number of whole days between two dates
+ * (the start_date and the end_date).
+ * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or
+ * obligations to assign to a specific term.
+ *
+ * Excel Function:
+ * YEARFRAC(startDate,endDate[,method])
+ * See https://lists.oasis-open.org/archives/office-formula/200806/msg00039.html
+ * for description of algorithm used in Excel
+ *
+ * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $method Method used for the calculation
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string fraction of the year, or a string containing an error
+ */
+ public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0)
+ {
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDate = Functions::flattenSingleValue($endDate);
+ $method = Functions::flattenSingleValue($method);
+
+ if (is_string($startDate = self::getDateValue($startDate))) {
+ return Functions::VALUE();
+ }
+ if (is_string($endDate = self::getDateValue($endDate))) {
+ return Functions::VALUE();
+ }
+ if ($startDate > $endDate) {
+ $temp = $startDate;
+ $startDate = $endDate;
+ $endDate = $temp;
+ }
+
+ if (((is_numeric($method)) && (!is_string($method))) || ($method == '')) {
+ switch ($method) {
+ case 0:
+ return self::DAYS360($startDate, $endDate) / 360;
+ case 1:
+ $days = self::DATEDIF($startDate, $endDate);
+ $startYear = self::YEAR($startDate);
+ $endYear = self::YEAR($endDate);
+ $years = $endYear - $startYear + 1;
+ $startMonth = self::MONTHOFYEAR($startDate);
+ $startDay = self::DAYOFMONTH($startDate);
+ $endMonth = self::MONTHOFYEAR($endDate);
+ $endDay = self::DAYOFMONTH($endDate);
+ $startMonthDay = 100 * $startMonth + $startDay;
+ $endMonthDay = 100 * $endMonth + $endDay;
+ if ($years == 1) {
+ if (self::isLeapYear($endYear)) {
+ $tmpCalcAnnualBasis = 366;
+ } else {
+ $tmpCalcAnnualBasis = 365;
+ }
+ } elseif ($years == 2 && $startMonthDay >= $endMonthDay) {
+ if (self::isLeapYear($startYear)) {
+ if ($startMonthDay <= 229) {
+ $tmpCalcAnnualBasis = 366;
+ } else {
+ $tmpCalcAnnualBasis = 365;
+ }
+ } elseif (self::isLeapYear($endYear)) {
+ if ($endMonthDay >= 229) {
+ $tmpCalcAnnualBasis = 366;
+ } else {
+ $tmpCalcAnnualBasis = 365;
+ }
+ } else {
+ $tmpCalcAnnualBasis = 365;
+ }
+ } else {
+ $tmpCalcAnnualBasis = 0;
+ for ($year = $startYear; $year <= $endYear; ++$year) {
+ $tmpCalcAnnualBasis += self::isLeapYear($year) ? 366 : 365;
+ }
+ $tmpCalcAnnualBasis /= $years;
+ }
+
+ return $days / $tmpCalcAnnualBasis;
+ case 2:
+ return self::DATEDIF($startDate, $endDate) / 360;
+ case 3:
+ return self::DATEDIF($startDate, $endDate) / 365;
+ case 4:
+ return self::DAYS360($startDate, $endDate, true) / 360;
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * NETWORKDAYS.
+ *
+ * Returns the number of whole working days between start_date and end_date. Working days
+ * exclude weekends and any dates identified in holidays.
+ * Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days
+ * worked during a specific term.
+ *
+ * Excel Function:
+ * NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]])
+ *
+ * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Interval between the dates
+ */
+ public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs)
+ {
+ // Retrieve the mandatory start and end date that are referenced in the function definition
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDate = Functions::flattenSingleValue($endDate);
+ // Get the optional days
+ $dateArgs = Functions::flattenArray($dateArgs);
+
+ // Validate the start and end dates
+ if (is_string($startDate = $sDate = self::getDateValue($startDate))) {
+ return Functions::VALUE();
+ }
+ $startDate = (float) floor($startDate);
+ if (is_string($endDate = $eDate = self::getDateValue($endDate))) {
+ return Functions::VALUE();
+ }
+ $endDate = (float) floor($endDate);
+
+ if ($sDate > $eDate) {
+ $startDate = $eDate;
+ $endDate = $sDate;
+ }
+
+ // Execute function
+ $startDoW = 6 - self::WEEKDAY($startDate, 2);
+ if ($startDoW < 0) {
+ $startDoW = 0;
+ }
+ $endDoW = self::WEEKDAY($endDate, 2);
+ if ($endDoW >= 6) {
+ $endDoW = 0;
+ }
+
+ $wholeWeekDays = floor(($endDate - $startDate) / 7) * 5;
+ $partWeekDays = $endDoW + $startDoW;
+ if ($partWeekDays > 5) {
+ $partWeekDays -= 5;
+ }
+
+ // Test any extra holiday parameters
+ $holidayCountedArray = [];
+ foreach ($dateArgs as $holidayDate) {
+ if (is_string($holidayDate = self::getDateValue($holidayDate))) {
+ return Functions::VALUE();
+ }
+ if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
+ if ((self::WEEKDAY($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) {
+ --$partWeekDays;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ }
+
+ if ($sDate > $eDate) {
+ return 0 - ($wholeWeekDays + $partWeekDays);
+ }
+
+ return $wholeWeekDays + $partWeekDays;
+ }
+
+ /**
+ * WORKDAY.
+ *
+ * Returns the date that is the indicated number of working days before or after a date (the
+ * starting date). Working days exclude weekends and any dates identified as holidays.
+ * Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected
+ * delivery times, or the number of days of work performed.
+ *
+ * Excel Function:
+ * WORKDAY(startDate,endDays[,holidays[,holiday[,...]]])
+ *
+ * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $endDays The number of nonweekend and nonholiday days before or after
+ * startDate. A positive value for days yields a future date; a
+ * negative value yields a past date.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function WORKDAY($startDate, $endDays, ...$dateArgs)
+ {
+ // Retrieve the mandatory start date and days that are referenced in the function definition
+ $startDate = Functions::flattenSingleValue($startDate);
+ $endDays = Functions::flattenSingleValue($endDays);
+ // Get the optional days
+ $dateArgs = Functions::flattenArray($dateArgs);
+
+ if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) {
+ return Functions::VALUE();
+ }
+ $startDate = (float) floor($startDate);
+ $endDays = (int) floor($endDays);
+ // If endDays is 0, we always return startDate
+ if ($endDays == 0) {
+ return $startDate;
+ }
+
+ $decrementing = $endDays < 0;
+
+ // Adjust the start date if it falls over a weekend
+
+ $startDoW = self::WEEKDAY($startDate, 3);
+ if (self::WEEKDAY($startDate, 3) >= 5) {
+ $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW;
+ ($decrementing) ? $endDays++ : $endDays--;
+ }
+
+ // Add endDays
+ $endDate = (float) $startDate + ((int) ($endDays / 5) * 7) + ($endDays % 5);
+
+ // Adjust the calculated end date if it falls over a weekend
+ $endDoW = self::WEEKDAY($endDate, 3);
+ if ($endDoW >= 5) {
+ $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
+ }
+
+ // Test any extra holiday parameters
+ if (!empty($dateArgs)) {
+ $holidayCountedArray = $holidayDates = [];
+ foreach ($dateArgs as $holidayDate) {
+ if (($holidayDate !== null) && (trim($holidayDate) > '')) {
+ if (is_string($holidayDate = self::getDateValue($holidayDate))) {
+ return Functions::VALUE();
+ }
+ if (self::WEEKDAY($holidayDate, 3) < 5) {
+ $holidayDates[] = $holidayDate;
+ }
+ }
+ }
+ if ($decrementing) {
+ rsort($holidayDates, SORT_NUMERIC);
+ } else {
+ sort($holidayDates, SORT_NUMERIC);
+ }
+ foreach ($holidayDates as $holidayDate) {
+ if ($decrementing) {
+ if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) {
+ if (!in_array($holidayDate, $holidayCountedArray)) {
+ --$endDate;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ } else {
+ if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
+ if (!in_array($holidayDate, $holidayCountedArray)) {
+ ++$endDate;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ }
+ // Adjust the calculated end date if it falls over a weekend
+ $endDoW = self::WEEKDAY($endDate, 3);
+ if ($endDoW >= 5) {
+ $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
+ }
+ }
+ }
+
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) $endDate;
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp($endDate);
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return Date::excelToDateTimeObject($endDate);
+ }
+ }
+
+ /**
+ * DAYOFMONTH.
+ *
+ * Returns the day of the month, for a specified date. The day is given as an integer
+ * ranging from 1 to 31.
+ *
+ * Excel Function:
+ * DAY(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Day of the month
+ */
+ public static function DAYOFMONTH($dateValue = 1)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+
+ if ($dateValue === null) {
+ $dateValue = 1;
+ } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ }
+
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
+ if ($dateValue < 0.0) {
+ return Functions::NAN();
+ } elseif ($dateValue < 1.0) {
+ return 0;
+ }
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('j');
+ }
+
+ /**
+ * WEEKDAY.
+ *
+ * Returns the day of the week for a specified date. The day is given as an integer
+ * ranging from 0 to 7 (dependent on the requested style).
+ *
+ * Excel Function:
+ * WEEKDAY(dateValue[,style])
+ *
+ * @param int $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $style A number that determines the type of return value
+ * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday).
+ * 2 Numbers 1 (Monday) through 7 (Sunday).
+ * 3 Numbers 0 (Monday) through 6 (Sunday).
+ *
+ * @return int|string Day of the week value
+ */
+ public static function WEEKDAY($dateValue = 1, $style = 1)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+ $style = Functions::flattenSingleValue($style);
+
+ if (!is_numeric($style)) {
+ return Functions::VALUE();
+ } elseif (($style < 1) || ($style > 3)) {
+ return Functions::NAN();
+ }
+ $style = floor($style);
+
+ if ($dateValue === null) {
+ $dateValue = 1;
+ } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ } elseif ($dateValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+ $DoW = (int) $PHPDateObject->format('w');
+
+ $firstDay = 1;
+ switch ($style) {
+ case 1:
+ ++$DoW;
+
+ break;
+ case 2:
+ if ($DoW === 0) {
+ $DoW = 7;
+ }
+
+ break;
+ case 3:
+ if ($DoW === 0) {
+ $DoW = 7;
+ }
+ $firstDay = 0;
+ --$DoW;
+
+ break;
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
+ // Test for Excel's 1900 leap year, and introduce the error as required
+ if (($PHPDateObject->format('Y') == 1900) && ($PHPDateObject->format('n') <= 2)) {
+ --$DoW;
+ if ($DoW < $firstDay) {
+ $DoW += 7;
+ }
+ }
+ }
+
+ return $DoW;
+ }
+
+ const STARTWEEK_SUNDAY = 1;
+ const STARTWEEK_MONDAY = 2;
+ const STARTWEEK_MONDAY_ALT = 11;
+ const STARTWEEK_TUESDAY = 12;
+ const STARTWEEK_WEDNESDAY = 13;
+ const STARTWEEK_THURSDAY = 14;
+ const STARTWEEK_FRIDAY = 15;
+ const STARTWEEK_SATURDAY = 16;
+ const STARTWEEK_SUNDAY_ALT = 17;
+ const DOW_SUNDAY = 1;
+ const DOW_MONDAY = 2;
+ const DOW_TUESDAY = 3;
+ const DOW_WEDNESDAY = 4;
+ const DOW_THURSDAY = 5;
+ const DOW_FRIDAY = 6;
+ const DOW_SATURDAY = 7;
+ const STARTWEEK_MONDAY_ISO = 21;
+ const METHODARR = [
+ self::STARTWEEK_SUNDAY => self::DOW_SUNDAY,
+ self::DOW_MONDAY,
+ self::STARTWEEK_MONDAY_ALT => self::DOW_MONDAY,
+ self::DOW_TUESDAY,
+ self::DOW_WEDNESDAY,
+ self::DOW_THURSDAY,
+ self::DOW_FRIDAY,
+ self::DOW_SATURDAY,
+ self::DOW_SUNDAY,
+ self::STARTWEEK_MONDAY_ISO => self::STARTWEEK_MONDAY_ISO,
+ ];
+
+ /**
+ * WEEKNUM.
+ *
+ * Returns the week of the year for a specified date.
+ * The WEEKNUM function considers the week containing January 1 to be the first week of the year.
+ * However, there is a European standard that defines the first week as the one with the majority
+ * of days (four or more) falling in the new year. This means that for years in which there are
+ * three days or less in the first week of January, the WEEKNUM function returns week numbers
+ * that are incorrect according to the European standard.
+ *
+ * Excel Function:
+ * WEEKNUM(dateValue[,style])
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $method Week begins on Sunday or Monday
+ * 1 or omitted Week begins on Sunday.
+ * 2 Week begins on Monday.
+ * 11 Week begins on Monday.
+ * 12 Week begins on Tuesday.
+ * 13 Week begins on Wednesday.
+ * 14 Week begins on Thursday.
+ * 15 Week begins on Friday.
+ * 16 Week begins on Saturday.
+ * 17 Week begins on Sunday.
+ * 21 ISO (Jan. 4 is week 1, begins on Monday).
+ *
+ * @return int|string Week Number
+ */
+ public static function WEEKNUM($dateValue = 1, $method = self::STARTWEEK_SUNDAY)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+ $method = Functions::flattenSingleValue($method);
+
+ if (!is_numeric($method)) {
+ return Functions::VALUE();
+ }
+ $method = (int) $method;
+ if (!array_key_exists($method, self::METHODARR)) {
+ return Functions::NaN();
+ }
+ $method = self::METHODARR[$method];
+
+ $dateValue = self::getDateValue($dateValue);
+ if (is_string($dateValue)) {
+ return Functions::VALUE();
+ }
+ if ($dateValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+ if ($method == self::STARTWEEK_MONDAY_ISO) {
+ return (int) $PHPDateObject->format('W');
+ }
+ $dayOfYear = $PHPDateObject->format('z');
+ $PHPDateObject->modify('-' . $dayOfYear . ' days');
+ $firstDayOfFirstWeek = $PHPDateObject->format('w');
+ $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7;
+ $daysInFirstWeek += 7 * !$daysInFirstWeek;
+ $endFirstWeek = $daysInFirstWeek - 1;
+ $weekOfYear = floor(($dayOfYear - $endFirstWeek + 13) / 7);
+
+ return (int) $weekOfYear;
+ }
+
+ /**
+ * ISOWEEKNUM.
+ *
+ * Returns the ISO 8601 week number of the year for a specified date.
+ *
+ * Excel Function:
+ * ISOWEEKNUM(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Week Number
+ */
+ public static function ISOWEEKNUM($dateValue = 1)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+
+ if ($dateValue === null) {
+ $dateValue = 1;
+ } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ } elseif ($dateValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('W');
+ }
+
+ /**
+ * MONTHOFYEAR.
+ *
+ * Returns the month of a date represented by a serial number.
+ * The month is given as an integer, ranging from 1 (January) to 12 (December).
+ *
+ * Excel Function:
+ * MONTH(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Month of the year
+ */
+ public static function MONTHOFYEAR($dateValue = 1)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+
+ if (empty($dateValue)) {
+ $dateValue = 1;
+ }
+ if (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ } elseif ($dateValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('n');
+ }
+
+ /**
+ * YEAR.
+ *
+ * Returns the year corresponding to a date.
+ * The year is returned as an integer in the range 1900-9999.
+ *
+ * Excel Function:
+ * YEAR(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Year
+ */
+ public static function YEAR($dateValue = 1)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+
+ if ($dateValue === null) {
+ $dateValue = 1;
+ } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ } elseif ($dateValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $PHPDateObject = Date::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('Y');
+ }
+
+ /**
+ * HOUROFDAY.
+ *
+ * Returns the hour of a time value.
+ * The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).
+ *
+ * Excel Function:
+ * HOUR(timeValue)
+ *
+ * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard time string
+ *
+ * @return int|string Hour
+ */
+ public static function HOUROFDAY($timeValue = 0)
+ {
+ $timeValue = Functions::flattenSingleValue($timeValue);
+
+ if (!is_numeric($timeValue)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $testVal = strtok($timeValue, '/-: ');
+ if (strlen($testVal) < strlen($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ $timeValue = self::getTimeValue($timeValue);
+ if (is_string($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ // Execute function
+ if ($timeValue >= 1) {
+ $timeValue = fmod($timeValue, 1);
+ } elseif ($timeValue < 0.0) {
+ return Functions::NAN();
+ }
+ $timeValue = Date::excelToTimestamp($timeValue);
+
+ return (int) gmdate('G', $timeValue);
+ }
+
+ /**
+ * MINUTE.
+ *
+ * Returns the minutes of a time value.
+ * The minute is given as an integer, ranging from 0 to 59.
+ *
+ * Excel Function:
+ * MINUTE(timeValue)
+ *
+ * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard time string
+ *
+ * @return int|string Minute
+ */
+ public static function MINUTE($timeValue = 0)
+ {
+ $timeValue = $timeTester = Functions::flattenSingleValue($timeValue);
+
+ if (!is_numeric($timeValue)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $testVal = strtok($timeValue, '/-: ');
+ if (strlen($testVal) < strlen($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ $timeValue = self::getTimeValue($timeValue);
+ if (is_string($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ // Execute function
+ if ($timeValue >= 1) {
+ $timeValue = fmod($timeValue, 1);
+ } elseif ($timeValue < 0.0) {
+ return Functions::NAN();
+ }
+ $timeValue = Date::excelToTimestamp($timeValue);
+
+ return (int) gmdate('i', $timeValue);
+ }
+
+ /**
+ * SECOND.
+ *
+ * Returns the seconds of a time value.
+ * The second is given as an integer in the range 0 (zero) to 59.
+ *
+ * Excel Function:
+ * SECOND(timeValue)
+ *
+ * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard time string
+ *
+ * @return int|string Second
+ */
+ public static function SECOND($timeValue = 0)
+ {
+ $timeValue = Functions::flattenSingleValue($timeValue);
+
+ if (!is_numeric($timeValue)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $testVal = strtok($timeValue, '/-: ');
+ if (strlen($testVal) < strlen($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ $timeValue = self::getTimeValue($timeValue);
+ if (is_string($timeValue)) {
+ return Functions::VALUE();
+ }
+ }
+ // Execute function
+ if ($timeValue >= 1) {
+ $timeValue = fmod($timeValue, 1);
+ } elseif ($timeValue < 0.0) {
+ return Functions::NAN();
+ }
+ $timeValue = Date::excelToTimestamp($timeValue);
+
+ return (int) gmdate('s', $timeValue);
+ }
+
+ /**
+ * EDATE.
+ *
+ * Returns the serial number that represents the date that is the indicated number of months
+ * before or after a specified date (the start_date).
+ * Use EDATE to calculate maturity dates or due dates that fall on the same day of the month
+ * as the date of issue.
+ *
+ * Excel Function:
+ * EDATE(dateValue,adjustmentMonths)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $adjustmentMonths The number of months before or after start_date.
+ * A positive value for months yields a future date;
+ * a negative value yields a past date.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function EDATE($dateValue = 1, $adjustmentMonths = 0)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+ $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
+
+ if (!is_numeric($adjustmentMonths)) {
+ return Functions::VALUE();
+ }
+ $adjustmentMonths = floor($adjustmentMonths);
+
+ if (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ }
+
+ // Execute function
+ $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths);
+
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) Date::PHPToExcel($PHPDateObject);
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject));
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return $PHPDateObject;
+ }
+ }
+
+ /**
+ * EOMONTH.
+ *
+ * Returns the date value for the last day of the month that is the indicated number of months
+ * before or after start_date.
+ * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.
+ *
+ * Excel Function:
+ * EOMONTH(dateValue,adjustmentMonths)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $adjustmentMonths The number of months before or after start_date.
+ * A positive value for months yields a future date;
+ * a negative value yields a past date.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0)
+ {
+ $dateValue = Functions::flattenSingleValue($dateValue);
+ $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
+
+ if (!is_numeric($adjustmentMonths)) {
+ return Functions::VALUE();
+ }
+ $adjustmentMonths = floor($adjustmentMonths);
+
+ if (is_string($dateValue = self::getDateValue($dateValue))) {
+ return Functions::VALUE();
+ }
+
+ // Execute function
+ $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1);
+ $adjustDays = (int) $PHPDateObject->format('d');
+ $adjustDaysString = '-' . $adjustDays . ' days';
+ $PHPDateObject->modify($adjustDaysString);
+
+ switch (Functions::getReturnDateType()) {
+ case Functions::RETURNDATE_EXCEL:
+ return (float) Date::PHPToExcel($PHPDateObject);
+ case Functions::RETURNDATE_UNIX_TIMESTAMP:
+ return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject));
+ case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
+ return $PHPDateObject;
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php
new file mode 100644
index 0000000..877ab1b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php
@@ -0,0 +1,73 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation\Engine;
+
+class CyclicReferenceStack
+{
+ /**
+ * The call stack for calculated cells.
+ *
+ * @var mixed[]
+ */
+ private $stack = [];
+
+ /**
+ * Return the number of entries on the stack.
+ *
+ * @return int
+ */
+ public function count()
+ {
+ return count($this->stack);
+ }
+
+ /**
+ * Push a new entry onto the stack.
+ *
+ * @param mixed $value
+ */
+ public function push($value): void
+ {
+ $this->stack[$value] = $value;
+ }
+
+ /**
+ * Pop the last entry from the stack.
+ *
+ * @return mixed
+ */
+ public function pop()
+ {
+ return array_pop($this->stack);
+ }
+
+ /**
+ * Test to see if a specified entry exists on the stack.
+ *
+ * @param mixed $value The value to test
+ *
+ * @return bool
+ */
+ public function onStack($value)
+ {
+ return isset($this->stack[$value]);
+ }
+
+ /**
+ * Clear the stack.
+ */
+ public function clear(): void
+ {
+ $this->stack = [];
+ }
+
+ /**
+ * Return an array of all entries on the stack.
+ *
+ * @return mixed[]
+ */
+ public function showStack()
+ {
+ return $this->stack;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php
new file mode 100644
index 0000000..043f194
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php
@@ -0,0 +1,140 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation\Engine;
+
+class Logger
+{
+ /**
+ * Flag to determine whether a debug log should be generated by the calculation engine
+ * If true, then a debug log will be generated
+ * If false, then a debug log will not be generated.
+ *
+ * @var bool
+ */
+ private $writeDebugLog = false;
+
+ /**
+ * Flag to determine whether a debug log should be echoed by the calculation engine
+ * If true, then a debug log will be echoed
+ * If false, then a debug log will not be echoed
+ * A debug log can only be echoed if it is generated.
+ *
+ * @var bool
+ */
+ private $echoDebugLog = false;
+
+ /**
+ * The debug log generated by the calculation engine.
+ *
+ * @var string[]
+ */
+ private $debugLog = [];
+
+ /**
+ * The calculation engine cell reference stack.
+ *
+ * @var CyclicReferenceStack
+ */
+ private $cellStack;
+
+ /**
+ * Instantiate a Calculation engine logger.
+ */
+ public function __construct(CyclicReferenceStack $stack)
+ {
+ $this->cellStack = $stack;
+ }
+
+ /**
+ * Enable/Disable Calculation engine logging.
+ *
+ * @param bool $pValue
+ */
+ public function setWriteDebugLog($pValue): void
+ {
+ $this->writeDebugLog = $pValue;
+ }
+
+ /**
+ * Return whether calculation engine logging is enabled or disabled.
+ *
+ * @return bool
+ */
+ public function getWriteDebugLog()
+ {
+ return $this->writeDebugLog;
+ }
+
+ /**
+ * Enable/Disable echoing of debug log information.
+ *
+ * @param bool $pValue
+ */
+ public function setEchoDebugLog($pValue): void
+ {
+ $this->echoDebugLog = $pValue;
+ }
+
+ /**
+ * Return whether echoing of debug log information is enabled or disabled.
+ *
+ * @return bool
+ */
+ public function getEchoDebugLog()
+ {
+ return $this->echoDebugLog;
+ }
+
+ /**
+ * Write an entry to the calculation engine debug log.
+ */
+ public function writeDebugLog(...$args): void
+ {
+ // Only write the debug log if logging is enabled
+ if ($this->writeDebugLog) {
+ $message = implode('', $args);
+ $cellReference = implode(' -> ', $this->cellStack->showStack());
+ if ($this->echoDebugLog) {
+ echo $cellReference,
+ ($this->cellStack->count() > 0 ? ' => ' : ''),
+ $message,
+ PHP_EOL;
+ }
+ $this->debugLog[] = $cellReference .
+ ($this->cellStack->count() > 0 ? ' => ' : '') .
+ $message;
+ }
+ }
+
+ /**
+ * Write a series of entries to the calculation engine debug log.
+ *
+ * @param string[] $args
+ */
+ public function mergeDebugLog(array $args): void
+ {
+ if ($this->writeDebugLog) {
+ foreach ($args as $entry) {
+ $this->writeDebugLog($entry);
+ }
+ }
+ }
+
+ /**
+ * Clear the calculation engine debug log.
+ */
+ public function clearLog(): void
+ {
+ $this->debugLog = [];
+ }
+
+ /**
+ * Return the calculation engine debug log.
+ *
+ * @return string[]
+ */
+ public function getLog()
+ {
+ return $this->debugLog;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
new file mode 100644
index 0000000..8bcf782
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
@@ -0,0 +1,2760 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use Complex\Complex;
+use Complex\Exception as ComplexException;
+
+class Engineering
+{
+ /**
+ * EULER.
+ */
+ const EULER = 2.71828182845904523536;
+
+ /**
+ * Details of the Units of measure that can be used in CONVERTUOM().
+ *
+ * @var mixed[]
+ */
+ private static $conversionUnits = [
+ 'g' => ['Group' => 'Mass', 'Unit Name' => 'Gram', 'AllowPrefix' => true],
+ 'sg' => ['Group' => 'Mass', 'Unit Name' => 'Slug', 'AllowPrefix' => false],
+ 'lbm' => ['Group' => 'Mass', 'Unit Name' => 'Pound mass (avoirdupois)', 'AllowPrefix' => false],
+ 'u' => ['Group' => 'Mass', 'Unit Name' => 'U (atomic mass unit)', 'AllowPrefix' => true],
+ 'ozm' => ['Group' => 'Mass', 'Unit Name' => 'Ounce mass (avoirdupois)', 'AllowPrefix' => false],
+ 'm' => ['Group' => 'Distance', 'Unit Name' => 'Meter', 'AllowPrefix' => true],
+ 'mi' => ['Group' => 'Distance', 'Unit Name' => 'Statute mile', 'AllowPrefix' => false],
+ 'Nmi' => ['Group' => 'Distance', 'Unit Name' => 'Nautical mile', 'AllowPrefix' => false],
+ 'in' => ['Group' => 'Distance', 'Unit Name' => 'Inch', 'AllowPrefix' => false],
+ 'ft' => ['Group' => 'Distance', 'Unit Name' => 'Foot', 'AllowPrefix' => false],
+ 'yd' => ['Group' => 'Distance', 'Unit Name' => 'Yard', 'AllowPrefix' => false],
+ 'ang' => ['Group' => 'Distance', 'Unit Name' => 'Angstrom', 'AllowPrefix' => true],
+ 'Pica' => ['Group' => 'Distance', 'Unit Name' => 'Pica (1/72 in)', 'AllowPrefix' => false],
+ 'yr' => ['Group' => 'Time', 'Unit Name' => 'Year', 'AllowPrefix' => false],
+ 'day' => ['Group' => 'Time', 'Unit Name' => 'Day', 'AllowPrefix' => false],
+ 'hr' => ['Group' => 'Time', 'Unit Name' => 'Hour', 'AllowPrefix' => false],
+ 'mn' => ['Group' => 'Time', 'Unit Name' => 'Minute', 'AllowPrefix' => false],
+ 'sec' => ['Group' => 'Time', 'Unit Name' => 'Second', 'AllowPrefix' => true],
+ 'Pa' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true],
+ 'p' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true],
+ 'atm' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true],
+ 'at' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true],
+ 'mmHg' => ['Group' => 'Pressure', 'Unit Name' => 'mm of Mercury', 'AllowPrefix' => true],
+ 'N' => ['Group' => 'Force', 'Unit Name' => 'Newton', 'AllowPrefix' => true],
+ 'dyn' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true],
+ 'dy' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true],
+ 'lbf' => ['Group' => 'Force', 'Unit Name' => 'Pound force', 'AllowPrefix' => false],
+ 'J' => ['Group' => 'Energy', 'Unit Name' => 'Joule', 'AllowPrefix' => true],
+ 'e' => ['Group' => 'Energy', 'Unit Name' => 'Erg', 'AllowPrefix' => true],
+ 'c' => ['Group' => 'Energy', 'Unit Name' => 'Thermodynamic calorie', 'AllowPrefix' => true],
+ 'cal' => ['Group' => 'Energy', 'Unit Name' => 'IT calorie', 'AllowPrefix' => true],
+ 'eV' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true],
+ 'ev' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true],
+ 'HPh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false],
+ 'hh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false],
+ 'Wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true],
+ 'wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true],
+ 'flb' => ['Group' => 'Energy', 'Unit Name' => 'Foot-pound', 'AllowPrefix' => false],
+ 'BTU' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false],
+ 'btu' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false],
+ 'HP' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false],
+ 'h' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false],
+ 'W' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true],
+ 'w' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true],
+ 'T' => ['Group' => 'Magnetism', 'Unit Name' => 'Tesla', 'AllowPrefix' => true],
+ 'ga' => ['Group' => 'Magnetism', 'Unit Name' => 'Gauss', 'AllowPrefix' => true],
+ 'C' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false],
+ 'cel' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false],
+ 'F' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false],
+ 'fah' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false],
+ 'K' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false],
+ 'kel' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false],
+ 'tsp' => ['Group' => 'Liquid', 'Unit Name' => 'Teaspoon', 'AllowPrefix' => false],
+ 'tbs' => ['Group' => 'Liquid', 'Unit Name' => 'Tablespoon', 'AllowPrefix' => false],
+ 'oz' => ['Group' => 'Liquid', 'Unit Name' => 'Fluid Ounce', 'AllowPrefix' => false],
+ 'cup' => ['Group' => 'Liquid', 'Unit Name' => 'Cup', 'AllowPrefix' => false],
+ 'pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false],
+ 'us_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false],
+ 'uk_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.K. Pint', 'AllowPrefix' => false],
+ 'qt' => ['Group' => 'Liquid', 'Unit Name' => 'Quart', 'AllowPrefix' => false],
+ 'gal' => ['Group' => 'Liquid', 'Unit Name' => 'Gallon', 'AllowPrefix' => false],
+ 'l' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true],
+ 'lt' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true],
+ ];
+
+ /**
+ * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().
+ *
+ * @var mixed[]
+ */
+ private static $conversionMultipliers = [
+ 'Y' => ['multiplier' => 1E24, 'name' => 'yotta'],
+ 'Z' => ['multiplier' => 1E21, 'name' => 'zetta'],
+ 'E' => ['multiplier' => 1E18, 'name' => 'exa'],
+ 'P' => ['multiplier' => 1E15, 'name' => 'peta'],
+ 'T' => ['multiplier' => 1E12, 'name' => 'tera'],
+ 'G' => ['multiplier' => 1E9, 'name' => 'giga'],
+ 'M' => ['multiplier' => 1E6, 'name' => 'mega'],
+ 'k' => ['multiplier' => 1E3, 'name' => 'kilo'],
+ 'h' => ['multiplier' => 1E2, 'name' => 'hecto'],
+ 'e' => ['multiplier' => 1E1, 'name' => 'deka'],
+ 'd' => ['multiplier' => 1E-1, 'name' => 'deci'],
+ 'c' => ['multiplier' => 1E-2, 'name' => 'centi'],
+ 'm' => ['multiplier' => 1E-3, 'name' => 'milli'],
+ 'u' => ['multiplier' => 1E-6, 'name' => 'micro'],
+ 'n' => ['multiplier' => 1E-9, 'name' => 'nano'],
+ 'p' => ['multiplier' => 1E-12, 'name' => 'pico'],
+ 'f' => ['multiplier' => 1E-15, 'name' => 'femto'],
+ 'a' => ['multiplier' => 1E-18, 'name' => 'atto'],
+ 'z' => ['multiplier' => 1E-21, 'name' => 'zepto'],
+ 'y' => ['multiplier' => 1E-24, 'name' => 'yocto'],
+ ];
+
+ /**
+ * Details of the Units of measure conversion factors, organised by group.
+ *
+ * @var mixed[]
+ */
+ private static $unitConversions = [
+ 'Mass' => [
+ 'g' => [
+ 'g' => 1.0,
+ 'sg' => 6.85220500053478E-05,
+ 'lbm' => 2.20462291469134E-03,
+ 'u' => 6.02217000000000E+23,
+ 'ozm' => 3.52739718003627E-02,
+ ],
+ 'sg' => [
+ 'g' => 1.45938424189287E+04,
+ 'sg' => 1.0,
+ 'lbm' => 3.21739194101647E+01,
+ 'u' => 8.78866000000000E+27,
+ 'ozm' => 5.14782785944229E+02,
+ ],
+ 'lbm' => [
+ 'g' => 4.5359230974881148E+02,
+ 'sg' => 3.10810749306493E-02,
+ 'lbm' => 1.0,
+ 'u' => 2.73161000000000E+26,
+ 'ozm' => 1.60000023429410E+01,
+ ],
+ 'u' => [
+ 'g' => 1.66053100460465E-24,
+ 'sg' => 1.13782988532950E-28,
+ 'lbm' => 3.66084470330684E-27,
+ 'u' => 1.0,
+ 'ozm' => 5.85735238300524E-26,
+ ],
+ 'ozm' => [
+ 'g' => 2.83495152079732E+01,
+ 'sg' => 1.94256689870811E-03,
+ 'lbm' => 6.24999908478882E-02,
+ 'u' => 1.70725600000000E+25,
+ 'ozm' => 1.0,
+ ],
+ ],
+ 'Distance' => [
+ 'm' => [
+ 'm' => 1.0,
+ 'mi' => 6.21371192237334E-04,
+ 'Nmi' => 5.39956803455724E-04,
+ 'in' => 3.93700787401575E+01,
+ 'ft' => 3.28083989501312E+00,
+ 'yd' => 1.09361329797891E+00,
+ 'ang' => 1.00000000000000E+10,
+ 'Pica' => 2.83464566929116E+03,
+ ],
+ 'mi' => [
+ 'm' => 1.60934400000000E+03,
+ 'mi' => 1.0,
+ 'Nmi' => 8.68976241900648E-01,
+ 'in' => 6.33600000000000E+04,
+ 'ft' => 5.28000000000000E+03,
+ 'yd' => 1.76000000000000E+03,
+ 'ang' => 1.60934400000000E+13,
+ 'Pica' => 4.56191999999971E+06,
+ ],
+ 'Nmi' => [
+ 'm' => 1.85200000000000E+03,
+ 'mi' => 1.15077944802354E+00,
+ 'Nmi' => 1.0,
+ 'in' => 7.29133858267717E+04,
+ 'ft' => 6.07611548556430E+03,
+ 'yd' => 2.02537182785694E+03,
+ 'ang' => 1.85200000000000E+13,
+ 'Pica' => 5.24976377952723E+06,
+ ],
+ 'in' => [
+ 'm' => 2.54000000000000E-02,
+ 'mi' => 1.57828282828283E-05,
+ 'Nmi' => 1.37149028077754E-05,
+ 'in' => 1.0,
+ 'ft' => 8.33333333333333E-02,
+ 'yd' => 2.77777777686643E-02,
+ 'ang' => 2.54000000000000E+08,
+ 'Pica' => 7.19999999999955E+01,
+ ],
+ 'ft' => [
+ 'm' => 3.04800000000000E-01,
+ 'mi' => 1.89393939393939E-04,
+ 'Nmi' => 1.64578833693305E-04,
+ 'in' => 1.20000000000000E+01,
+ 'ft' => 1.0,
+ 'yd' => 3.33333333223972E-01,
+ 'ang' => 3.04800000000000E+09,
+ 'Pica' => 8.63999999999946E+02,
+ ],
+ 'yd' => [
+ 'm' => 9.14400000300000E-01,
+ 'mi' => 5.68181818368230E-04,
+ 'Nmi' => 4.93736501241901E-04,
+ 'in' => 3.60000000118110E+01,
+ 'ft' => 3.00000000000000E+00,
+ 'yd' => 1.0,
+ 'ang' => 9.14400000300000E+09,
+ 'Pica' => 2.59200000085023E+03,
+ ],
+ 'ang' => [
+ 'm' => 1.00000000000000E-10,
+ 'mi' => 6.21371192237334E-14,
+ 'Nmi' => 5.39956803455724E-14,
+ 'in' => 3.93700787401575E-09,
+ 'ft' => 3.28083989501312E-10,
+ 'yd' => 1.09361329797891E-10,
+ 'ang' => 1.0,
+ 'Pica' => 2.83464566929116E-07,
+ ],
+ 'Pica' => [
+ 'm' => 3.52777777777800E-04,
+ 'mi' => 2.19205948372629E-07,
+ 'Nmi' => 1.90484761219114E-07,
+ 'in' => 1.38888888888898E-02,
+ 'ft' => 1.15740740740748E-03,
+ 'yd' => 3.85802469009251E-04,
+ 'ang' => 3.52777777777800E+06,
+ 'Pica' => 1.0,
+ ],
+ ],
+ 'Time' => [
+ 'yr' => [
+ 'yr' => 1.0,
+ 'day' => 365.25,
+ 'hr' => 8766.0,
+ 'mn' => 525960.0,
+ 'sec' => 31557600.0,
+ ],
+ 'day' => [
+ 'yr' => 2.73785078713210E-03,
+ 'day' => 1.0,
+ 'hr' => 24.0,
+ 'mn' => 1440.0,
+ 'sec' => 86400.0,
+ ],
+ 'hr' => [
+ 'yr' => 1.14077116130504E-04,
+ 'day' => 4.16666666666667E-02,
+ 'hr' => 1.0,
+ 'mn' => 60.0,
+ 'sec' => 3600.0,
+ ],
+ 'mn' => [
+ 'yr' => 1.90128526884174E-06,
+ 'day' => 6.94444444444444E-04,
+ 'hr' => 1.66666666666667E-02,
+ 'mn' => 1.0,
+ 'sec' => 60.0,
+ ],
+ 'sec' => [
+ 'yr' => 3.16880878140289E-08,
+ 'day' => 1.15740740740741E-05,
+ 'hr' => 2.77777777777778E-04,
+ 'mn' => 1.66666666666667E-02,
+ 'sec' => 1.0,
+ ],
+ ],
+ 'Pressure' => [
+ 'Pa' => [
+ 'Pa' => 1.0,
+ 'p' => 1.0,
+ 'atm' => 9.86923299998193E-06,
+ 'at' => 9.86923299998193E-06,
+ 'mmHg' => 7.50061707998627E-03,
+ ],
+ 'p' => [
+ 'Pa' => 1.0,
+ 'p' => 1.0,
+ 'atm' => 9.86923299998193E-06,
+ 'at' => 9.86923299998193E-06,
+ 'mmHg' => 7.50061707998627E-03,
+ ],
+ 'atm' => [
+ 'Pa' => 1.01324996583000E+05,
+ 'p' => 1.01324996583000E+05,
+ 'atm' => 1.0,
+ 'at' => 1.0,
+ 'mmHg' => 760.0,
+ ],
+ 'at' => [
+ 'Pa' => 1.01324996583000E+05,
+ 'p' => 1.01324996583000E+05,
+ 'atm' => 1.0,
+ 'at' => 1.0,
+ 'mmHg' => 760.0,
+ ],
+ 'mmHg' => [
+ 'Pa' => 1.33322363925000E+02,
+ 'p' => 1.33322363925000E+02,
+ 'atm' => 1.31578947368421E-03,
+ 'at' => 1.31578947368421E-03,
+ 'mmHg' => 1.0,
+ ],
+ ],
+ 'Force' => [
+ 'N' => [
+ 'N' => 1.0,
+ 'dyn' => 1.0E+5,
+ 'dy' => 1.0E+5,
+ 'lbf' => 2.24808923655339E-01,
+ ],
+ 'dyn' => [
+ 'N' => 1.0E-5,
+ 'dyn' => 1.0,
+ 'dy' => 1.0,
+ 'lbf' => 2.24808923655339E-06,
+ ],
+ 'dy' => [
+ 'N' => 1.0E-5,
+ 'dyn' => 1.0,
+ 'dy' => 1.0,
+ 'lbf' => 2.24808923655339E-06,
+ ],
+ 'lbf' => [
+ 'N' => 4.448222,
+ 'dyn' => 4.448222E+5,
+ 'dy' => 4.448222E+5,
+ 'lbf' => 1.0,
+ ],
+ ],
+ 'Energy' => [
+ 'J' => [
+ 'J' => 1.0,
+ 'e' => 9.99999519343231E+06,
+ 'c' => 2.39006249473467E-01,
+ 'cal' => 2.38846190642017E-01,
+ 'eV' => 6.24145700000000E+18,
+ 'ev' => 6.24145700000000E+18,
+ 'HPh' => 3.72506430801000E-07,
+ 'hh' => 3.72506430801000E-07,
+ 'Wh' => 2.77777916238711E-04,
+ 'wh' => 2.77777916238711E-04,
+ 'flb' => 2.37304222192651E+01,
+ 'BTU' => 9.47815067349015E-04,
+ 'btu' => 9.47815067349015E-04,
+ ],
+ 'e' => [
+ 'J' => 1.00000048065700E-07,
+ 'e' => 1.0,
+ 'c' => 2.39006364353494E-08,
+ 'cal' => 2.38846305445111E-08,
+ 'eV' => 6.24146000000000E+11,
+ 'ev' => 6.24146000000000E+11,
+ 'HPh' => 3.72506609848824E-14,
+ 'hh' => 3.72506609848824E-14,
+ 'Wh' => 2.77778049754611E-11,
+ 'wh' => 2.77778049754611E-11,
+ 'flb' => 2.37304336254586E-06,
+ 'BTU' => 9.47815522922962E-11,
+ 'btu' => 9.47815522922962E-11,
+ ],
+ 'c' => [
+ 'J' => 4.18399101363672E+00,
+ 'e' => 4.18398900257312E+07,
+ 'c' => 1.0,
+ 'cal' => 9.99330315287563E-01,
+ 'eV' => 2.61142000000000E+19,
+ 'ev' => 2.61142000000000E+19,
+ 'HPh' => 1.55856355899327E-06,
+ 'hh' => 1.55856355899327E-06,
+ 'Wh' => 1.16222030532950E-03,
+ 'wh' => 1.16222030532950E-03,
+ 'flb' => 9.92878733152102E+01,
+ 'BTU' => 3.96564972437776E-03,
+ 'btu' => 3.96564972437776E-03,
+ ],
+ 'cal' => [
+ 'J' => 4.18679484613929E+00,
+ 'e' => 4.18679283372801E+07,
+ 'c' => 1.00067013349059E+00,
+ 'cal' => 1.0,
+ 'eV' => 2.61317000000000E+19,
+ 'ev' => 2.61317000000000E+19,
+ 'HPh' => 1.55960800463137E-06,
+ 'hh' => 1.55960800463137E-06,
+ 'Wh' => 1.16299914807955E-03,
+ 'wh' => 1.16299914807955E-03,
+ 'flb' => 9.93544094443283E+01,
+ 'BTU' => 3.96830723907002E-03,
+ 'btu' => 3.96830723907002E-03,
+ ],
+ 'eV' => [
+ 'J' => 1.60219000146921E-19,
+ 'e' => 1.60218923136574E-12,
+ 'c' => 3.82933423195043E-20,
+ 'cal' => 3.82676978535648E-20,
+ 'eV' => 1.0,
+ 'ev' => 1.0,
+ 'HPh' => 5.96826078912344E-26,
+ 'hh' => 5.96826078912344E-26,
+ 'Wh' => 4.45053000026614E-23,
+ 'wh' => 4.45053000026614E-23,
+ 'flb' => 3.80206452103492E-18,
+ 'BTU' => 1.51857982414846E-22,
+ 'btu' => 1.51857982414846E-22,
+ ],
+ 'ev' => [
+ 'J' => 1.60219000146921E-19,
+ 'e' => 1.60218923136574E-12,
+ 'c' => 3.82933423195043E-20,
+ 'cal' => 3.82676978535648E-20,
+ 'eV' => 1.0,
+ 'ev' => 1.0,
+ 'HPh' => 5.96826078912344E-26,
+ 'hh' => 5.96826078912344E-26,
+ 'Wh' => 4.45053000026614E-23,
+ 'wh' => 4.45053000026614E-23,
+ 'flb' => 3.80206452103492E-18,
+ 'BTU' => 1.51857982414846E-22,
+ 'btu' => 1.51857982414846E-22,
+ ],
+ 'HPh' => [
+ 'J' => 2.68451741316170E+06,
+ 'e' => 2.68451612283024E+13,
+ 'c' => 6.41616438565991E+05,
+ 'cal' => 6.41186757845835E+05,
+ 'eV' => 1.67553000000000E+25,
+ 'ev' => 1.67553000000000E+25,
+ 'HPh' => 1.0,
+ 'hh' => 1.0,
+ 'Wh' => 7.45699653134593E+02,
+ 'wh' => 7.45699653134593E+02,
+ 'flb' => 6.37047316692964E+07,
+ 'BTU' => 2.54442605275546E+03,
+ 'btu' => 2.54442605275546E+03,
+ ],
+ 'hh' => [
+ 'J' => 2.68451741316170E+06,
+ 'e' => 2.68451612283024E+13,
+ 'c' => 6.41616438565991E+05,
+ 'cal' => 6.41186757845835E+05,
+ 'eV' => 1.67553000000000E+25,
+ 'ev' => 1.67553000000000E+25,
+ 'HPh' => 1.0,
+ 'hh' => 1.0,
+ 'Wh' => 7.45699653134593E+02,
+ 'wh' => 7.45699653134593E+02,
+ 'flb' => 6.37047316692964E+07,
+ 'BTU' => 2.54442605275546E+03,
+ 'btu' => 2.54442605275546E+03,
+ ],
+ 'Wh' => [
+ 'J' => 3.59999820554720E+03,
+ 'e' => 3.59999647518369E+10,
+ 'c' => 8.60422069219046E+02,
+ 'cal' => 8.59845857713046E+02,
+ 'eV' => 2.24692340000000E+22,
+ 'ev' => 2.24692340000000E+22,
+ 'HPh' => 1.34102248243839E-03,
+ 'hh' => 1.34102248243839E-03,
+ 'Wh' => 1.0,
+ 'wh' => 1.0,
+ 'flb' => 8.54294774062316E+04,
+ 'BTU' => 3.41213254164705E+00,
+ 'btu' => 3.41213254164705E+00,
+ ],
+ 'wh' => [
+ 'J' => 3.59999820554720E+03,
+ 'e' => 3.59999647518369E+10,
+ 'c' => 8.60422069219046E+02,
+ 'cal' => 8.59845857713046E+02,
+ 'eV' => 2.24692340000000E+22,
+ 'ev' => 2.24692340000000E+22,
+ 'HPh' => 1.34102248243839E-03,
+ 'hh' => 1.34102248243839E-03,
+ 'Wh' => 1.0,
+ 'wh' => 1.0,
+ 'flb' => 8.54294774062316E+04,
+ 'BTU' => 3.41213254164705E+00,
+ 'btu' => 3.41213254164705E+00,
+ ],
+ 'flb' => [
+ 'J' => 4.21400003236424E-02,
+ 'e' => 4.21399800687660E+05,
+ 'c' => 1.00717234301644E-02,
+ 'cal' => 1.00649785509554E-02,
+ 'eV' => 2.63015000000000E+17,
+ 'ev' => 2.63015000000000E+17,
+ 'HPh' => 1.56974211145130E-08,
+ 'hh' => 1.56974211145130E-08,
+ 'Wh' => 1.17055614802000E-05,
+ 'wh' => 1.17055614802000E-05,
+ 'flb' => 1.0,
+ 'BTU' => 3.99409272448406E-05,
+ 'btu' => 3.99409272448406E-05,
+ ],
+ 'BTU' => [
+ 'J' => 1.05505813786749E+03,
+ 'e' => 1.05505763074665E+10,
+ 'c' => 2.52165488508168E+02,
+ 'cal' => 2.51996617135510E+02,
+ 'eV' => 6.58510000000000E+21,
+ 'ev' => 6.58510000000000E+21,
+ 'HPh' => 3.93015941224568E-04,
+ 'hh' => 3.93015941224568E-04,
+ 'Wh' => 2.93071851047526E-01,
+ 'wh' => 2.93071851047526E-01,
+ 'flb' => 2.50369750774671E+04,
+ 'BTU' => 1.0,
+ 'btu' => 1.0,
+ ],
+ 'btu' => [
+ 'J' => 1.05505813786749E+03,
+ 'e' => 1.05505763074665E+10,
+ 'c' => 2.52165488508168E+02,
+ 'cal' => 2.51996617135510E+02,
+ 'eV' => 6.58510000000000E+21,
+ 'ev' => 6.58510000000000E+21,
+ 'HPh' => 3.93015941224568E-04,
+ 'hh' => 3.93015941224568E-04,
+ 'Wh' => 2.93071851047526E-01,
+ 'wh' => 2.93071851047526E-01,
+ 'flb' => 2.50369750774671E+04,
+ 'BTU' => 1.0,
+ 'btu' => 1.0,
+ ],
+ ],
+ 'Power' => [
+ 'HP' => [
+ 'HP' => 1.0,
+ 'h' => 1.0,
+ 'W' => 7.45701000000000E+02,
+ 'w' => 7.45701000000000E+02,
+ ],
+ 'h' => [
+ 'HP' => 1.0,
+ 'h' => 1.0,
+ 'W' => 7.45701000000000E+02,
+ 'w' => 7.45701000000000E+02,
+ ],
+ 'W' => [
+ 'HP' => 1.34102006031908E-03,
+ 'h' => 1.34102006031908E-03,
+ 'W' => 1.0,
+ 'w' => 1.0,
+ ],
+ 'w' => [
+ 'HP' => 1.34102006031908E-03,
+ 'h' => 1.34102006031908E-03,
+ 'W' => 1.0,
+ 'w' => 1.0,
+ ],
+ ],
+ 'Magnetism' => [
+ 'T' => [
+ 'T' => 1.0,
+ 'ga' => 10000.0,
+ ],
+ 'ga' => [
+ 'T' => 0.0001,
+ 'ga' => 1.0,
+ ],
+ ],
+ 'Liquid' => [
+ 'tsp' => [
+ 'tsp' => 1.0,
+ 'tbs' => 3.33333333333333E-01,
+ 'oz' => 1.66666666666667E-01,
+ 'cup' => 2.08333333333333E-02,
+ 'pt' => 1.04166666666667E-02,
+ 'us_pt' => 1.04166666666667E-02,
+ 'uk_pt' => 8.67558516821960E-03,
+ 'qt' => 5.20833333333333E-03,
+ 'gal' => 1.30208333333333E-03,
+ 'l' => 4.92999408400710E-03,
+ 'lt' => 4.92999408400710E-03,
+ ],
+ 'tbs' => [
+ 'tsp' => 3.00000000000000E+00,
+ 'tbs' => 1.0,
+ 'oz' => 5.00000000000000E-01,
+ 'cup' => 6.25000000000000E-02,
+ 'pt' => 3.12500000000000E-02,
+ 'us_pt' => 3.12500000000000E-02,
+ 'uk_pt' => 2.60267555046588E-02,
+ 'qt' => 1.56250000000000E-02,
+ 'gal' => 3.90625000000000E-03,
+ 'l' => 1.47899822520213E-02,
+ 'lt' => 1.47899822520213E-02,
+ ],
+ 'oz' => [
+ 'tsp' => 6.00000000000000E+00,
+ 'tbs' => 2.00000000000000E+00,
+ 'oz' => 1.0,
+ 'cup' => 1.25000000000000E-01,
+ 'pt' => 6.25000000000000E-02,
+ 'us_pt' => 6.25000000000000E-02,
+ 'uk_pt' => 5.20535110093176E-02,
+ 'qt' => 3.12500000000000E-02,
+ 'gal' => 7.81250000000000E-03,
+ 'l' => 2.95799645040426E-02,
+ 'lt' => 2.95799645040426E-02,
+ ],
+ 'cup' => [
+ 'tsp' => 4.80000000000000E+01,
+ 'tbs' => 1.60000000000000E+01,
+ 'oz' => 8.00000000000000E+00,
+ 'cup' => 1.0,
+ 'pt' => 5.00000000000000E-01,
+ 'us_pt' => 5.00000000000000E-01,
+ 'uk_pt' => 4.16428088074541E-01,
+ 'qt' => 2.50000000000000E-01,
+ 'gal' => 6.25000000000000E-02,
+ 'l' => 2.36639716032341E-01,
+ 'lt' => 2.36639716032341E-01,
+ ],
+ 'pt' => [
+ 'tsp' => 9.60000000000000E+01,
+ 'tbs' => 3.20000000000000E+01,
+ 'oz' => 1.60000000000000E+01,
+ 'cup' => 2.00000000000000E+00,
+ 'pt' => 1.0,
+ 'us_pt' => 1.0,
+ 'uk_pt' => 8.32856176149081E-01,
+ 'qt' => 5.00000000000000E-01,
+ 'gal' => 1.25000000000000E-01,
+ 'l' => 4.73279432064682E-01,
+ 'lt' => 4.73279432064682E-01,
+ ],
+ 'us_pt' => [
+ 'tsp' => 9.60000000000000E+01,
+ 'tbs' => 3.20000000000000E+01,
+ 'oz' => 1.60000000000000E+01,
+ 'cup' => 2.00000000000000E+00,
+ 'pt' => 1.0,
+ 'us_pt' => 1.0,
+ 'uk_pt' => 8.32856176149081E-01,
+ 'qt' => 5.00000000000000E-01,
+ 'gal' => 1.25000000000000E-01,
+ 'l' => 4.73279432064682E-01,
+ 'lt' => 4.73279432064682E-01,
+ ],
+ 'uk_pt' => [
+ 'tsp' => 1.15266000000000E+02,
+ 'tbs' => 3.84220000000000E+01,
+ 'oz' => 1.92110000000000E+01,
+ 'cup' => 2.40137500000000E+00,
+ 'pt' => 1.20068750000000E+00,
+ 'us_pt' => 1.20068750000000E+00,
+ 'uk_pt' => 1.0,
+ 'qt' => 6.00343750000000E-01,
+ 'gal' => 1.50085937500000E-01,
+ 'l' => 5.68260698087162E-01,
+ 'lt' => 5.68260698087162E-01,
+ ],
+ 'qt' => [
+ 'tsp' => 1.92000000000000E+02,
+ 'tbs' => 6.40000000000000E+01,
+ 'oz' => 3.20000000000000E+01,
+ 'cup' => 4.00000000000000E+00,
+ 'pt' => 2.00000000000000E+00,
+ 'us_pt' => 2.00000000000000E+00,
+ 'uk_pt' => 1.66571235229816E+00,
+ 'qt' => 1.0,
+ 'gal' => 2.50000000000000E-01,
+ 'l' => 9.46558864129363E-01,
+ 'lt' => 9.46558864129363E-01,
+ ],
+ 'gal' => [
+ 'tsp' => 7.68000000000000E+02,
+ 'tbs' => 2.56000000000000E+02,
+ 'oz' => 1.28000000000000E+02,
+ 'cup' => 1.60000000000000E+01,
+ 'pt' => 8.00000000000000E+00,
+ 'us_pt' => 8.00000000000000E+00,
+ 'uk_pt' => 6.66284940919265E+00,
+ 'qt' => 4.00000000000000E+00,
+ 'gal' => 1.0,
+ 'l' => 3.78623545651745E+00,
+ 'lt' => 3.78623545651745E+00,
+ ],
+ 'l' => [
+ 'tsp' => 2.02840000000000E+02,
+ 'tbs' => 6.76133333333333E+01,
+ 'oz' => 3.38066666666667E+01,
+ 'cup' => 4.22583333333333E+00,
+ 'pt' => 2.11291666666667E+00,
+ 'us_pt' => 2.11291666666667E+00,
+ 'uk_pt' => 1.75975569552166E+00,
+ 'qt' => 1.05645833333333E+00,
+ 'gal' => 2.64114583333333E-01,
+ 'l' => 1.0,
+ 'lt' => 1.0,
+ ],
+ 'lt' => [
+ 'tsp' => 2.02840000000000E+02,
+ 'tbs' => 6.76133333333333E+01,
+ 'oz' => 3.38066666666667E+01,
+ 'cup' => 4.22583333333333E+00,
+ 'pt' => 2.11291666666667E+00,
+ 'us_pt' => 2.11291666666667E+00,
+ 'uk_pt' => 1.75975569552166E+00,
+ 'qt' => 1.05645833333333E+00,
+ 'gal' => 2.64114583333333E-01,
+ 'l' => 1.0,
+ 'lt' => 1.0,
+ ],
+ ],
+ ];
+
+ /**
+ * parseComplex.
+ *
+ * Parses a complex number into its real and imaginary parts, and an I or J suffix
+ *
+ * @deprecated 2.0.0 No longer used by internal code. Please use the Complex\Complex class instead
+ *
+ * @param string $complexNumber The complex number
+ *
+ * @return mixed[] Indexed on "real", "imaginary" and "suffix"
+ */
+ public static function parseComplex($complexNumber)
+ {
+ $complex = new Complex($complexNumber);
+
+ return [
+ 'real' => $complex->getReal(),
+ 'imaginary' => $complex->getImaginary(),
+ 'suffix' => $complex->getSuffix(),
+ ];
+ }
+
+ /**
+ * Formats a number base string value with leading zeroes.
+ *
+ * @param string $xVal The "number" to pad
+ * @param int $places The length that we want to pad this value
+ *
+ * @return string The padded "number"
+ */
+ private static function nbrConversionFormat($xVal, $places)
+ {
+ if ($places !== null) {
+ if (is_numeric($places)) {
+ $places = (int) $places;
+ } else {
+ return Functions::VALUE();
+ }
+ if ($places < 0) {
+ return Functions::NAN();
+ }
+ if (strlen($xVal) <= $places) {
+ return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10);
+ }
+
+ return Functions::NAN();
+ }
+
+ return substr($xVal, -10);
+ }
+
+ /**
+ * BESSELI.
+ *
+ * Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated
+ * for purely imaginary arguments
+ *
+ * Excel Function:
+ * BESSELI(x,ord)
+ *
+ * @param float $x The value at which to evaluate the function.
+ * If x is nonnumeric, BESSELI returns the #VALUE! error value.
+ * @param int $ord The order of the Bessel function.
+ * If ord is not an integer, it is truncated.
+ * If $ord is nonnumeric, BESSELI returns the #VALUE! error value.
+ * If $ord < 0, BESSELI returns the #NUM! error value.
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function BESSELI($x, $ord)
+ {
+ $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
+ $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+
+ if ((is_numeric($x)) && (is_numeric($ord))) {
+ $ord = floor($ord);
+ if ($ord < 0) {
+ return Functions::NAN();
+ }
+
+ if (abs($x) <= 30) {
+ $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord);
+ $ordK = 1;
+ $fSqrX = ($x * $x) / 4;
+ do {
+ $fTerm *= $fSqrX;
+ $fTerm /= ($ordK * ($ordK + $ord));
+ $fResult += $fTerm;
+ } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
+ } else {
+ $f_2_PI = 2 * M_PI;
+
+ $fXAbs = abs($x);
+ $fResult = exp($fXAbs) / sqrt($f_2_PI * $fXAbs);
+ if (($ord & 1) && ($x < 0)) {
+ $fResult = -$fResult;
+ }
+ }
+
+ return (is_nan($fResult)) ? Functions::NAN() : $fResult;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * BESSELJ.
+ *
+ * Returns the Bessel function
+ *
+ * Excel Function:
+ * BESSELJ(x,ord)
+ *
+ * @param float $x The value at which to evaluate the function.
+ * If x is nonnumeric, BESSELJ returns the #VALUE! error value.
+ * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
+ * If $ord is nonnumeric, BESSELJ returns the #VALUE! error value.
+ * If $ord < 0, BESSELJ returns the #NUM! error value.
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function BESSELJ($x, $ord)
+ {
+ $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
+ $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+
+ if ((is_numeric($x)) && (is_numeric($ord))) {
+ $ord = floor($ord);
+ if ($ord < 0) {
+ return Functions::NAN();
+ }
+
+ $fResult = 0;
+ if (abs($x) <= 30) {
+ $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord);
+ $ordK = 1;
+ $fSqrX = ($x * $x) / -4;
+ do {
+ $fTerm *= $fSqrX;
+ $fTerm /= ($ordK * ($ordK + $ord));
+ $fResult += $fTerm;
+ } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
+ } else {
+ $f_PI_DIV_2 = M_PI / 2;
+ $f_PI_DIV_4 = M_PI / 4;
+
+ $fXAbs = abs($x);
+ $fResult = sqrt(Functions::M_2DIVPI / $fXAbs) * cos($fXAbs - $ord * $f_PI_DIV_2 - $f_PI_DIV_4);
+ if (($ord & 1) && ($x < 0)) {
+ $fResult = -$fResult;
+ }
+ }
+
+ return (is_nan($fResult)) ? Functions::NAN() : $fResult;
+ }
+
+ return Functions::VALUE();
+ }
+
+ private static function besselK0($fNum)
+ {
+ if ($fNum <= 2) {
+ $fNum2 = $fNum * 0.5;
+ $y = ($fNum2 * $fNum2);
+ $fRet = -log($fNum2) * self::BESSELI($fNum, 0) +
+ (-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y *
+ (0.10750e-3 + $y * 0.74e-5))))));
+ } else {
+ $y = 2 / $fNum;
+ $fRet = exp(-$fNum) / sqrt($fNum) *
+ (1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y *
+ (0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3))))));
+ }
+
+ return $fRet;
+ }
+
+ private static function besselK1($fNum)
+ {
+ if ($fNum <= 2) {
+ $fNum2 = $fNum * 0.5;
+ $y = ($fNum2 * $fNum2);
+ $fRet = log($fNum2) * self::BESSELI($fNum, 1) +
+ (1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y *
+ (-0.110404e-2 + $y * (-0.4686e-4))))))) / $fNum;
+ } else {
+ $y = 2 / $fNum;
+ $fRet = exp(-$fNum) / sqrt($fNum) *
+ (1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y *
+ (0.325614e-2 + $y * (-0.68245e-3)))))));
+ }
+
+ return $fRet;
+ }
+
+ /**
+ * BESSELK.
+ *
+ * Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated
+ * for purely imaginary arguments.
+ *
+ * Excel Function:
+ * BESSELK(x,ord)
+ *
+ * @param float $x The value at which to evaluate the function.
+ * If x is nonnumeric, BESSELK returns the #VALUE! error value.
+ * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
+ * If $ord is nonnumeric, BESSELK returns the #VALUE! error value.
+ * If $ord < 0, BESSELK returns the #NUM! error value.
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function BESSELK($x, $ord)
+ {
+ $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
+ $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+
+ if ((is_numeric($x)) && (is_numeric($ord))) {
+ if (($ord < 0) || ($x == 0.0)) {
+ return Functions::NAN();
+ }
+
+ switch (floor($ord)) {
+ case 0:
+ $fBk = self::besselK0($x);
+
+ break;
+ case 1:
+ $fBk = self::besselK1($x);
+
+ break;
+ default:
+ $fTox = 2 / $x;
+ $fBkm = self::besselK0($x);
+ $fBk = self::besselK1($x);
+ for ($n = 1; $n < $ord; ++$n) {
+ $fBkp = $fBkm + $n * $fTox * $fBk;
+ $fBkm = $fBk;
+ $fBk = $fBkp;
+ }
+ }
+
+ return (is_nan($fBk)) ? Functions::NAN() : $fBk;
+ }
+
+ return Functions::VALUE();
+ }
+
+ private static function besselY0($fNum)
+ {
+ if ($fNum < 8.0) {
+ $y = ($fNum * $fNum);
+ $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y * (-86327.92757 + $y * 228.4622733))));
+ $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y * (47447.26470 + $y * (226.1030244 + $y))));
+ $fRet = $f1 / $f2 + 0.636619772 * self::BESSELJ($fNum, 0) * log($fNum);
+ } else {
+ $z = 8.0 / $fNum;
+ $y = ($z * $z);
+ $xx = $fNum - 0.785398164;
+ $f1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));
+ $f2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y * (-0.934945152e-7))));
+ $fRet = sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2);
+ }
+
+ return $fRet;
+ }
+
+ private static function besselY1($fNum)
+ {
+ if ($fNum < 8.0) {
+ $y = ($fNum * $fNum);
+ $f1 = $fNum * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y * (0.7349264551e9 + $y *
+ (-0.4237922726e7 + $y * 0.8511937935e4)))));
+ $f2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y *
+ (0.1020426050e6 + $y * (0.3549632885e3 + $y)))));
+ $fRet = $f1 / $f2 + 0.636619772 * (self::BESSELJ($fNum, 1) * log($fNum) - 1 / $fNum);
+ } else {
+ $fRet = sqrt(0.636619772 / $fNum) * sin($fNum - 2.356194491);
+ }
+
+ return $fRet;
+ }
+
+ /**
+ * BESSELY.
+ *
+ * Returns the Bessel function, which is also called the Weber function or the Neumann function.
+ *
+ * Excel Function:
+ * BESSELY(x,ord)
+ *
+ * @param float $x The value at which to evaluate the function.
+ * If x is nonnumeric, BESSELK returns the #VALUE! error value.
+ * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
+ * If $ord is nonnumeric, BESSELK returns the #VALUE! error value.
+ * If $ord < 0, BESSELK returns the #NUM! error value.
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function BESSELY($x, $ord)
+ {
+ $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
+ $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+
+ if ((is_numeric($x)) && (is_numeric($ord))) {
+ if (($ord < 0) || ($x == 0.0)) {
+ return Functions::NAN();
+ }
+
+ switch (floor($ord)) {
+ case 0:
+ $fBy = self::besselY0($x);
+
+ break;
+ case 1:
+ $fBy = self::besselY1($x);
+
+ break;
+ default:
+ $fTox = 2 / $x;
+ $fBym = self::besselY0($x);
+ $fBy = self::besselY1($x);
+ for ($n = 1; $n < $ord; ++$n) {
+ $fByp = $n * $fTox * $fBy - $fBym;
+ $fBym = $fBy;
+ $fBy = $fByp;
+ }
+ }
+
+ return (is_nan($fBy)) ? Functions::NAN() : $fBy;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * BINTODEC.
+ *
+ * Return a binary value as decimal.
+ *
+ * Excel Function:
+ * BIN2DEC(x)
+ *
+ * @param string $x The binary number (as a string) that you want to convert. The number
+ * cannot contain more than 10 characters (10 bits). The most significant
+ * bit of number is the sign bit. The remaining 9 bits are magnitude bits.
+ * Negative numbers are represented using two's-complement notation.
+ * If number is not a valid binary number, or if number contains more than
+ * 10 characters (10 bits), BIN2DEC returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function BINTODEC($x)
+ {
+ $x = Functions::flattenSingleValue($x);
+
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $x = floor($x);
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[01]/', $x, $out)) {
+ return Functions::NAN();
+ }
+ if (strlen($x) > 10) {
+ return Functions::NAN();
+ } elseif (strlen($x) == 10) {
+ // Two's Complement
+ $x = substr($x, -9);
+
+ return '-' . (512 - bindec($x));
+ }
+
+ return bindec($x);
+ }
+
+ /**
+ * BINTOHEX.
+ *
+ * Return a binary value as hex.
+ *
+ * Excel Function:
+ * BIN2HEX(x[,places])
+ *
+ * @param string $x The binary number (as a string) that you want to convert. The number
+ * cannot contain more than 10 characters (10 bits). The most significant
+ * bit of number is the sign bit. The remaining 9 bits are magnitude bits.
+ * Negative numbers are represented using two's-complement notation.
+ * If number is not a valid binary number, or if number contains more than
+ * 10 characters (10 bits), BIN2HEX returns the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, BIN2HEX uses the
+ * minimum number of characters necessary. Places is useful for padding the
+ * return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, BIN2HEX returns the #VALUE! error value.
+ * If places is negative, BIN2HEX returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function BINTOHEX($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ // Argument X
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $x = floor($x);
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[01]/', $x, $out)) {
+ return Functions::NAN();
+ }
+ if (strlen($x) > 10) {
+ return Functions::NAN();
+ } elseif (strlen($x) == 10) {
+ // Two's Complement
+ return str_repeat('F', 8) . substr(strtoupper(dechex(bindec(substr($x, -9)))), -2);
+ }
+ $hexVal = (string) strtoupper(dechex(bindec($x)));
+
+ return self::nbrConversionFormat($hexVal, $places);
+ }
+
+ /**
+ * BINTOOCT.
+ *
+ * Return a binary value as octal.
+ *
+ * Excel Function:
+ * BIN2OCT(x[,places])
+ *
+ * @param string $x The binary number (as a string) that you want to convert. The number
+ * cannot contain more than 10 characters (10 bits). The most significant
+ * bit of number is the sign bit. The remaining 9 bits are magnitude bits.
+ * Negative numbers are represented using two's-complement notation.
+ * If number is not a valid binary number, or if number contains more than
+ * 10 characters (10 bits), BIN2OCT returns the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, BIN2OCT uses the
+ * minimum number of characters necessary. Places is useful for padding the
+ * return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, BIN2OCT returns the #VALUE! error value.
+ * If places is negative, BIN2OCT returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function BINTOOCT($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ $x = floor($x);
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[01]/', $x, $out)) {
+ return Functions::NAN();
+ }
+ if (strlen($x) > 10) {
+ return Functions::NAN();
+ } elseif (strlen($x) == 10) {
+ // Two's Complement
+ return str_repeat('7', 7) . substr(strtoupper(decoct(bindec(substr($x, -9)))), -3);
+ }
+ $octVal = (string) decoct(bindec($x));
+
+ return self::nbrConversionFormat($octVal, $places);
+ }
+
+ /**
+ * DECTOBIN.
+ *
+ * Return a decimal value as binary.
+ *
+ * Excel Function:
+ * DEC2BIN(x[,places])
+ *
+ * @param string $x The decimal integer you want to convert. If number is negative,
+ * valid place values are ignored and DEC2BIN returns a 10-character
+ * (10-bit) binary number in which the most significant bit is the sign
+ * bit. The remaining 9 bits are magnitude bits. Negative numbers are
+ * represented using two's-complement notation.
+ * If number < -512 or if number > 511, DEC2BIN returns the #NUM! error
+ * value.
+ * If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
+ * If DEC2BIN requires more than places characters, it returns the #NUM!
+ * error value.
+ * @param int $places The number of characters to use. If places is omitted, DEC2BIN uses
+ * the minimum number of characters necessary. Places is useful for
+ * padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
+ * If places is zero or negative, DEC2BIN returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function DECTOBIN($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) {
+ return Functions::VALUE();
+ }
+
+ $x = (string) floor($x);
+ if ($x < -512 || $x > 511) {
+ return Functions::NAN();
+ }
+
+ $r = decbin($x);
+ // Two's Complement
+ $r = substr($r, -10);
+ if (strlen($r) >= 11) {
+ return Functions::NAN();
+ }
+
+ return self::nbrConversionFormat($r, $places);
+ }
+
+ /**
+ * DECTOHEX.
+ *
+ * Return a decimal value as hex.
+ *
+ * Excel Function:
+ * DEC2HEX(x[,places])
+ *
+ * @param string $x The decimal integer you want to convert. If number is negative,
+ * places is ignored and DEC2HEX returns a 10-character (40-bit)
+ * hexadecimal number in which the most significant bit is the sign
+ * bit. The remaining 39 bits are magnitude bits. Negative numbers
+ * are represented using two's-complement notation.
+ * If number < -549,755,813,888 or if number > 549,755,813,887,
+ * DEC2HEX returns the #NUM! error value.
+ * If number is nonnumeric, DEC2HEX returns the #VALUE! error value.
+ * If DEC2HEX requires more than places characters, it returns the
+ * #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, DEC2HEX uses
+ * the minimum number of characters necessary. Places is useful for
+ * padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
+ * If places is zero or negative, DEC2HEX returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function DECTOHEX($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) {
+ return Functions::VALUE();
+ }
+ $x = (string) floor($x);
+ $r = strtoupper(dechex($x));
+ if (strlen($r) == 8) {
+ // Two's Complement
+ $r = 'FF' . $r;
+ }
+
+ return self::nbrConversionFormat($r, $places);
+ }
+
+ /**
+ * DECTOOCT.
+ *
+ * Return an decimal value as octal.
+ *
+ * Excel Function:
+ * DEC2OCT(x[,places])
+ *
+ * @param string $x The decimal integer you want to convert. If number is negative,
+ * places is ignored and DEC2OCT returns a 10-character (30-bit)
+ * octal number in which the most significant bit is the sign bit.
+ * The remaining 29 bits are magnitude bits. Negative numbers are
+ * represented using two's-complement notation.
+ * If number < -536,870,912 or if number > 536,870,911, DEC2OCT
+ * returns the #NUM! error value.
+ * If number is nonnumeric, DEC2OCT returns the #VALUE! error value.
+ * If DEC2OCT requires more than places characters, it returns the
+ * #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, DEC2OCT uses
+ * the minimum number of characters necessary. Places is useful for
+ * padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, DEC2OCT returns the #VALUE! error value.
+ * If places is zero or negative, DEC2OCT returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function DECTOOCT($x, $places = null)
+ {
+ $xorig = $x;
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ $x = (int) $x;
+ } else {
+ return Functions::VALUE();
+ }
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) {
+ return Functions::VALUE();
+ }
+ $x = (string) floor($x);
+ $r = decoct($x);
+ if (strlen($r) == 11) {
+ // Two's Complement
+ $r = substr($r, -10);
+ }
+
+ return self::nbrConversionFormat($r, $places);
+ }
+
+ /**
+ * HEXTOBIN.
+ *
+ * Return a hex value as binary.
+ *
+ * Excel Function:
+ * HEX2BIN(x[,places])
+ *
+ * @param string $x the hexadecimal number you want to convert.
+ * Number cannot contain more than 10 characters.
+ * The most significant bit of number is the sign bit (40th bit from the right).
+ * The remaining 9 bits are magnitude bits.
+ * Negative numbers are represented using two's-complement notation.
+ * If number is negative, HEX2BIN ignores places and returns a 10-character binary number.
+ * If number is negative, it cannot be less than FFFFFFFE00,
+ * and if number is positive, it cannot be greater than 1FF.
+ * If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value.
+ * If HEX2BIN requires more than places characters, it returns the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted,
+ * HEX2BIN uses the minimum number of characters necessary. Places
+ * is useful for padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, HEX2BIN returns the #VALUE! error value.
+ * If places is negative, HEX2BIN returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function HEXTOBIN($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) {
+ return Functions::NAN();
+ }
+
+ return self::DECTOBIN(self::HEXTODEC($x), $places);
+ }
+
+ /**
+ * HEXTODEC.
+ *
+ * Return a hex value as decimal.
+ *
+ * Excel Function:
+ * HEX2DEC(x)
+ *
+ * @param string $x The hexadecimal number you want to convert. This number cannot
+ * contain more than 10 characters (40 bits). The most significant
+ * bit of number is the sign bit. The remaining 39 bits are magnitude
+ * bits. Negative numbers are represented using two's-complement
+ * notation.
+ * If number is not a valid hexadecimal number, HEX2DEC returns the
+ * #NUM! error value.
+ *
+ * @return string
+ */
+ public static function HEXTODEC($x)
+ {
+ $x = Functions::flattenSingleValue($x);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) {
+ return Functions::NAN();
+ }
+
+ if (strlen($x) > 10) {
+ return Functions::NAN();
+ }
+
+ $binX = '';
+ foreach (str_split($x) as $char) {
+ $binX .= str_pad(base_convert($char, 16, 2), 4, '0', STR_PAD_LEFT);
+ }
+ if (strlen($binX) == 40 && $binX[0] == '1') {
+ for ($i = 0; $i < 40; ++$i) {
+ $binX[$i] = ($binX[$i] == '1' ? '0' : '1');
+ }
+
+ return (bindec($binX) + 1) * -1;
+ }
+
+ return bindec($binX);
+ }
+
+ /**
+ * HEXTOOCT.
+ *
+ * Return a hex value as octal.
+ *
+ * Excel Function:
+ * HEX2OCT(x[,places])
+ *
+ * @param string $x The hexadecimal number you want to convert. Number cannot
+ * contain more than 10 characters. The most significant bit of
+ * number is the sign bit. The remaining 39 bits are magnitude
+ * bits. Negative numbers are represented using two's-complement
+ * notation.
+ * If number is negative, HEX2OCT ignores places and returns a
+ * 10-character octal number.
+ * If number is negative, it cannot be less than FFE0000000, and
+ * if number is positive, it cannot be greater than 1FFFFFFF.
+ * If number is not a valid hexadecimal number, HEX2OCT returns
+ * the #NUM! error value.
+ * If HEX2OCT requires more than places characters, it returns
+ * the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, HEX2OCT
+ * uses the minimum number of characters necessary. Places is
+ * useful for padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, HEX2OCT returns the #VALUE! error
+ * value.
+ * If places is negative, HEX2OCT returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function HEXTOOCT($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) {
+ return Functions::NAN();
+ }
+
+ $decimal = self::HEXTODEC($x);
+ if ($decimal < -536870912 || $decimal > 536870911) {
+ return Functions::NAN();
+ }
+
+ return self::DECTOOCT($decimal, $places);
+ }
+
+ /**
+ * OCTTOBIN.
+ *
+ * Return an octal value as binary.
+ *
+ * Excel Function:
+ * OCT2BIN(x[,places])
+ *
+ * @param string $x The octal number you want to convert. Number may not
+ * contain more than 10 characters. The most significant
+ * bit of number is the sign bit. The remaining 29 bits
+ * are magnitude bits. Negative numbers are represented
+ * using two's-complement notation.
+ * If number is negative, OCT2BIN ignores places and returns
+ * a 10-character binary number.
+ * If number is negative, it cannot be less than 7777777000,
+ * and if number is positive, it cannot be greater than 777.
+ * If number is not a valid octal number, OCT2BIN returns
+ * the #NUM! error value.
+ * If OCT2BIN requires more than places characters, it
+ * returns the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted,
+ * OCT2BIN uses the minimum number of characters necessary.
+ * Places is useful for padding the return value with
+ * leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, OCT2BIN returns the #VALUE!
+ * error value.
+ * If places is negative, OCT2BIN returns the #NUM! error
+ * value.
+ *
+ * @return string
+ */
+ public static function OCTTOBIN($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) {
+ return Functions::NAN();
+ }
+
+ return self::DECTOBIN(self::OCTTODEC($x), $places);
+ }
+
+ /**
+ * OCTTODEC.
+ *
+ * Return an octal value as decimal.
+ *
+ * Excel Function:
+ * OCT2DEC(x)
+ *
+ * @param string $x The octal number you want to convert. Number may not contain
+ * more than 10 octal characters (30 bits). The most significant
+ * bit of number is the sign bit. The remaining 29 bits are
+ * magnitude bits. Negative numbers are represented using
+ * two's-complement notation.
+ * If number is not a valid octal number, OCT2DEC returns the
+ * #NUM! error value.
+ *
+ * @return string
+ */
+ public static function OCTTODEC($x)
+ {
+ $x = Functions::flattenSingleValue($x);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) {
+ return Functions::NAN();
+ }
+ $binX = '';
+ foreach (str_split($x) as $char) {
+ $binX .= str_pad(decbin((int) $char), 3, '0', STR_PAD_LEFT);
+ }
+ if (strlen($binX) == 30 && $binX[0] == '1') {
+ for ($i = 0; $i < 30; ++$i) {
+ $binX[$i] = ($binX[$i] == '1' ? '0' : '1');
+ }
+
+ return (bindec($binX) + 1) * -1;
+ }
+
+ return bindec($binX);
+ }
+
+ /**
+ * OCTTOHEX.
+ *
+ * Return an octal value as hex.
+ *
+ * Excel Function:
+ * OCT2HEX(x[,places])
+ *
+ * @param string $x The octal number you want to convert. Number may not contain
+ * more than 10 octal characters (30 bits). The most significant
+ * bit of number is the sign bit. The remaining 29 bits are
+ * magnitude bits. Negative numbers are represented using
+ * two's-complement notation.
+ * If number is negative, OCT2HEX ignores places and returns a
+ * 10-character hexadecimal number.
+ * If number is not a valid octal number, OCT2HEX returns the
+ * #NUM! error value.
+ * If OCT2HEX requires more than places characters, it returns
+ * the #NUM! error value.
+ * @param int $places The number of characters to use. If places is omitted, OCT2HEX
+ * uses the minimum number of characters necessary. Places is useful
+ * for padding the return value with leading 0s (zeros).
+ * If places is not an integer, it is truncated.
+ * If places is nonnumeric, OCT2HEX returns the #VALUE! error value.
+ * If places is negative, OCT2HEX returns the #NUM! error value.
+ *
+ * @return string
+ */
+ public static function OCTTOHEX($x, $places = null)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $places = Functions::flattenSingleValue($places);
+
+ if (is_bool($x)) {
+ return Functions::VALUE();
+ }
+ $x = (string) $x;
+ if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) {
+ return Functions::NAN();
+ }
+ $hexVal = strtoupper(dechex(self::OCTTODEC($x)));
+
+ return self::nbrConversionFormat($hexVal, $places);
+ }
+
+ /**
+ * COMPLEX.
+ *
+ * Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj.
+ *
+ * Excel Function:
+ * COMPLEX(realNumber,imaginary[,suffix])
+ *
+ * @param float $realNumber the real coefficient of the complex number
+ * @param float $imaginary the imaginary coefficient of the complex number
+ * @param string $suffix The suffix for the imaginary component of the complex number.
+ * If omitted, the suffix is assumed to be "i".
+ *
+ * @return string
+ */
+ public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i')
+ {
+ $realNumber = ($realNumber === null) ? 0.0 : Functions::flattenSingleValue($realNumber);
+ $imaginary = ($imaginary === null) ? 0.0 : Functions::flattenSingleValue($imaginary);
+ $suffix = ($suffix === null) ? 'i' : Functions::flattenSingleValue($suffix);
+
+ if (
+ ((is_numeric($realNumber)) && (is_numeric($imaginary))) &&
+ (($suffix == 'i') || ($suffix == 'j') || ($suffix == ''))
+ ) {
+ $complex = new Complex($realNumber, $imaginary, $suffix);
+
+ return (string) $complex;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * IMAGINARY.
+ *
+ * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMAGINARY(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the imaginary
+ * coefficient
+ *
+ * @return float
+ */
+ public static function IMAGINARY($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (new Complex($complexNumber))->getImaginary();
+ }
+
+ /**
+ * IMREAL.
+ *
+ * Returns the real coefficient of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMREAL(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the real coefficient
+ *
+ * @return float
+ */
+ public static function IMREAL($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (new Complex($complexNumber))->getReal();
+ }
+
+ /**
+ * IMABS.
+ *
+ * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMABS(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the absolute value
+ *
+ * @return float
+ */
+ public static function IMABS($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (new Complex($complexNumber))->abs();
+ }
+
+ /**
+ * IMARGUMENT.
+ *
+ * Returns the argument theta of a complex number, i.e. the angle in radians from the real
+ * axis to the representation of the number in polar coordinates.
+ *
+ * Excel Function:
+ * IMARGUMENT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the argument theta
+ *
+ * @return float|string
+ */
+ public static function IMARGUMENT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ $complex = new Complex($complexNumber);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::DIV0();
+ }
+
+ return $complex->argument();
+ }
+
+ /**
+ * IMCONJUGATE.
+ *
+ * Returns the complex conjugate of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCONJUGATE(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the conjugate
+ *
+ * @return string
+ */
+ public static function IMCONJUGATE($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->conjugate();
+ }
+
+ /**
+ * IMCOS.
+ *
+ * Returns the cosine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOS(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cosine
+ *
+ * @return float|string
+ */
+ public static function IMCOS($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->cos();
+ }
+
+ /**
+ * IMCOSH.
+ *
+ * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOSH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic cosine
+ *
+ * @return float|string
+ */
+ public static function IMCOSH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->cosh();
+ }
+
+ /**
+ * IMCOT.
+ *
+ * Returns the cotangent of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cotangent
+ *
+ * @return float|string
+ */
+ public static function IMCOT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->cot();
+ }
+
+ /**
+ * IMCSC.
+ *
+ * Returns the cosecant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCSC(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cosecant
+ *
+ * @return float|string
+ */
+ public static function IMCSC($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->csc();
+ }
+
+ /**
+ * IMCSCH.
+ *
+ * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCSCH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic cosecant
+ *
+ * @return float|string
+ */
+ public static function IMCSCH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->csch();
+ }
+
+ /**
+ * IMSIN.
+ *
+ * Returns the sine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSIN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the sine
+ *
+ * @return float|string
+ */
+ public static function IMSIN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->sin();
+ }
+
+ /**
+ * IMSINH.
+ *
+ * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSINH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic sine
+ *
+ * @return float|string
+ */
+ public static function IMSINH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->sinh();
+ }
+
+ /**
+ * IMSEC.
+ *
+ * Returns the secant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSEC(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the secant
+ *
+ * @return float|string
+ */
+ public static function IMSEC($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->sec();
+ }
+
+ /**
+ * IMSECH.
+ *
+ * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSECH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic secant
+ *
+ * @return float|string
+ */
+ public static function IMSECH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->sech();
+ }
+
+ /**
+ * IMTAN.
+ *
+ * Returns the tangent of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMTAN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the tangent
+ *
+ * @return float|string
+ */
+ public static function IMTAN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->tan();
+ }
+
+ /**
+ * IMSQRT.
+ *
+ * Returns the square root of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSQRT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the square root
+ *
+ * @return string
+ */
+ public static function IMSQRT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ $theta = self::IMARGUMENT($complexNumber);
+ if ($theta === Functions::DIV0()) {
+ return '0';
+ }
+
+ return (string) (new Complex($complexNumber))->sqrt();
+ }
+
+ /**
+ * IMLN.
+ *
+ * Returns the natural logarithm of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the natural logarithm
+ *
+ * @return string
+ */
+ public static function IMLN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ $complex = new Complex($complexNumber);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) (new Complex($complexNumber))->ln();
+ }
+
+ /**
+ * IMLOG10.
+ *
+ * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLOG10(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the common logarithm
+ *
+ * @return string
+ */
+ public static function IMLOG10($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ $complex = new Complex($complexNumber);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) (new Complex($complexNumber))->log10();
+ }
+
+ /**
+ * IMLOG2.
+ *
+ * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLOG2(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the base-2 logarithm
+ *
+ * @return string
+ */
+ public static function IMLOG2($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ $complex = new Complex($complexNumber);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) (new Complex($complexNumber))->log2();
+ }
+
+ /**
+ * IMEXP.
+ *
+ * Returns the exponential of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMEXP(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the exponential
+ *
+ * @return string
+ */
+ public static function IMEXP($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ return (string) (new Complex($complexNumber))->exp();
+ }
+
+ /**
+ * IMPOWER.
+ *
+ * Returns a complex number in x + yi or x + yj text format raised to a power.
+ *
+ * Excel Function:
+ * IMPOWER(complexNumber,realNumber)
+ *
+ * @param string $complexNumber the complex number you want to raise to a power
+ * @param float $realNumber the power to which you want to raise the complex number
+ *
+ * @return string
+ */
+ public static function IMPOWER($complexNumber, $realNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+ $realNumber = Functions::flattenSingleValue($realNumber);
+
+ if (!is_numeric($realNumber)) {
+ return Functions::VALUE();
+ }
+
+ return (string) (new Complex($complexNumber))->pow($realNumber);
+ }
+
+ /**
+ * IMDIV.
+ *
+ * Returns the quotient of two complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMDIV(complexDividend,complexDivisor)
+ *
+ * @param string $complexDividend the complex numerator or dividend
+ * @param string $complexDivisor the complex denominator or divisor
+ *
+ * @return string
+ */
+ public static function IMDIV($complexDividend, $complexDivisor)
+ {
+ $complexDividend = Functions::flattenSingleValue($complexDividend);
+ $complexDivisor = Functions::flattenSingleValue($complexDivisor);
+
+ try {
+ return (string) (new Complex($complexDividend))->divideby(new Complex($complexDivisor));
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+ }
+
+ /**
+ * IMSUB.
+ *
+ * Returns the difference of two complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSUB(complexNumber1,complexNumber2)
+ *
+ * @param string $complexNumber1 the complex number from which to subtract complexNumber2
+ * @param string $complexNumber2 the complex number to subtract from complexNumber1
+ *
+ * @return string
+ */
+ public static function IMSUB($complexNumber1, $complexNumber2)
+ {
+ $complexNumber1 = Functions::flattenSingleValue($complexNumber1);
+ $complexNumber2 = Functions::flattenSingleValue($complexNumber2);
+
+ try {
+ return (string) (new Complex($complexNumber1))->subtract(new Complex($complexNumber2));
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+ }
+
+ /**
+ * IMSUM.
+ *
+ * Returns the sum of two or more complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSUM(complexNumber[,complexNumber[,...]])
+ *
+ * @param string ...$complexNumbers Series of complex numbers to add
+ *
+ * @return string
+ */
+ public static function IMSUM(...$complexNumbers)
+ {
+ // Return value
+ $returnValue = new Complex(0.0);
+ $aArgs = Functions::flattenArray($complexNumbers);
+
+ try {
+ // Loop through the arguments
+ foreach ($aArgs as $complex) {
+ $returnValue = $returnValue->add(new Complex($complex));
+ }
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $returnValue;
+ }
+
+ /**
+ * IMPRODUCT.
+ *
+ * Returns the product of two or more complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMPRODUCT(complexNumber[,complexNumber[,...]])
+ *
+ * @param string ...$complexNumbers Series of complex numbers to multiply
+ *
+ * @return string
+ */
+ public static function IMPRODUCT(...$complexNumbers)
+ {
+ // Return value
+ $returnValue = new Complex(1.0);
+ $aArgs = Functions::flattenArray($complexNumbers);
+
+ try {
+ // Loop through the arguments
+ foreach ($aArgs as $complex) {
+ $returnValue = $returnValue->multiply(new Complex($complex));
+ }
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $returnValue;
+ }
+
+ /**
+ * DELTA.
+ *
+ * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise.
+ * Use this function to filter a set of values. For example, by summing several DELTA
+ * functions you calculate the count of equal pairs. This function is also known as the
+ * Kronecker Delta function.
+ *
+ * Excel Function:
+ * DELTA(a[,b])
+ *
+ * @param float $a the first number
+ * @param float $b The second number. If omitted, b is assumed to be zero.
+ *
+ * @return int
+ */
+ public static function DELTA($a, $b = 0)
+ {
+ $a = Functions::flattenSingleValue($a);
+ $b = Functions::flattenSingleValue($b);
+
+ return (int) ($a == $b);
+ }
+
+ /**
+ * GESTEP.
+ *
+ * Excel Function:
+ * GESTEP(number[,step])
+ *
+ * Returns 1 if number >= step; returns 0 (zero) otherwise
+ * Use this function to filter a set of values. For example, by summing several GESTEP
+ * functions you calculate the count of values that exceed a threshold.
+ *
+ * @param float $number the value to test against step
+ * @param float $step The threshold value.
+ * If you omit a value for step, GESTEP uses zero.
+ *
+ * @return int
+ */
+ public static function GESTEP($number, $step = 0)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $step = Functions::flattenSingleValue($step);
+
+ return (int) ($number >= $step);
+ }
+
+ //
+ // Private method to calculate the erf value
+ //
+ private static $twoSqrtPi = 1.128379167095512574;
+
+ public static function erfVal($x)
+ {
+ if (abs($x) > 2.2) {
+ return 1 - self::erfcVal($x);
+ }
+ $sum = $term = $x;
+ $xsqr = ($x * $x);
+ $j = 1;
+ do {
+ $term *= $xsqr / $j;
+ $sum -= $term / (2 * $j + 1);
+ ++$j;
+ $term *= $xsqr / $j;
+ $sum += $term / (2 * $j + 1);
+ ++$j;
+ if ($sum == 0.0) {
+ break;
+ }
+ } while (abs($term / $sum) > Functions::PRECISION);
+
+ return self::$twoSqrtPi * $sum;
+ }
+
+ /**
+ * Validate arguments passed to the bitwise functions.
+ *
+ * @param mixed $value
+ *
+ * @return int
+ */
+ private static function validateBitwiseArgument($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (is_int($value)) {
+ return $value;
+ } elseif (is_numeric($value)) {
+ if ($value == (int) ($value)) {
+ $value = (int) ($value);
+ if (($value > 2 ** 48 - 1) || ($value < 0)) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $value;
+ }
+
+ throw new Exception(Functions::NAN());
+ }
+
+ throw new Exception(Functions::VALUE());
+ }
+
+ /**
+ * BITAND.
+ *
+ * Returns the bitwise AND of two integer values.
+ *
+ * Excel Function:
+ * BITAND(number1, number2)
+ *
+ * @param int $number1
+ * @param int $number2
+ *
+ * @return int|string
+ */
+ public static function BITAND($number1, $number2)
+ {
+ try {
+ $number1 = self::validateBitwiseArgument($number1);
+ $number2 = self::validateBitwiseArgument($number2);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $number1 & $number2;
+ }
+
+ /**
+ * BITOR.
+ *
+ * Returns the bitwise OR of two integer values.
+ *
+ * Excel Function:
+ * BITOR(number1, number2)
+ *
+ * @param int $number1
+ * @param int $number2
+ *
+ * @return int|string
+ */
+ public static function BITOR($number1, $number2)
+ {
+ try {
+ $number1 = self::validateBitwiseArgument($number1);
+ $number2 = self::validateBitwiseArgument($number2);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $number1 | $number2;
+ }
+
+ /**
+ * BITXOR.
+ *
+ * Returns the bitwise XOR of two integer values.
+ *
+ * Excel Function:
+ * BITXOR(number1, number2)
+ *
+ * @param int $number1
+ * @param int $number2
+ *
+ * @return int|string
+ */
+ public static function BITXOR($number1, $number2)
+ {
+ try {
+ $number1 = self::validateBitwiseArgument($number1);
+ $number2 = self::validateBitwiseArgument($number2);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $number1 ^ $number2;
+ }
+
+ /**
+ * BITLSHIFT.
+ *
+ * Returns the number value shifted left by shift_amount bits.
+ *
+ * Excel Function:
+ * BITLSHIFT(number, shift_amount)
+ *
+ * @param int $number
+ * @param int $shiftAmount
+ *
+ * @return int|string
+ */
+ public static function BITLSHIFT($number, $shiftAmount)
+ {
+ try {
+ $number = self::validateBitwiseArgument($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $shiftAmount = Functions::flattenSingleValue($shiftAmount);
+
+ $result = $number << $shiftAmount;
+ if ($result > 2 ** 48 - 1) {
+ return Functions::NAN();
+ }
+
+ return $result;
+ }
+
+ /**
+ * BITRSHIFT.
+ *
+ * Returns the number value shifted right by shift_amount bits.
+ *
+ * Excel Function:
+ * BITRSHIFT(number, shift_amount)
+ *
+ * @param int $number
+ * @param int $shiftAmount
+ *
+ * @return int|string
+ */
+ public static function BITRSHIFT($number, $shiftAmount)
+ {
+ try {
+ $number = self::validateBitwiseArgument($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $shiftAmount = Functions::flattenSingleValue($shiftAmount);
+
+ return $number >> $shiftAmount;
+ }
+
+ /**
+ * ERF.
+ *
+ * Returns the error function integrated between the lower and upper bound arguments.
+ *
+ * Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments,
+ * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was
+ * improved, so that it can now calculate the function for both positive and negative ranges.
+ * PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments.
+ *
+ * Excel Function:
+ * ERF(lower[,upper])
+ *
+ * @param float $lower lower bound for integrating ERF
+ * @param float $upper upper bound for integrating ERF.
+ * If omitted, ERF integrates between zero and lower_limit
+ *
+ * @return float|string
+ */
+ public static function ERF($lower, $upper = null)
+ {
+ $lower = Functions::flattenSingleValue($lower);
+ $upper = Functions::flattenSingleValue($upper);
+
+ if (is_numeric($lower)) {
+ if ($upper === null) {
+ return self::erfVal($lower);
+ }
+ if (is_numeric($upper)) {
+ return self::erfVal($upper) - self::erfVal($lower);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * ERFPRECISE.
+ *
+ * Returns the error function integrated between the lower and upper bound arguments.
+ *
+ * Excel Function:
+ * ERF.PRECISE(limit)
+ *
+ * @param float $limit bound for integrating ERF
+ *
+ * @return float|string
+ */
+ public static function ERFPRECISE($limit)
+ {
+ $limit = Functions::flattenSingleValue($limit);
+
+ return self::ERF($limit);
+ }
+
+ //
+ // Private method to calculate the erfc value
+ //
+ private static $oneSqrtPi = 0.564189583547756287;
+
+ private static function erfcVal($x)
+ {
+ if (abs($x) < 2.2) {
+ return 1 - self::erfVal($x);
+ }
+ if ($x < 0) {
+ return 2 - self::ERFC(-$x);
+ }
+ $a = $n = 1;
+ $b = $c = $x;
+ $d = ($x * $x) + 0.5;
+ $q1 = $q2 = $b / $d;
+ $t = 0;
+ do {
+ $t = $a * $n + $b * $x;
+ $a = $b;
+ $b = $t;
+ $t = $c * $n + $d * $x;
+ $c = $d;
+ $d = $t;
+ $n += 0.5;
+ $q1 = $q2;
+ $q2 = $b / $d;
+ } while ((abs($q1 - $q2) / $q2) > Functions::PRECISION);
+
+ return self::$oneSqrtPi * exp(-$x * $x) * $q2;
+ }
+
+ /**
+ * ERFC.
+ *
+ * Returns the complementary ERF function integrated between x and infinity
+ *
+ * Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument,
+ * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was
+ * improved, so that it can now calculate the function for both positive and negative x values.
+ * PhpSpreadsheet follows Excel 2010 behaviour, and accepts nagative arguments.
+ *
+ * Excel Function:
+ * ERFC(x)
+ *
+ * @param float $x The lower bound for integrating ERFC
+ *
+ * @return float|string
+ */
+ public static function ERFC($x)
+ {
+ $x = Functions::flattenSingleValue($x);
+
+ if (is_numeric($x)) {
+ return self::erfcVal($x);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * getConversionGroups
+ * Returns a list of the different conversion groups for UOM conversions.
+ *
+ * @return array
+ */
+ public static function getConversionGroups()
+ {
+ $conversionGroups = [];
+ foreach (self::$conversionUnits as $conversionUnit) {
+ $conversionGroups[] = $conversionUnit['Group'];
+ }
+
+ return array_merge(array_unique($conversionGroups));
+ }
+
+ /**
+ * getConversionGroupUnits
+ * Returns an array of units of measure, for a specified conversion group, or for all groups.
+ *
+ * @param string $group The group whose units of measure you want to retrieve
+ *
+ * @return array
+ */
+ public static function getConversionGroupUnits($group = null)
+ {
+ $conversionGroups = [];
+ foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) {
+ if (($group === null) || ($conversionGroup['Group'] == $group)) {
+ $conversionGroups[$conversionGroup['Group']][] = $conversionUnit;
+ }
+ }
+
+ return $conversionGroups;
+ }
+
+ /**
+ * getConversionGroupUnitDetails.
+ *
+ * @param string $group The group whose units of measure you want to retrieve
+ *
+ * @return array
+ */
+ public static function getConversionGroupUnitDetails($group = null)
+ {
+ $conversionGroups = [];
+ foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) {
+ if (($group === null) || ($conversionGroup['Group'] == $group)) {
+ $conversionGroups[$conversionGroup['Group']][] = [
+ 'unit' => $conversionUnit,
+ 'description' => $conversionGroup['Unit Name'],
+ ];
+ }
+ }
+
+ return $conversionGroups;
+ }
+
+ /**
+ * getConversionMultipliers
+ * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().
+ *
+ * @return array of mixed
+ */
+ public static function getConversionMultipliers()
+ {
+ return self::$conversionMultipliers;
+ }
+
+ /**
+ * CONVERTUOM.
+ *
+ * Converts a number from one measurement system to another.
+ * For example, CONVERT can translate a table of distances in miles to a table of distances
+ * in kilometers.
+ *
+ * Excel Function:
+ * CONVERT(value,fromUOM,toUOM)
+ *
+ * @param float $value the value in fromUOM to convert
+ * @param string $fromUOM the units for value
+ * @param string $toUOM the units for the result
+ *
+ * @return float|string
+ */
+ public static function CONVERTUOM($value, $fromUOM, $toUOM)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $fromUOM = Functions::flattenSingleValue($fromUOM);
+ $toUOM = Functions::flattenSingleValue($toUOM);
+
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ }
+ $fromMultiplier = 1.0;
+ if (isset(self::$conversionUnits[$fromUOM])) {
+ $unitGroup1 = self::$conversionUnits[$fromUOM]['Group'];
+ } else {
+ $fromMultiplier = substr($fromUOM, 0, 1);
+ $fromUOM = substr($fromUOM, 1);
+ if (isset(self::$conversionMultipliers[$fromMultiplier])) {
+ $fromMultiplier = self::$conversionMultipliers[$fromMultiplier]['multiplier'];
+ } else {
+ return Functions::NA();
+ }
+ if ((isset(self::$conversionUnits[$fromUOM])) && (self::$conversionUnits[$fromUOM]['AllowPrefix'])) {
+ $unitGroup1 = self::$conversionUnits[$fromUOM]['Group'];
+ } else {
+ return Functions::NA();
+ }
+ }
+ $value *= $fromMultiplier;
+
+ $toMultiplier = 1.0;
+ if (isset(self::$conversionUnits[$toUOM])) {
+ $unitGroup2 = self::$conversionUnits[$toUOM]['Group'];
+ } else {
+ $toMultiplier = substr($toUOM, 0, 1);
+ $toUOM = substr($toUOM, 1);
+ if (isset(self::$conversionMultipliers[$toMultiplier])) {
+ $toMultiplier = self::$conversionMultipliers[$toMultiplier]['multiplier'];
+ } else {
+ return Functions::NA();
+ }
+ if ((isset(self::$conversionUnits[$toUOM])) && (self::$conversionUnits[$toUOM]['AllowPrefix'])) {
+ $unitGroup2 = self::$conversionUnits[$toUOM]['Group'];
+ } else {
+ return Functions::NA();
+ }
+ }
+ if ($unitGroup1 != $unitGroup2) {
+ return Functions::NA();
+ }
+
+ if (($fromUOM == $toUOM) && ($fromMultiplier == $toMultiplier)) {
+ // We've already factored $fromMultiplier into the value, so we need
+ // to reverse it again
+ return $value / $fromMultiplier;
+ } elseif ($unitGroup1 == 'Temperature') {
+ if (($fromUOM == 'F') || ($fromUOM == 'fah')) {
+ if (($toUOM == 'F') || ($toUOM == 'fah')) {
+ return $value;
+ }
+ $value = (($value - 32) / 1.8);
+ if (($toUOM == 'K') || ($toUOM == 'kel')) {
+ $value += 273.15;
+ }
+
+ return $value;
+ } elseif (
+ (($fromUOM == 'K') || ($fromUOM == 'kel')) &&
+ (($toUOM == 'K') || ($toUOM == 'kel'))
+ ) {
+ return $value;
+ } elseif (
+ (($fromUOM == 'C') || ($fromUOM == 'cel')) &&
+ (($toUOM == 'C') || ($toUOM == 'cel'))
+ ) {
+ return $value;
+ }
+ if (($toUOM == 'F') || ($toUOM == 'fah')) {
+ if (($fromUOM == 'K') || ($fromUOM == 'kel')) {
+ $value -= 273.15;
+ }
+
+ return ($value * 1.8) + 32;
+ }
+ if (($toUOM == 'C') || ($toUOM == 'cel')) {
+ return $value - 273.15;
+ }
+
+ return $value + 273.15;
+ }
+
+ return ($value * self::$unitConversions[$unitGroup1][$fromUOM][$toUOM]) / $toMultiplier;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php
new file mode 100644
index 0000000..4a015a5
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
+
+class Exception extends PhpSpreadsheetException
+{
+ /**
+ * Error handler callback.
+ *
+ * @param mixed $code
+ * @param mixed $string
+ * @param mixed $file
+ * @param mixed $line
+ * @param mixed $context
+ */
+ public static function errorHandlerCallback($code, $string, $file, $line, $context): void
+ {
+ $e = new self($string, $code);
+ $e->line = $line;
+ $e->file = $file;
+
+ throw $e;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php
new file mode 100644
index 0000000..a72d7df
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+class ExceptionHandler
+{
+ /**
+ * Register errorhandler.
+ */
+ public function __construct()
+ {
+ set_error_handler([Exception::class, 'errorHandlerCallback'], E_ALL);
+ }
+
+ /**
+ * Unregister errorhandler.
+ */
+ public function __destruct()
+ {
+ restore_error_handler();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php
new file mode 100644
index 0000000..a93d925
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php
@@ -0,0 +1,2475 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Shared\Date;
+
+class Financial
+{
+ const FINANCIAL_MAX_ITERATIONS = 128;
+
+ const FINANCIAL_PRECISION = 1.0e-08;
+
+ /**
+ * isLastDayOfMonth.
+ *
+ * Returns a boolean TRUE/FALSE indicating if this date is the last date of the month
+ *
+ * @param \DateTime $testDate The date for testing
+ *
+ * @return bool
+ */
+ private static function isLastDayOfMonth(\DateTime $testDate)
+ {
+ return $testDate->format('d') == $testDate->format('t');
+ }
+
+ private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next)
+ {
+ $months = 12 / $frequency;
+
+ $result = Date::excelToDateTimeObject($maturity);
+ $eom = self::isLastDayOfMonth($result);
+
+ while ($settlement < Date::PHPToExcel($result)) {
+ $result->modify('-' . $months . ' months');
+ }
+ if ($next) {
+ $result->modify('+' . $months . ' months');
+ }
+
+ if ($eom) {
+ $result->modify('-1 day');
+ }
+
+ return Date::PHPToExcel($result);
+ }
+
+ private static function isValidFrequency($frequency)
+ {
+ if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * daysPerYear.
+ *
+ * Returns the number of days in a specified year, as defined by the "basis" value
+ *
+ * @param int|string $year The year against which we're testing
+ * @param int|string $basis The type of day count:
+ * 0 or omitted US (NASD) 360
+ * 1 Actual (365 or 366 in a leap year)
+ * 2 360
+ * 3 365
+ * 4 European 360
+ *
+ * @return int|string Result, or a string containing an error
+ */
+ private static function daysPerYear($year, $basis = 0)
+ {
+ switch ($basis) {
+ case 0:
+ case 2:
+ case 4:
+ $daysPerYear = 360;
+
+ break;
+ case 3:
+ $daysPerYear = 365;
+
+ break;
+ case 1:
+ $daysPerYear = (DateTime::isLeapYear($year)) ? 366 : 365;
+
+ break;
+ default:
+ return Functions::NAN();
+ }
+
+ return $daysPerYear;
+ }
+
+ private static function interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)
+ {
+ $pmt = self::PMT($rate, $nper, $pv, $fv, $type);
+ $capital = $pv;
+ for ($i = 1; $i <= $per; ++$i) {
+ $interest = ($type && $i == 1) ? 0 : -$capital * $rate;
+ $principal = $pmt - $interest;
+ $capital += $principal;
+ }
+
+ return [$interest, $principal];
+ }
+
+ /**
+ * ACCRINT.
+ *
+ * Returns the accrued interest for a security that pays periodic interest.
+ *
+ * Excel Function:
+ * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis])
+ *
+ * @param mixed $issue the security's issue date
+ * @param mixed $firstinterest the security's first interest date
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date
+ * when the security is traded to the buyer.
+ * @param float $rate the security's annual coupon rate
+ * @param float $par The security's par value.
+ * If you omit par, ACCRINT uses $1,000.
+ * @param int $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0)
+ {
+ $issue = Functions::flattenSingleValue($issue);
+ $firstinterest = Functions::flattenSingleValue($firstinterest);
+ $settlement = Functions::flattenSingleValue($settlement);
+ $rate = Functions::flattenSingleValue($rate);
+ $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par);
+ $frequency = ($frequency === null) ? 1 : Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($rate)) && (is_numeric($par))) {
+ $rate = (float) $rate;
+ $par = (float) $par;
+ if (($rate <= 0) || ($par <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+
+ return $par * $rate * $daysBetweenIssueAndSettlement;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * ACCRINTM.
+ *
+ * Returns the accrued interest for a security that pays interest at maturity.
+ *
+ * Excel Function:
+ * ACCRINTM(issue,settlement,rate[,par[,basis]])
+ *
+ * @param mixed $issue The security's issue date
+ * @param mixed $settlement The security's settlement (or maturity) date
+ * @param float $rate The security's annual coupon rate
+ * @param float $par The security's par value.
+ * If you omit par, ACCRINT uses $1,000.
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0)
+ {
+ $issue = Functions::flattenSingleValue($issue);
+ $settlement = Functions::flattenSingleValue($settlement);
+ $rate = Functions::flattenSingleValue($rate);
+ $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par);
+ $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($rate)) && (is_numeric($par))) {
+ $rate = (float) $rate;
+ $par = (float) $par;
+ if (($rate <= 0) || ($par <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+
+ return $par * $rate * $daysBetweenIssueAndSettlement;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * AMORDEGRC.
+ *
+ * Returns the depreciation for each accounting period.
+ * This function is provided for the French accounting system. If an asset is purchased in
+ * the middle of the accounting period, the prorated depreciation is taken into account.
+ * The function is similar to AMORLINC, except that a depreciation coefficient is applied in
+ * the calculation depending on the life of the assets.
+ * This function will return the depreciation until the last period of the life of the assets
+ * or until the cumulated value of depreciation is greater than the cost of the assets minus
+ * the salvage value.
+ *
+ * Excel Function:
+ * AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])
+ *
+ * @param float $cost The cost of the asset
+ * @param mixed $purchased Date of the purchase of the asset
+ * @param mixed $firstPeriod Date of the end of the first period
+ * @param mixed $salvage The salvage value at the end of the life of the asset
+ * @param float $period The period
+ * @param float $rate Rate of depreciation
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float
+ */
+ public static function AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $purchased = Functions::flattenSingleValue($purchased);
+ $firstPeriod = Functions::flattenSingleValue($firstPeriod);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $period = floor(Functions::flattenSingleValue($period));
+ $rate = Functions::flattenSingleValue($rate);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ // The depreciation coefficients are:
+ // Life of assets (1/rate) Depreciation coefficient
+ // Less than 3 years 1
+ // Between 3 and 4 years 1.5
+ // Between 5 and 6 years 2
+ // More than 6 years 2.5
+ $fUsePer = 1.0 / $rate;
+ if ($fUsePer < 3.0) {
+ $amortiseCoeff = 1.0;
+ } elseif ($fUsePer < 5.0) {
+ $amortiseCoeff = 1.5;
+ } elseif ($fUsePer <= 6.0) {
+ $amortiseCoeff = 2.0;
+ } else {
+ $amortiseCoeff = 2.5;
+ }
+
+ $rate *= $amortiseCoeff;
+ $fNRate = round(DateTime::YEARFRAC($purchased, $firstPeriod, $basis) * $rate * $cost, 0);
+ $cost -= $fNRate;
+ $fRest = $cost - $salvage;
+
+ for ($n = 0; $n < $period; ++$n) {
+ $fNRate = round($rate * $cost, 0);
+ $fRest -= $fNRate;
+
+ if ($fRest < 0.0) {
+ switch ($period - $n) {
+ case 0:
+ case 1:
+ return round($cost * 0.5, 0);
+ default:
+ return 0.0;
+ }
+ }
+ $cost -= $fNRate;
+ }
+
+ return $fNRate;
+ }
+
+ /**
+ * AMORLINC.
+ *
+ * Returns the depreciation for each accounting period.
+ * This function is provided for the French accounting system. If an asset is purchased in
+ * the middle of the accounting period, the prorated depreciation is taken into account.
+ *
+ * Excel Function:
+ * AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])
+ *
+ * @param float $cost The cost of the asset
+ * @param mixed $purchased Date of the purchase of the asset
+ * @param mixed $firstPeriod Date of the end of the first period
+ * @param mixed $salvage The salvage value at the end of the life of the asset
+ * @param float $period The period
+ * @param float $rate Rate of depreciation
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float
+ */
+ public static function AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $purchased = Functions::flattenSingleValue($purchased);
+ $firstPeriod = Functions::flattenSingleValue($firstPeriod);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $period = Functions::flattenSingleValue($period);
+ $rate = Functions::flattenSingleValue($rate);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ $fOneRate = $cost * $rate;
+ $fCostDelta = $cost - $salvage;
+ // Note, quirky variation for leap years on the YEARFRAC for this function
+ $purchasedYear = DateTime::YEAR($purchased);
+ $yearFrac = DateTime::YEARFRAC($purchased, $firstPeriod, $basis);
+
+ if (($basis == 1) && ($yearFrac < 1) && (DateTime::isLeapYear($purchasedYear))) {
+ $yearFrac *= 365 / 366;
+ }
+
+ $f0Rate = $yearFrac * $rate * $cost;
+ $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate);
+
+ if ($period == 0) {
+ return $f0Rate;
+ } elseif ($period <= $nNumOfFullPeriods) {
+ return $fOneRate;
+ } elseif ($period == ($nNumOfFullPeriods + 1)) {
+ return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate;
+ }
+
+ return 0.0;
+ }
+
+ /**
+ * COUPDAYBS.
+ *
+ * Returns the number of days from the beginning of the coupon period to the settlement date.
+ *
+ * Excel Function:
+ * COUPDAYBS(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+ $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
+
+ if ($basis == 1) {
+ return abs(DateTime::DAYS($prev, $settlement));
+ }
+
+ return DateTime::YEARFRAC($prev, $settlement, $basis) * $daysPerYear;
+ }
+
+ /**
+ * COUPDAYS.
+ *
+ * Returns the number of days in the coupon period that contains the settlement date.
+ *
+ * Excel Function:
+ * COUPDAYS(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ switch ($basis) {
+ case 3:
+ // Actual/365
+ return 365 / $frequency;
+ case 1:
+ // Actual/actual
+ if ($frequency == 1) {
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+
+ return $daysPerYear / $frequency;
+ }
+ $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
+ $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
+
+ return $next - $prev;
+ default:
+ // US (NASD) 30/360, Actual/360 or European 30/360
+ return 360 / $frequency;
+ }
+ }
+
+ /**
+ * COUPDAYSNC.
+ *
+ * Returns the number of days from the settlement date to the next coupon date.
+ *
+ * Excel Function:
+ * COUPDAYSNC(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+ $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
+
+ return DateTime::YEARFRAC($settlement, $next, $basis) * $daysPerYear;
+ }
+
+ /**
+ * COUPNCD.
+ *
+ * Returns the next coupon date after the settlement date.
+ *
+ * Excel Function:
+ * COUPNCD(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
+ }
+
+ /**
+ * COUPNUM.
+ *
+ * Returns the number of coupons payable between the settlement date and maturity date,
+ * rounded up to the nearest whole coupon.
+ *
+ * Excel Function:
+ * COUPNUM(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return int|string
+ */
+ public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ $yearsBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, 0);
+
+ return ceil($yearsBetweenSettlementAndMaturity * $frequency);
+ }
+
+ /**
+ * COUPPCD.
+ *
+ * Returns the previous coupon date before the settlement date.
+ *
+ * Excel Function:
+ * COUPPCD(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency the number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = (int) Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
+
+ if (is_string($settlement = DateTime::getDateValue($settlement))) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (
+ ($settlement >= $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ return self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
+ }
+
+ /**
+ * CUMIPMT.
+ *
+ * Returns the cumulative interest paid on a loan between the start and end periods.
+ *
+ * Excel Function:
+ * CUMIPMT(rate,nper,pv,start,end[,type])
+ *
+ * @param float $rate The Interest rate
+ * @param int $nper The total number of payment periods
+ * @param float $pv Present Value
+ * @param int $start The first period in the calculation.
+ * Payment periods are numbered beginning with 1.
+ * @param int $end the last period in the calculation
+ * @param int $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ *
+ * @return float|string
+ */
+ public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $nper = (int) Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $start = (int) Functions::flattenSingleValue($start);
+ $end = (int) Functions::flattenSingleValue($end);
+ $type = (int) Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+ if ($start < 1 || $start > $end) {
+ return Functions::VALUE();
+ }
+
+ // Calculate
+ $interest = 0;
+ for ($per = $start; $per <= $end; ++$per) {
+ $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type);
+ }
+
+ return $interest;
+ }
+
+ /**
+ * CUMPRINC.
+ *
+ * Returns the cumulative principal paid on a loan between the start and end periods.
+ *
+ * Excel Function:
+ * CUMPRINC(rate,nper,pv,start,end[,type])
+ *
+ * @param float $rate The Interest rate
+ * @param int $nper The total number of payment periods
+ * @param float $pv Present Value
+ * @param int $start The first period in the calculation.
+ * Payment periods are numbered beginning with 1.
+ * @param int $end the last period in the calculation
+ * @param int $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ *
+ * @return float|string
+ */
+ public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $nper = (int) Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $start = (int) Functions::flattenSingleValue($start);
+ $end = (int) Functions::flattenSingleValue($end);
+ $type = (int) Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+ if ($start < 1 || $start > $end) {
+ return Functions::VALUE();
+ }
+
+ // Calculate
+ $principal = 0;
+ for ($per = $start; $per <= $end; ++$per) {
+ $principal += self::PPMT($rate, $per, $nper, $pv, 0, $type);
+ }
+
+ return $principal;
+ }
+
+ /**
+ * DB.
+ *
+ * Returns the depreciation of an asset for a specified period using the
+ * fixed-declining balance method.
+ * This form of depreciation is used if you want to get a higher depreciation value
+ * at the beginning of the depreciation (as opposed to linear depreciation). The
+ * depreciation value is reduced with every depreciation period by the depreciation
+ * already deducted from the initial cost.
+ *
+ * Excel Function:
+ * DB(cost,salvage,life,period[,month])
+ *
+ * @param float $cost Initial cost of the asset
+ * @param float $salvage Value at the end of the depreciation.
+ * (Sometimes called the salvage value of the asset)
+ * @param int $life Number of periods over which the asset is depreciated.
+ * (Sometimes called the useful life of the asset)
+ * @param int $period The period for which you want to calculate the
+ * depreciation. Period must use the same units as life.
+ * @param int $month Number of months in the first year. If month is omitted,
+ * it defaults to 12.
+ *
+ * @return float|string
+ */
+ public static function DB($cost, $salvage, $life, $period, $month = 12)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+ $period = Functions::flattenSingleValue($period);
+ $month = Functions::flattenSingleValue($month);
+
+ // Validate
+ if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($month))) {
+ $cost = (float) $cost;
+ $salvage = (float) $salvage;
+ $life = (int) $life;
+ $period = (int) $period;
+ $month = (int) $month;
+ if ($cost == 0) {
+ return 0.0;
+ } elseif (($cost < 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($month < 1)) {
+ return Functions::NAN();
+ }
+ // Set Fixed Depreciation Rate
+ $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);
+ $fixedDepreciationRate = round($fixedDepreciationRate, 3);
+
+ // Loop through each period calculating the depreciation
+ $previousDepreciation = 0;
+ $depreciation = 0;
+ for ($per = 1; $per <= $period; ++$per) {
+ if ($per == 1) {
+ $depreciation = $cost * $fixedDepreciationRate * $month / 12;
+ } elseif ($per == ($life + 1)) {
+ $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12;
+ } else {
+ $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate;
+ }
+ $previousDepreciation += $depreciation;
+ }
+
+ return $depreciation;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * DDB.
+ *
+ * Returns the depreciation of an asset for a specified period using the
+ * double-declining balance method or some other method you specify.
+ *
+ * Excel Function:
+ * DDB(cost,salvage,life,period[,factor])
+ *
+ * @param float $cost Initial cost of the asset
+ * @param float $salvage Value at the end of the depreciation.
+ * (Sometimes called the salvage value of the asset)
+ * @param int $life Number of periods over which the asset is depreciated.
+ * (Sometimes called the useful life of the asset)
+ * @param int $period The period for which you want to calculate the
+ * depreciation. Period must use the same units as life.
+ * @param float $factor The rate at which the balance declines.
+ * If factor is omitted, it is assumed to be 2 (the
+ * double-declining balance method).
+ *
+ * @return float|string
+ */
+ public static function DDB($cost, $salvage, $life, $period, $factor = 2.0)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+ $period = Functions::flattenSingleValue($period);
+ $factor = Functions::flattenSingleValue($factor);
+
+ // Validate
+ if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($factor))) {
+ $cost = (float) $cost;
+ $salvage = (float) $salvage;
+ $life = (int) $life;
+ $period = (int) $period;
+ $factor = (float) $factor;
+ if (($cost <= 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($factor <= 0.0) || ($period > $life)) {
+ return Functions::NAN();
+ }
+ // Set Fixed Depreciation Rate
+ $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);
+ $fixedDepreciationRate = round($fixedDepreciationRate, 3);
+
+ // Loop through each period calculating the depreciation
+ $previousDepreciation = 0;
+ $depreciation = 0;
+ for ($per = 1; $per <= $period; ++$per) {
+ $depreciation = min(($cost - $previousDepreciation) * ($factor / $life), ($cost - $salvage - $previousDepreciation));
+ $previousDepreciation += $depreciation;
+ }
+
+ return $depreciation;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * DISC.
+ *
+ * Returns the discount rate for a security.
+ *
+ * Excel Function:
+ * DISC(settlement,maturity,price,redemption[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $price The security's price per $100 face value
+ * @param int $redemption The security's redemption value per $100 face value
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function DISC($settlement, $maturity, $price, $redemption, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $price = Functions::flattenSingleValue($price);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $basis = Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($price)) && (is_numeric($redemption)) && (is_numeric($basis))) {
+ $price = (float) $price;
+ $redemption = (float) $redemption;
+ $basis = (int) $basis;
+ if (($price <= 0) || ($redemption <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * DOLLARDE.
+ *
+ * Converts a dollar price expressed as an integer part and a fraction
+ * part into a dollar price expressed as a decimal number.
+ * Fractional dollar numbers are sometimes used for security prices.
+ *
+ * Excel Function:
+ * DOLLARDE(fractional_dollar,fraction)
+ *
+ * @param float $fractional_dollar Fractional Dollar
+ * @param int $fraction Fraction
+ *
+ * @return float|string
+ */
+ public static function DOLLARDE($fractional_dollar = null, $fraction = 0)
+ {
+ $fractional_dollar = Functions::flattenSingleValue($fractional_dollar);
+ $fraction = (int) Functions::flattenSingleValue($fraction);
+
+ // Validate parameters
+ if ($fractional_dollar === null || $fraction < 0) {
+ return Functions::NAN();
+ }
+ if ($fraction == 0) {
+ return Functions::DIV0();
+ }
+
+ $dollars = floor($fractional_dollar);
+ $cents = fmod($fractional_dollar, 1);
+ $cents /= $fraction;
+ $cents *= 10 ** ceil(log10($fraction));
+
+ return $dollars + $cents;
+ }
+
+ /**
+ * DOLLARFR.
+ *
+ * Converts a dollar price expressed as a decimal number into a dollar price
+ * expressed as a fraction.
+ * Fractional dollar numbers are sometimes used for security prices.
+ *
+ * Excel Function:
+ * DOLLARFR(decimal_dollar,fraction)
+ *
+ * @param float $decimal_dollar Decimal Dollar
+ * @param int $fraction Fraction
+ *
+ * @return float|string
+ */
+ public static function DOLLARFR($decimal_dollar = null, $fraction = 0)
+ {
+ $decimal_dollar = Functions::flattenSingleValue($decimal_dollar);
+ $fraction = (int) Functions::flattenSingleValue($fraction);
+
+ // Validate parameters
+ if ($decimal_dollar === null || $fraction < 0) {
+ return Functions::NAN();
+ }
+ if ($fraction == 0) {
+ return Functions::DIV0();
+ }
+
+ $dollars = floor($decimal_dollar);
+ $cents = fmod($decimal_dollar, 1);
+ $cents *= $fraction;
+ $cents *= 10 ** (-ceil(log10($fraction)));
+
+ return $dollars + $cents;
+ }
+
+ /**
+ * EFFECT.
+ *
+ * Returns the effective interest rate given the nominal rate and the number of
+ * compounding payments per year.
+ *
+ * Excel Function:
+ * EFFECT(nominal_rate,npery)
+ *
+ * @param float $nominal_rate Nominal interest rate
+ * @param int $npery Number of compounding payments per year
+ *
+ * @return float|string
+ */
+ public static function EFFECT($nominal_rate = 0, $npery = 0)
+ {
+ $nominal_rate = Functions::flattenSingleValue($nominal_rate);
+ $npery = (int) Functions::flattenSingleValue($npery);
+
+ // Validate parameters
+ if ($nominal_rate <= 0 || $npery < 1) {
+ return Functions::NAN();
+ }
+
+ return (1 + $nominal_rate / $npery) ** $npery - 1;
+ }
+
+ /**
+ * FV.
+ *
+ * Returns the Future Value of a cash flow with constant payments and interest rate (annuities).
+ *
+ * Excel Function:
+ * FV(rate,nper,pmt[,pv[,type]])
+ *
+ * @param float $rate The interest rate per period
+ * @param int $nper Total number of payment periods in an annuity
+ * @param float $pmt The payment made each period: it cannot change over the
+ * life of the annuity. Typically, pmt contains principal
+ * and interest but no other fees or taxes.
+ * @param float $pv present Value, or the lump-sum amount that a series of
+ * future payments is worth right now
+ * @param int $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ *
+ * @return float|string
+ */
+ public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $nper = Functions::flattenSingleValue($nper);
+ $pmt = Functions::flattenSingleValue($pmt);
+ $pv = Functions::flattenSingleValue($pv);
+ $type = Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ if ($rate !== null && $rate != 0) {
+ return -$pv * (1 + $rate) ** $nper - $pmt * (1 + $rate * $type) * ((1 + $rate) ** $nper - 1) / $rate;
+ }
+
+ return -$pv - $pmt * $nper;
+ }
+
+ /**
+ * FVSCHEDULE.
+ *
+ * Returns the future value of an initial principal after applying a series of compound interest rates.
+ * Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate.
+ *
+ * Excel Function:
+ * FVSCHEDULE(principal,schedule)
+ *
+ * @param float $principal the present value
+ * @param float[] $schedule an array of interest rates to apply
+ *
+ * @return float
+ */
+ public static function FVSCHEDULE($principal, $schedule)
+ {
+ $principal = Functions::flattenSingleValue($principal);
+ $schedule = Functions::flattenArray($schedule);
+
+ foreach ($schedule as $rate) {
+ $principal *= 1 + $rate;
+ }
+
+ return $principal;
+ }
+
+ /**
+ * INTRATE.
+ *
+ * Returns the interest rate for a fully invested security.
+ *
+ * Excel Function:
+ * INTRATE(settlement,maturity,investment,redemption[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $investment the amount invested in the security
+ * @param int $redemption the amount to be received at maturity
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $investment = Functions::flattenSingleValue($investment);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $basis = Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($investment)) && (is_numeric($redemption)) && (is_numeric($basis))) {
+ $investment = (float) $investment;
+ $redemption = (float) $redemption;
+ $basis = (int) $basis;
+ if (($investment <= 0) || ($redemption <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * IPMT.
+ *
+ * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
+ *
+ * Excel Function:
+ * IPMT(rate,per,nper,pv[,fv][,type])
+ *
+ * @param float $rate Interest rate per period
+ * @param int $per Period for which we want to find the interest
+ * @param int $nper Number of periods
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string
+ */
+ public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $per = (int) Functions::flattenSingleValue($per);
+ $nper = (int) Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+ $type = (int) Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+ if ($per <= 0 || $per > $nper) {
+ return Functions::VALUE();
+ }
+
+ // Calculate
+ $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type);
+
+ return $interestAndPrincipal[0];
+ }
+
+ /**
+ * IRR.
+ *
+ * Returns the internal rate of return for a series of cash flows represented by the numbers in values.
+ * These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur
+ * at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received
+ * for an investment consisting of payments (negative values) and income (positive values) that occur at regular
+ * periods.
+ *
+ * Excel Function:
+ * IRR(values[,guess])
+ *
+ * @param float[] $values An array or a reference to cells that contain numbers for which you want
+ * to calculate the internal rate of return.
+ * Values must contain at least one positive value and one negative value to
+ * calculate the internal rate of return.
+ * @param float $guess A number that you guess is close to the result of IRR
+ *
+ * @return float|string
+ */
+ public static function IRR($values, $guess = 0.1)
+ {
+ if (!is_array($values)) {
+ return Functions::VALUE();
+ }
+ $values = Functions::flattenArray($values);
+ $guess = Functions::flattenSingleValue($guess);
+
+ // create an initial range, with a root somewhere between 0 and guess
+ $x1 = 0.0;
+ $x2 = $guess;
+ $f1 = self::NPV($x1, $values);
+ $f2 = self::NPV($x2, $values);
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ if (($f1 * $f2) < 0.0) {
+ break;
+ }
+ if (abs($f1) < abs($f2)) {
+ $f1 = self::NPV($x1 += 1.6 * ($x1 - $x2), $values);
+ } else {
+ $f2 = self::NPV($x2 += 1.6 * ($x2 - $x1), $values);
+ }
+ }
+ if (($f1 * $f2) > 0.0) {
+ return Functions::VALUE();
+ }
+
+ $f = self::NPV($x1, $values);
+ if ($f < 0.0) {
+ $rtb = $x1;
+ $dx = $x2 - $x1;
+ } else {
+ $rtb = $x2;
+ $dx = $x1 - $x2;
+ }
+
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ $dx *= 0.5;
+ $x_mid = $rtb + $dx;
+ $f_mid = self::NPV($x_mid, $values);
+ if ($f_mid <= 0.0) {
+ $rtb = $x_mid;
+ }
+ if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
+ return $x_mid;
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * ISPMT.
+ *
+ * Returns the interest payment for an investment based on an interest rate and a constant payment schedule.
+ *
+ * Excel Function:
+ * =ISPMT(interest_rate, period, number_payments, PV)
+ *
+ * interest_rate is the interest rate for the investment
+ *
+ * period is the period to calculate the interest rate. It must be betweeen 1 and number_payments.
+ *
+ * number_payments is the number of payments for the annuity
+ *
+ * PV is the loan amount or present value of the payments
+ */
+ public static function ISPMT(...$args)
+ {
+ // Return value
+ $returnValue = 0;
+
+ // Get the parameters
+ $aArgs = Functions::flattenArray($args);
+ $interestRate = array_shift($aArgs);
+ $period = array_shift($aArgs);
+ $numberPeriods = array_shift($aArgs);
+ $principleRemaining = array_shift($aArgs);
+
+ // Calculate
+ $principlePayment = ($principleRemaining * 1.0) / ($numberPeriods * 1.0);
+ for ($i = 0; $i <= $period; ++$i) {
+ $returnValue = $interestRate * $principleRemaining * -1;
+ $principleRemaining -= $principlePayment;
+ // principle needs to be 0 after the last payment, don't let floating point screw it up
+ if ($i == $numberPeriods) {
+ $returnValue = 0;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MIRR.
+ *
+ * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both
+ * the cost of the investment and the interest received on reinvestment of cash.
+ *
+ * Excel Function:
+ * MIRR(values,finance_rate, reinvestment_rate)
+ *
+ * @param float[] $values An array or a reference to cells that contain a series of payments and
+ * income occurring at regular intervals.
+ * Payments are negative value, income is positive values.
+ * @param float $finance_rate The interest rate you pay on the money used in the cash flows
+ * @param float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function MIRR($values, $finance_rate, $reinvestment_rate)
+ {
+ if (!is_array($values)) {
+ return Functions::VALUE();
+ }
+ $values = Functions::flattenArray($values);
+ $finance_rate = Functions::flattenSingleValue($finance_rate);
+ $reinvestment_rate = Functions::flattenSingleValue($reinvestment_rate);
+ $n = count($values);
+
+ $rr = 1.0 + $reinvestment_rate;
+ $fr = 1.0 + $finance_rate;
+
+ $npv_pos = $npv_neg = 0.0;
+ foreach ($values as $i => $v) {
+ if ($v >= 0) {
+ $npv_pos += $v / $rr ** $i;
+ } else {
+ $npv_neg += $v / $fr ** $i;
+ }
+ }
+
+ if (($npv_neg == 0) || ($npv_pos == 0) || ($reinvestment_rate <= -1)) {
+ return Functions::VALUE();
+ }
+
+ $mirr = ((-$npv_pos * $rr ** $n)
+ / ($npv_neg * ($rr))) ** (1.0 / ($n - 1)) - 1.0;
+
+ return is_finite($mirr) ? $mirr : Functions::VALUE();
+ }
+
+ /**
+ * NOMINAL.
+ *
+ * Returns the nominal interest rate given the effective rate and the number of compounding payments per year.
+ *
+ * @param float $effect_rate Effective interest rate
+ * @param int $npery Number of compounding payments per year
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function NOMINAL($effect_rate = 0, $npery = 0)
+ {
+ $effect_rate = Functions::flattenSingleValue($effect_rate);
+ $npery = (int) Functions::flattenSingleValue($npery);
+
+ // Validate parameters
+ if ($effect_rate <= 0 || $npery < 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ return $npery * (($effect_rate + 1) ** (1 / $npery) - 1);
+ }
+
+ /**
+ * NPER.
+ *
+ * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.
+ *
+ * @param float $rate Interest rate per period
+ * @param int $pmt Periodic payment (annuity)
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $pmt = Functions::flattenSingleValue($pmt);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+ $type = Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ if ($rate !== null && $rate != 0) {
+ if ($pmt == 0 && $pv == 0) {
+ return Functions::NAN();
+ }
+
+ return log(($pmt * (1 + $rate * $type) / $rate - $fv) / ($pv + $pmt * (1 + $rate * $type) / $rate)) / log(1 + $rate);
+ }
+ if ($pmt == 0) {
+ return Functions::NAN();
+ }
+
+ return (-$pv - $fv) / $pmt;
+ }
+
+ /**
+ * NPV.
+ *
+ * Returns the Net Present Value of a cash flow series given a discount rate.
+ *
+ * @return float
+ */
+ public static function NPV(...$args)
+ {
+ // Return value
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $rate = array_shift($aArgs);
+ $countArgs = count($aArgs);
+ for ($i = 1; $i <= $countArgs; ++$i) {
+ // Is it a numeric value?
+ if (is_numeric($aArgs[$i - 1])) {
+ $returnValue += $aArgs[$i - 1] / (1 + $rate) ** $i;
+ }
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ /**
+ * PDURATION.
+ *
+ * Calculates the number of periods required for an investment to reach a specified value.
+ *
+ * @param float $rate Interest rate per period
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PDURATION($rate = 0, $pv = 0, $fv = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+
+ // Validate parameters
+ if (!is_numeric($rate) || !is_numeric($pv) || !is_numeric($fv)) {
+ return Functions::VALUE();
+ } elseif ($rate <= 0.0 || $pv <= 0.0 || $fv <= 0.0) {
+ return Functions::NAN();
+ }
+
+ return (log($fv) - log($pv)) / log(1 + $rate);
+ }
+
+ /**
+ * PMT.
+ *
+ * Returns the constant payment (annuity) for a cash flow with a constant interest rate.
+ *
+ * @param float $rate Interest rate per period
+ * @param int $nper Number of periods
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $nper = Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+ $type = Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ if ($rate !== null && $rate != 0) {
+ return (-$fv - $pv * (1 + $rate) ** $nper) / (1 + $rate * $type) / (((1 + $rate) ** $nper - 1) / $rate);
+ }
+
+ return (-$pv - $fv) / $nper;
+ }
+
+ /**
+ * PPMT.
+ *
+ * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
+ *
+ * @param float $rate Interest rate per period
+ * @param int $per Period for which we want to find the interest
+ * @param int $nper Number of periods
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $per = (int) Functions::flattenSingleValue($per);
+ $nper = (int) Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+ $type = (int) Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+ if ($per <= 0 || $per > $nper) {
+ return Functions::VALUE();
+ }
+
+ // Calculate
+ $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type);
+
+ return $interestAndPrincipal[1];
+ }
+
+ private static function validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis)
+ {
+ if (is_string($settlement)) {
+ return Functions::VALUE();
+ }
+ if (is_string($maturity)) {
+ return Functions::VALUE();
+ }
+ if (!is_numeric($rate)) {
+ return Functions::VALUE();
+ }
+ if (!is_numeric($yield)) {
+ return Functions::VALUE();
+ }
+ if (!is_numeric($redemption)) {
+ return Functions::VALUE();
+ }
+ if (!is_numeric($frequency)) {
+ return Functions::VALUE();
+ }
+ if (!is_numeric($basis)) {
+ return Functions::VALUE();
+ }
+
+ return '';
+ }
+
+ public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $rate = Functions::flattenSingleValue($rate);
+ $yield = Functions::flattenSingleValue($yield);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = Functions::flattenSingleValue($basis);
+
+ $settlement = DateTime::getDateValue($settlement);
+ $maturity = DateTime::getDateValue($maturity);
+ $rslt = self::validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
+ if ($rslt) {
+ return $rslt;
+ }
+ $rate = (float) $rate;
+ $yield = (float) $yield;
+ $redemption = (float) $redemption;
+ $frequency = (int) $frequency;
+ $basis = (int) $basis;
+
+ if (
+ ($settlement > $maturity) ||
+ (!self::isValidFrequency($frequency)) ||
+ (($basis < 0) || ($basis > 4))
+ ) {
+ return Functions::NAN();
+ }
+
+ $dsc = self::COUPDAYSNC($settlement, $maturity, $frequency, $basis);
+ $e = self::COUPDAYS($settlement, $maturity, $frequency, $basis);
+ $n = self::COUPNUM($settlement, $maturity, $frequency, $basis);
+ $a = self::COUPDAYBS($settlement, $maturity, $frequency, $basis);
+
+ $baseYF = 1.0 + ($yield / $frequency);
+ $rfp = 100 * ($rate / $frequency);
+ $de = $dsc / $e;
+
+ $result = $redemption / $baseYF ** (--$n + $de);
+ for ($k = 0; $k <= $n; ++$k) {
+ $result += $rfp / ($baseYF ** ($k + $de));
+ }
+ $result -= $rfp * ($a / $e);
+
+ return $result;
+ }
+
+ /**
+ * PRICEDISC.
+ *
+ * Returns the price per $100 face value of a discounted security.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $discount The security's discount rate
+ * @param int $redemption The security's redemption value per $100 face value
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $discount = (float) Functions::flattenSingleValue($discount);
+ $redemption = (float) Functions::flattenSingleValue($redemption);
+ $basis = (int) Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($discount)) && (is_numeric($redemption)) && (is_numeric($basis))) {
+ if (($discount <= 0) || ($redemption <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * PRICEMAT.
+ *
+ * Returns the price per $100 face value of a security that pays interest at maturity.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $issue The security's issue date
+ * @param int $rate The security's interest rate at date of issue
+ * @param int $yield The security's annual yield
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $issue = Functions::flattenSingleValue($issue);
+ $rate = Functions::flattenSingleValue($rate);
+ $yield = Functions::flattenSingleValue($yield);
+ $basis = (int) Functions::flattenSingleValue($basis);
+
+ // Validate
+ if (is_numeric($rate) && is_numeric($yield)) {
+ if (($rate <= 0) || ($yield <= 0)) {
+ return Functions::NAN();
+ }
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+ $daysBetweenIssueAndSettlement *= $daysPerYear;
+ $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis);
+ if (!is_numeric($daysBetweenIssueAndMaturity)) {
+ // return date error
+ return $daysBetweenIssueAndMaturity;
+ }
+ $daysBetweenIssueAndMaturity *= $daysPerYear;
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) /
+ (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) -
+ (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * PV.
+ *
+ * Returns the Present Value of a cash flow with constant payments and interest rate (annuities).
+ *
+ * @param float $rate Interest rate per period
+ * @param int $nper Number of periods
+ * @param float $pmt Periodic payment (annuity)
+ * @param float $fv Future Value
+ * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $nper = Functions::flattenSingleValue($nper);
+ $pmt = Functions::flattenSingleValue($pmt);
+ $fv = Functions::flattenSingleValue($fv);
+ $type = Functions::flattenSingleValue($type);
+
+ // Validate parameters
+ if ($type != 0 && $type != 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ if ($rate !== null && $rate != 0) {
+ return (-$pmt * (1 + $rate * $type) * (((1 + $rate) ** $nper - 1) / $rate) - $fv) / (1 + $rate) ** $nper;
+ }
+
+ return -$fv - $pmt * $nper;
+ }
+
+ /**
+ * RATE.
+ *
+ * Returns the interest rate per period of an annuity.
+ * RATE is calculated by iteration and can have zero or more solutions.
+ * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations,
+ * RATE returns the #NUM! error value.
+ *
+ * Excel Function:
+ * RATE(nper,pmt,pv[,fv[,type[,guess]]])
+ *
+ * @param float $nper The total number of payment periods in an annuity
+ * @param float $pmt The payment made each period and cannot change over the life
+ * of the annuity.
+ * Typically, pmt includes principal and interest but no other
+ * fees or taxes.
+ * @param float $pv The present value - the total amount that a series of future
+ * payments is worth now
+ * @param float $fv The future value, or a cash balance you want to attain after
+ * the last payment is made. If fv is omitted, it is assumed
+ * to be 0 (the future value of a loan, for example, is 0).
+ * @param int $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ * @param float $guess Your guess for what the rate will be.
+ * If you omit guess, it is assumed to be 10 percent.
+ *
+ * @return float|string
+ */
+ public static function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1)
+ {
+ $nper = (int) Functions::flattenSingleValue($nper);
+ $pmt = Functions::flattenSingleValue($pmt);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = ($fv === null) ? 0.0 : Functions::flattenSingleValue($fv);
+ $type = ($type === null) ? 0 : (int) Functions::flattenSingleValue($type);
+ $guess = ($guess === null) ? 0.1 : Functions::flattenSingleValue($guess);
+
+ $rate = $guess;
+ // rest of code adapted from python/numpy
+ $close = false;
+ $iter = 0;
+ while (!$close && $iter < self::FINANCIAL_MAX_ITERATIONS) {
+ $nextdiff = self::rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type);
+ if (!is_numeric($nextdiff)) {
+ break;
+ }
+ $rate1 = $rate - $nextdiff;
+ $close = abs($rate1 - $rate) < self::FINANCIAL_PRECISION;
+ ++$iter;
+ $rate = $rate1;
+ }
+
+ return $close ? $rate : Functions::NAN();
+ }
+
+ private static function rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type)
+ {
+ if ($rate == 0) {
+ return Functions::NAN();
+ }
+ $tt1 = ($rate + 1) ** $nper;
+ $tt2 = ($rate + 1) ** ($nper - 1);
+ $numerator = $fv + $tt1 * $pv + $pmt * ($tt1 - 1) * ($rate * $type + 1) / $rate;
+ $denominator = $nper * $tt2 * $pv - $pmt * ($tt1 - 1) * ($rate * $type + 1) / ($rate * $rate)
+ + $nper * $pmt * $tt2 * ($rate * $type + 1) / $rate
+ + $pmt * ($tt1 - 1) * $type / $rate;
+ if ($denominator == 0) {
+ return Functions::NAN();
+ }
+
+ return $numerator / $denominator;
+ }
+
+ /**
+ * RECEIVED.
+ *
+ * Returns the price per $100 face value of a discounted security.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $investment The amount invested in the security
+ * @param int $discount The security's discount rate
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $investment = (float) Functions::flattenSingleValue($investment);
+ $discount = (float) Functions::flattenSingleValue($discount);
+ $basis = (int) Functions::flattenSingleValue($basis);
+
+ // Validate
+ if ((is_numeric($investment)) && (is_numeric($discount)) && (is_numeric($basis))) {
+ if (($investment <= 0) || ($discount <= 0)) {
+ return Functions::NAN();
+ }
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * RRI.
+ *
+ * Calculates the interest rate required for an investment to grow to a specified future value .
+ *
+ * @param float $nper The number of periods over which the investment is made
+ * @param float $pv Present Value
+ * @param float $fv Future Value
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function RRI($nper = 0, $pv = 0, $fv = 0)
+ {
+ $nper = Functions::flattenSingleValue($nper);
+ $pv = Functions::flattenSingleValue($pv);
+ $fv = Functions::flattenSingleValue($fv);
+
+ // Validate parameters
+ if (!is_numeric($nper) || !is_numeric($pv) || !is_numeric($fv)) {
+ return Functions::VALUE();
+ } elseif ($nper <= 0.0 || $pv <= 0.0 || $fv < 0.0) {
+ return Functions::NAN();
+ }
+
+ return ($fv / $pv) ** (1 / $nper) - 1;
+ }
+
+ /**
+ * SLN.
+ *
+ * Returns the straight-line depreciation of an asset for one period
+ *
+ * @param mixed $cost Initial cost of the asset
+ * @param mixed $salvage Value at the end of the depreciation
+ * @param mixed $life Number of periods over which the asset is depreciated
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function SLN($cost, $salvage, $life)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+
+ // Calculate
+ if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) {
+ if ($life < 0) {
+ return Functions::NAN();
+ }
+
+ return ($cost - $salvage) / $life;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SYD.
+ *
+ * Returns the sum-of-years' digits depreciation of an asset for a specified period.
+ *
+ * @param mixed $cost Initial cost of the asset
+ * @param mixed $salvage Value at the end of the depreciation
+ * @param mixed $life Number of periods over which the asset is depreciated
+ * @param mixed $period Period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function SYD($cost, $salvage, $life, $period)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+ $period = Functions::flattenSingleValue($period);
+
+ // Calculate
+ if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period))) {
+ if (($life < 1) || ($period > $life)) {
+ return Functions::NAN();
+ }
+
+ return (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * TBILLEQ.
+ *
+ * Returns the bond-equivalent yield for a Treasury bill.
+ *
+ * @param mixed $settlement The Treasury bill's settlement date.
+ * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * @param mixed $maturity The Treasury bill's maturity date.
+ * The maturity date is the date when the Treasury bill expires.
+ * @param int $discount The Treasury bill's discount rate
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function TBILLEQ($settlement, $maturity, $discount)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $discount = Functions::flattenSingleValue($discount);
+
+ // Use TBILLPRICE for validation
+ $testValue = self::TBILLPRICE($settlement, $maturity, $discount);
+ if (is_string($testValue)) {
+ return $testValue;
+ }
+
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ ++$maturity;
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
+ } else {
+ $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
+ }
+
+ return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity);
+ }
+
+ /**
+ * TBILLPRICE.
+ *
+ * Returns the yield for a Treasury bill.
+ *
+ * @param mixed $settlement The Treasury bill's settlement date.
+ * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * @param mixed $maturity The Treasury bill's maturity date.
+ * The maturity date is the date when the Treasury bill expires.
+ * @param int $discount The Treasury bill's discount rate
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function TBILLPRICE($settlement, $maturity, $discount)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $discount = Functions::flattenSingleValue($discount);
+
+ if (is_string($maturity = DateTime::getDateValue($maturity))) {
+ return Functions::VALUE();
+ }
+
+ // Validate
+ if (is_numeric($discount)) {
+ if ($discount <= 0) {
+ return Functions::NAN();
+ }
+
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ ++$maturity;
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ } else {
+ $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
+ }
+
+ if ($daysBetweenSettlementAndMaturity > 360) {
+ return Functions::NAN();
+ }
+
+ $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360));
+ if ($price <= 0) {
+ return Functions::NAN();
+ }
+
+ return $price;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * TBILLYIELD.
+ *
+ * Returns the yield for a Treasury bill.
+ *
+ * @param mixed $settlement The Treasury bill's settlement date.
+ * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * @param mixed $maturity The Treasury bill's maturity date.
+ * The maturity date is the date when the Treasury bill expires.
+ * @param int $price The Treasury bill's price per $100 face value
+ *
+ * @return float|mixed|string
+ */
+ public static function TBILLYIELD($settlement, $maturity, $price)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $price = Functions::flattenSingleValue($price);
+
+ // Validate
+ if (is_numeric($price)) {
+ if ($price <= 0) {
+ return Functions::NAN();
+ }
+
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ ++$maturity;
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ } else {
+ $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
+ }
+
+ if ($daysBetweenSettlementAndMaturity > 360) {
+ return Functions::NAN();
+ }
+
+ return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity);
+ }
+
+ return Functions::VALUE();
+ }
+
+ private static function bothNegAndPos($neg, $pos)
+ {
+ return $neg && $pos;
+ }
+
+ private static function xirrPart2(&$values)
+ {
+ $valCount = count($values);
+ $foundpos = false;
+ $foundneg = false;
+ for ($i = 0; $i < $valCount; ++$i) {
+ $fld = $values[$i];
+ if (!is_numeric($fld)) {
+ return Functions::VALUE();
+ } elseif ($fld > 0) {
+ $foundpos = true;
+ } elseif ($fld < 0) {
+ $foundneg = true;
+ }
+ }
+ if (!self::bothNegAndPos($foundneg, $foundpos)) {
+ return Functions::NAN();
+ }
+
+ return '';
+ }
+
+ private static function xirrPart1(&$values, &$dates)
+ {
+ if ((!is_array($values)) && (!is_array($dates))) {
+ return Functions::NA();
+ }
+ $values = Functions::flattenArray($values);
+ $dates = Functions::flattenArray($dates);
+ if (count($values) != count($dates)) {
+ return Functions::NAN();
+ }
+
+ $datesCount = count($dates);
+ for ($i = 0; $i < $datesCount; ++$i) {
+ $dates[$i] = DateTime::getDateValue($dates[$i]);
+ if (!is_numeric($dates[$i])) {
+ return Functions::VALUE();
+ }
+ }
+
+ return self::xirrPart2($values);
+ }
+
+ private static function xirrPart3($values, $dates, $x1, $x2)
+ {
+ $f = self::xnpvOrdered($x1, $values, $dates, false);
+ if ($f < 0.0) {
+ $rtb = $x1;
+ $dx = $x2 - $x1;
+ } else {
+ $rtb = $x2;
+ $dx = $x1 - $x2;
+ }
+
+ $rslt = Functions::VALUE();
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ $dx *= 0.5;
+ $x_mid = $rtb + $dx;
+ $f_mid = self::xnpvOrdered($x_mid, $values, $dates, false);
+ if ($f_mid <= 0.0) {
+ $rtb = $x_mid;
+ }
+ if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
+ $rslt = $x_mid;
+
+ break;
+ }
+ }
+
+ return $rslt;
+ }
+
+ /**
+ * XIRR.
+ *
+ * Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic.
+ *
+ * Excel Function:
+ * =XIRR(values,dates,guess)
+ *
+ * @param float[] $values A series of cash flow payments
+ * The series of values must contain at least one positive value & one negative value
+ * @param mixed[] $dates A series of payment dates
+ * The first payment date indicates the beginning of the schedule of payments
+ * All other dates must be later than this date, but they may occur in any order
+ * @param float $guess An optional guess at the expected answer
+ *
+ * @return float|mixed|string
+ */
+ public static function XIRR($values, $dates, $guess = 0.1)
+ {
+ $rslt = self::xirrPart1($values, $dates);
+ if ($rslt) {
+ return $rslt;
+ }
+
+ // create an initial range, with a root somewhere between 0 and guess
+ $guess = Functions::flattenSingleValue($guess);
+ $x1 = 0.0;
+ $x2 = $guess ? $guess : 0.1;
+ $f1 = self::xnpvOrdered($x1, $values, $dates, false);
+ $f2 = self::xnpvOrdered($x2, $values, $dates, false);
+ $found = false;
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ if (!is_numeric($f1) || !is_numeric($f2)) {
+ break;
+ }
+ if (($f1 * $f2) < 0.0) {
+ $found = true;
+
+ break;
+ } elseif (abs($f1) < abs($f2)) {
+ $f1 = self::xnpvOrdered($x1 += 1.6 * ($x1 - $x2), $values, $dates, false);
+ } else {
+ $f2 = self::xnpvOrdered($x2 += 1.6 * ($x2 - $x1), $values, $dates, false);
+ }
+ }
+ if (!$found) {
+ return Functions::NAN();
+ }
+
+ return self::xirrPart3($values, $dates, $x1, $x2);
+ }
+
+ /**
+ * XNPV.
+ *
+ * Returns the net present value for a schedule of cash flows that is not necessarily periodic.
+ * To calculate the net present value for a series of cash flows that is periodic, use the NPV function.
+ *
+ * Excel Function:
+ * =XNPV(rate,values,dates)
+ *
+ * @param float $rate the discount rate to apply to the cash flows
+ * @param float[] $values A series of cash flows that corresponds to a schedule of payments in dates.
+ * The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment.
+ * If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year.
+ * The series of values must contain at least one positive value and one negative value.
+ * @param mixed[] $dates A schedule of payment dates that corresponds to the cash flow payments.
+ * The first payment date indicates the beginning of the schedule of payments.
+ * All other dates must be later than this date, but they may occur in any order.
+ *
+ * @return float|mixed|string
+ */
+ public static function XNPV($rate, $values, $dates)
+ {
+ return self::xnpvOrdered($rate, $values, $dates, true);
+ }
+
+ private static function validateXnpv($rate, $values, $dates)
+ {
+ if (!is_numeric($rate)) {
+ return Functions::VALUE();
+ }
+ $valCount = count($values);
+ if ($valCount != count($dates)) {
+ return Functions::NAN();
+ }
+ if ($valCount > 1 && ((min($values) > 0) || (max($values) < 0))) {
+ return Functions::NAN();
+ }
+ $date0 = DateTime::getDateValue($dates[0]);
+ if (is_string($date0)) {
+ return Functions::VALUE();
+ }
+
+ return '';
+ }
+
+ private static function xnpvOrdered($rate, $values, $dates, $ordered = true)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $values = Functions::flattenArray($values);
+ $dates = Functions::flattenArray($dates);
+ $valCount = count($values);
+ $date0 = DateTime::getDateValue($dates[0]);
+ $rslt = self::validateXnpv($rate, $values, $dates);
+ if ($rslt) {
+ return $rslt;
+ }
+ $xnpv = 0.0;
+ for ($i = 0; $i < $valCount; ++$i) {
+ if (!is_numeric($values[$i])) {
+ return Functions::VALUE();
+ }
+ $datei = DateTime::getDateValue($dates[$i]);
+ if (is_string($datei)) {
+ return Functions::VALUE();
+ }
+ if ($date0 > $datei) {
+ $dif = $ordered ? Functions::NAN() : -DateTime::DATEDIF($datei, $date0, 'd');
+ } else {
+ $dif = DateTime::DATEDIF($date0, $datei, 'd');
+ }
+ if (!is_numeric($dif)) {
+ return $dif;
+ }
+ $xnpv += $values[$i] / (1 + $rate) ** ($dif / 365);
+ }
+
+ return is_finite($xnpv) ? $xnpv : Functions::VALUE();
+ }
+
+ /**
+ * YIELDDISC.
+ *
+ * Returns the annual yield of a security that pays interest at maturity.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param int $price The security's price per $100 face value
+ * @param int $redemption The security's redemption value per $100 face value
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $price = Functions::flattenSingleValue($price);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $basis = (int) Functions::flattenSingleValue($basis);
+
+ // Validate
+ if (is_numeric($price) && is_numeric($redemption)) {
+ if (($price <= 0) || ($redemption <= 0)) {
+ return Functions::NAN();
+ }
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * YIELDMAT.
+ *
+ * Returns the annual yield of a security that pays interest at maturity.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $issue The security's issue date
+ * @param int $rate The security's interest rate at date of issue
+ * @param int $price The security's price per $100 face value
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $issue = Functions::flattenSingleValue($issue);
+ $rate = Functions::flattenSingleValue($rate);
+ $price = Functions::flattenSingleValue($price);
+ $basis = (int) Functions::flattenSingleValue($basis);
+
+ // Validate
+ if (is_numeric($rate) && is_numeric($price)) {
+ if (($rate <= 0) || ($price <= 0)) {
+ return Functions::NAN();
+ }
+ $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+ $daysBetweenIssueAndSettlement *= $daysPerYear;
+ $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis);
+ if (!is_numeric($daysBetweenIssueAndMaturity)) {
+ // return date error
+ return $daysBetweenIssueAndMaturity;
+ }
+ $daysBetweenIssueAndMaturity *= $daysPerYear;
+ $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) /
+ (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) *
+ ($daysPerYear / $daysBetweenSettlementAndMaturity);
+ }
+
+ return Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php
new file mode 100644
index 0000000..1e1daba
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php
@@ -0,0 +1,631 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+/**
+ * PARTLY BASED ON:
+ * Copyright (c) 2007 E. W. Bachtal, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * The software is provided "as is", without warranty of any kind, express or implied, including but not
+ * limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
+ * no event shall the authors or copyright holders be liable for any claim, damages or other liability,
+ * whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
+ * software or the use or other dealings in the software.
+ *
+ * https://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
+ * https://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
+ */
+class FormulaParser
+{
+ // Character constants
+ const QUOTE_DOUBLE = '"';
+ const QUOTE_SINGLE = '\'';
+ const BRACKET_CLOSE = ']';
+ const BRACKET_OPEN = '[';
+ const BRACE_OPEN = '{';
+ const BRACE_CLOSE = '}';
+ const PAREN_OPEN = '(';
+ const PAREN_CLOSE = ')';
+ const SEMICOLON = ';';
+ const WHITESPACE = ' ';
+ const COMMA = ',';
+ const ERROR_START = '#';
+
+ const OPERATORS_SN = '+-';
+ const OPERATORS_INFIX = '+-*/^&=><';
+ const OPERATORS_POSTFIX = '%';
+
+ /**
+ * Formula.
+ *
+ * @var string
+ */
+ private $formula;
+
+ /**
+ * Tokens.
+ *
+ * @var FormulaToken[]
+ */
+ private $tokens = [];
+
+ /**
+ * Create a new FormulaParser.
+ *
+ * @param string $pFormula Formula to parse
+ */
+ public function __construct($pFormula = '')
+ {
+ // Check parameters
+ if ($pFormula === null) {
+ throw new Exception('Invalid parameter passed: formula');
+ }
+
+ // Initialise values
+ $this->formula = trim($pFormula);
+ // Parse!
+ $this->parseToTokens();
+ }
+
+ /**
+ * Get Formula.
+ *
+ * @return string
+ */
+ public function getFormula()
+ {
+ return $this->formula;
+ }
+
+ /**
+ * Get Token.
+ *
+ * @param int $pId Token id
+ *
+ * @return string
+ */
+ public function getToken($pId = 0)
+ {
+ if (isset($this->tokens[$pId])) {
+ return $this->tokens[$pId];
+ }
+
+ throw new Exception("Token with id $pId does not exist.");
+ }
+
+ /**
+ * Get Token count.
+ *
+ * @return int
+ */
+ public function getTokenCount()
+ {
+ return count($this->tokens);
+ }
+
+ /**
+ * Get Tokens.
+ *
+ * @return FormulaToken[]
+ */
+ public function getTokens()
+ {
+ return $this->tokens;
+ }
+
+ /**
+ * Parse to tokens.
+ */
+ private function parseToTokens(): void
+ {
+ // No attempt is made to verify formulas; assumes formulas are derived from Excel, where
+ // they can only exist if valid; stack overflows/underflows sunk as nulls without exceptions.
+
+ // Check if the formula has a valid starting =
+ $formulaLength = strlen($this->formula);
+ if ($formulaLength < 2 || $this->formula[0] != '=') {
+ return;
+ }
+
+ // Helper variables
+ $tokens1 = $tokens2 = $stack = [];
+ $inString = $inPath = $inRange = $inError = false;
+ $token = $previousToken = $nextToken = null;
+
+ $index = 1;
+ $value = '';
+
+ $ERRORS = ['#NULL!', '#DIV/0!', '#VALUE!', '#REF!', '#NAME?', '#NUM!', '#N/A'];
+ $COMPARATORS_MULTI = ['>=', '<=', '<>'];
+
+ while ($index < $formulaLength) {
+ // state-dependent character evaluation (order is important)
+
+ // double-quoted strings
+ // embeds are doubled
+ // end marks token
+ if ($inString) {
+ if ($this->formula[$index] == self::QUOTE_DOUBLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_DOUBLE)) {
+ $value .= self::QUOTE_DOUBLE;
+ ++$index;
+ } else {
+ $inString = false;
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_TEXT);
+ $value = '';
+ }
+ } else {
+ $value .= $this->formula[$index];
+ }
+ ++$index;
+
+ continue;
+ }
+
+ // single-quoted strings (links)
+ // embeds are double
+ // end does not mark a token
+ if ($inPath) {
+ if ($this->formula[$index] == self::QUOTE_SINGLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_SINGLE)) {
+ $value .= self::QUOTE_SINGLE;
+ ++$index;
+ } else {
+ $inPath = false;
+ }
+ } else {
+ $value .= $this->formula[$index];
+ }
+ ++$index;
+
+ continue;
+ }
+
+ // bracked strings (R1C1 range index or linked workbook name)
+ // no embeds (changed to "()" by Excel)
+ // end does not mark a token
+ if ($inRange) {
+ if ($this->formula[$index] == self::BRACKET_CLOSE) {
+ $inRange = false;
+ }
+ $value .= $this->formula[$index];
+ ++$index;
+
+ continue;
+ }
+
+ // error values
+ // end marks a token, determined from absolute list of values
+ if ($inError) {
+ $value .= $this->formula[$index];
+ ++$index;
+ if (in_array($value, $ERRORS)) {
+ $inError = false;
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_ERROR);
+ $value = '';
+ }
+
+ continue;
+ }
+
+ // scientific notation check
+ if (strpos(self::OPERATORS_SN, $this->formula[$index]) !== false) {
+ if (strlen($value) > 1) {
+ if (preg_match('/^[1-9]{1}(\\.\\d+)?E{1}$/', $this->formula[$index]) != 0) {
+ $value .= $this->formula[$index];
+ ++$index;
+
+ continue;
+ }
+ }
+ }
+
+ // independent character evaluation (order not important)
+
+ // establish state-dependent character evaluations
+ if ($this->formula[$index] == self::QUOTE_DOUBLE) {
+ if (strlen($value) > 0) {
+ // unexpected
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);
+ $value = '';
+ }
+ $inString = true;
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->formula[$index] == self::QUOTE_SINGLE) {
+ if (strlen($value) > 0) {
+ // unexpected
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);
+ $value = '';
+ }
+ $inPath = true;
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->formula[$index] == self::BRACKET_OPEN) {
+ $inRange = true;
+ $value .= self::BRACKET_OPEN;
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->formula[$index] == self::ERROR_START) {
+ if (strlen($value) > 0) {
+ // unexpected
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);
+ $value = '';
+ }
+ $inError = true;
+ $value .= self::ERROR_START;
+ ++$index;
+
+ continue;
+ }
+
+ // mark start and end of arrays and array rows
+ if ($this->formula[$index] == self::BRACE_OPEN) {
+ if (strlen($value) > 0) {
+ // unexpected
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN);
+ $value = '';
+ }
+
+ $tmp = new FormulaToken('ARRAY', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);
+ $tokens1[] = $tmp;
+ $stack[] = clone $tmp;
+
+ $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);
+ $tokens1[] = $tmp;
+ $stack[] = clone $tmp;
+
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->formula[$index] == self::SEMICOLON) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+
+ $tmp = array_pop($stack);
+ $tmp->setValue('');
+ $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);
+ $tokens1[] = $tmp;
+
+ $tmp = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT);
+ $tokens1[] = $tmp;
+
+ $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);
+ $tokens1[] = $tmp;
+ $stack[] = clone $tmp;
+
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->formula[$index] == self::BRACE_CLOSE) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+
+ $tmp = array_pop($stack);
+ $tmp->setValue('');
+ $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);
+ $tokens1[] = $tmp;
+
+ $tmp = array_pop($stack);
+ $tmp->setValue('');
+ $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);
+ $tokens1[] = $tmp;
+
+ ++$index;
+
+ continue;
+ }
+
+ // trim white-space
+ if ($this->formula[$index] == self::WHITESPACE) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+ $tokens1[] = new FormulaToken('', FormulaToken::TOKEN_TYPE_WHITESPACE);
+ ++$index;
+ while (($this->formula[$index] == self::WHITESPACE) && ($index < $formulaLength)) {
+ ++$index;
+ }
+
+ continue;
+ }
+
+ // multi-character comparators
+ if (($index + 2) <= $formulaLength) {
+ if (in_array(substr($this->formula, $index, 2), $COMPARATORS_MULTI)) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+ $tokens1[] = new FormulaToken(substr($this->formula, $index, 2), FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_LOGICAL);
+ $index += 2;
+
+ continue;
+ }
+ }
+
+ // standard infix operators
+ if (strpos(self::OPERATORS_INFIX, $this->formula[$index]) !== false) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+ $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORINFIX);
+ ++$index;
+
+ continue;
+ }
+
+ // standard postfix operators (only one)
+ if (strpos(self::OPERATORS_POSTFIX, $this->formula[$index]) !== false) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+ $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
+ ++$index;
+
+ continue;
+ }
+
+ // start subexpression or function
+ if ($this->formula[$index] == self::PAREN_OPEN) {
+ if (strlen($value) > 0) {
+ $tmp = new FormulaToken($value, FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START);
+ $tokens1[] = $tmp;
+ $stack[] = clone $tmp;
+ $value = '';
+ } else {
+ $tmp = new FormulaToken('', FormulaToken::TOKEN_TYPE_SUBEXPRESSION, FormulaToken::TOKEN_SUBTYPE_START);
+ $tokens1[] = $tmp;
+ $stack[] = clone $tmp;
+ }
+ ++$index;
+
+ continue;
+ }
+
+ // function, subexpression, or array parameters, or operand unions
+ if ($this->formula[$index] == self::COMMA) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+
+ $tmp = array_pop($stack);
+ $tmp->setValue('');
+ $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);
+ $stack[] = $tmp;
+
+ if ($tmp->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) {
+ $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_UNION);
+ } else {
+ $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT);
+ }
+ ++$index;
+
+ continue;
+ }
+
+ // stop subexpression
+ if ($this->formula[$index] == self::PAREN_CLOSE) {
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ $value = '';
+ }
+
+ $tmp = array_pop($stack);
+ $tmp->setValue('');
+ $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP);
+ $tokens1[] = $tmp;
+
+ ++$index;
+
+ continue;
+ }
+
+ // token accumulation
+ $value .= $this->formula[$index];
+ ++$index;
+ }
+
+ // dump remaining accumulation
+ if (strlen($value) > 0) {
+ $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND);
+ }
+
+ // move tokenList to new set, excluding unnecessary white-space tokens and converting necessary ones to intersections
+ $tokenCount = count($tokens1);
+ for ($i = 0; $i < $tokenCount; ++$i) {
+ $token = $tokens1[$i];
+ if (isset($tokens1[$i - 1])) {
+ $previousToken = $tokens1[$i - 1];
+ } else {
+ $previousToken = null;
+ }
+ if (isset($tokens1[$i + 1])) {
+ $nextToken = $tokens1[$i + 1];
+ } else {
+ $nextToken = null;
+ }
+
+ if ($token === null) {
+ continue;
+ }
+
+ if ($token->getTokenType() != FormulaToken::TOKEN_TYPE_WHITESPACE) {
+ $tokens2[] = $token;
+
+ continue;
+ }
+
+ if ($previousToken === null) {
+ continue;
+ }
+
+ if (
+ !(
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)
+ )
+ ) {
+ continue;
+ }
+
+ if ($nextToken === null) {
+ continue;
+ }
+
+ if (
+ !(
+ (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) ||
+ (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) ||
+ ($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)
+ )
+ ) {
+ continue;
+ }
+
+ $tokens2[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_INTERSECTION);
+ }
+
+ // move tokens to final list, switching infix "-" operators to prefix when appropriate, switching infix "+" operators
+ // to noop when appropriate, identifying operand and infix-operator subtypes, and pulling "@" from function names
+ $this->tokens = [];
+
+ $tokenCount = count($tokens2);
+ for ($i = 0; $i < $tokenCount; ++$i) {
+ $token = $tokens2[$i];
+ if (isset($tokens2[$i - 1])) {
+ $previousToken = $tokens2[$i - 1];
+ } else {
+ $previousToken = null;
+ }
+ if (isset($tokens2[$i + 1])) {
+ $nextToken = $tokens2[$i + 1];
+ } else {
+ $nextToken = null;
+ }
+
+ if ($token === null) {
+ continue;
+ }
+
+ if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '-') {
+ if ($i == 0) {
+ $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX);
+ } elseif (
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) &&
+ ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) &&
+ ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) ||
+ ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)
+ ) {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);
+ } else {
+ $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX);
+ }
+
+ $this->tokens[] = $token;
+
+ continue;
+ }
+
+ if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '+') {
+ if ($i == 0) {
+ continue;
+ } elseif (
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) &&
+ ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) &&
+ ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) ||
+ ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) ||
+ ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)
+ ) {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);
+ } else {
+ continue;
+ }
+
+ $this->tokens[] = $token;
+
+ continue;
+ }
+
+ if (
+ $token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX &&
+ $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING
+ ) {
+ if (strpos('<>=', substr($token->getValue(), 0, 1)) !== false) {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL);
+ } elseif ($token->getValue() == '&') {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_CONCATENATION);
+ } else {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH);
+ }
+
+ $this->tokens[] = $token;
+
+ continue;
+ }
+
+ if (
+ $token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND &&
+ $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING
+ ) {
+ if (!is_numeric($token->getValue())) {
+ if (strtoupper($token->getValue()) == 'TRUE' || strtoupper($token->getValue()) == 'FALSE') {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL);
+ } else {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_RANGE);
+ }
+ } else {
+ $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_NUMBER);
+ }
+
+ $this->tokens[] = $token;
+
+ continue;
+ }
+
+ if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) {
+ if (strlen($token->getValue()) > 0) {
+ if (substr($token->getValue(), 0, 1) == '@') {
+ $token->setValue(substr($token->getValue(), 1));
+ }
+ }
+ }
+
+ $this->tokens[] = $token;
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php
new file mode 100644
index 0000000..bed0caa
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php
@@ -0,0 +1,150 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+/**
+ * PARTLY BASED ON:
+ * Copyright (c) 2007 E. W. Bachtal, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * The software is provided "as is", without warranty of any kind, express or implied, including but not
+ * limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
+ * no event shall the authors or copyright holders be liable for any claim, damages or other liability,
+ * whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
+ * software or the use or other dealings in the software.
+ *
+ * https://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
+ * https://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
+ */
+class FormulaToken
+{
+ // Token types
+ const TOKEN_TYPE_NOOP = 'Noop';
+ const TOKEN_TYPE_OPERAND = 'Operand';
+ const TOKEN_TYPE_FUNCTION = 'Function';
+ const TOKEN_TYPE_SUBEXPRESSION = 'Subexpression';
+ const TOKEN_TYPE_ARGUMENT = 'Argument';
+ const TOKEN_TYPE_OPERATORPREFIX = 'OperatorPrefix';
+ const TOKEN_TYPE_OPERATORINFIX = 'OperatorInfix';
+ const TOKEN_TYPE_OPERATORPOSTFIX = 'OperatorPostfix';
+ const TOKEN_TYPE_WHITESPACE = 'Whitespace';
+ const TOKEN_TYPE_UNKNOWN = 'Unknown';
+
+ // Token subtypes
+ const TOKEN_SUBTYPE_NOTHING = 'Nothing';
+ const TOKEN_SUBTYPE_START = 'Start';
+ const TOKEN_SUBTYPE_STOP = 'Stop';
+ const TOKEN_SUBTYPE_TEXT = 'Text';
+ const TOKEN_SUBTYPE_NUMBER = 'Number';
+ const TOKEN_SUBTYPE_LOGICAL = 'Logical';
+ const TOKEN_SUBTYPE_ERROR = 'Error';
+ const TOKEN_SUBTYPE_RANGE = 'Range';
+ const TOKEN_SUBTYPE_MATH = 'Math';
+ const TOKEN_SUBTYPE_CONCATENATION = 'Concatenation';
+ const TOKEN_SUBTYPE_INTERSECTION = 'Intersection';
+ const TOKEN_SUBTYPE_UNION = 'Union';
+
+ /**
+ * Value.
+ *
+ * @var string
+ */
+ private $value;
+
+ /**
+ * Token Type (represented by TOKEN_TYPE_*).
+ *
+ * @var string
+ */
+ private $tokenType;
+
+ /**
+ * Token SubType (represented by TOKEN_SUBTYPE_*).
+ *
+ * @var string
+ */
+ private $tokenSubType;
+
+ /**
+ * Create a new FormulaToken.
+ *
+ * @param string $pValue
+ * @param string $pTokenType Token type (represented by TOKEN_TYPE_*)
+ * @param string $pTokenSubType Token Subtype (represented by TOKEN_SUBTYPE_*)
+ */
+ public function __construct($pValue, $pTokenType = self::TOKEN_TYPE_UNKNOWN, $pTokenSubType = self::TOKEN_SUBTYPE_NOTHING)
+ {
+ // Initialise values
+ $this->value = $pValue;
+ $this->tokenType = $pTokenType;
+ $this->tokenSubType = $pTokenSubType;
+ }
+
+ /**
+ * Get Value.
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Set Value.
+ *
+ * @param string $value
+ */
+ public function setValue($value): void
+ {
+ $this->value = $value;
+ }
+
+ /**
+ * Get Token Type (represented by TOKEN_TYPE_*).
+ *
+ * @return string
+ */
+ public function getTokenType()
+ {
+ return $this->tokenType;
+ }
+
+ /**
+ * Set Token Type (represented by TOKEN_TYPE_*).
+ *
+ * @param string $value
+ */
+ public function setTokenType($value): void
+ {
+ $this->tokenType = $value;
+ }
+
+ /**
+ * Get Token SubType (represented by TOKEN_SUBTYPE_*).
+ *
+ * @return string
+ */
+ public function getTokenSubType()
+ {
+ return $this->tokenSubType;
+ }
+
+ /**
+ * Set Token SubType (represented by TOKEN_SUBTYPE_*).
+ *
+ * @param string $value
+ */
+ public function setTokenSubType($value): void
+ {
+ $this->tokenSubType = $value;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php
new file mode 100644
index 0000000..c4c0266
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php
@@ -0,0 +1,658 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Cell\Cell;
+
+class Functions
+{
+ const PRECISION = 8.88E-016;
+
+ /**
+ * 2 / PI.
+ */
+ const M_2DIVPI = 0.63661977236758134307553505349006;
+
+ /** constants */
+ const COMPATIBILITY_EXCEL = 'Excel';
+ const COMPATIBILITY_GNUMERIC = 'Gnumeric';
+ const COMPATIBILITY_OPENOFFICE = 'OpenOfficeCalc';
+
+ const RETURNDATE_PHP_NUMERIC = 'P';
+ const RETURNDATE_UNIX_TIMESTAMP = 'P';
+ const RETURNDATE_PHP_OBJECT = 'O';
+ const RETURNDATE_PHP_DATETIME_OBJECT = 'O';
+ const RETURNDATE_EXCEL = 'E';
+
+ /**
+ * Compatibility mode to use for error checking and responses.
+ *
+ * @var string
+ */
+ protected static $compatibilityMode = self::COMPATIBILITY_EXCEL;
+
+ /**
+ * Data Type to use when returning date values.
+ *
+ * @var string
+ */
+ protected static $returnDateType = self::RETURNDATE_EXCEL;
+
+ /**
+ * List of error codes.
+ *
+ * @var array
+ */
+ protected static $errorCodes = [
+ 'null' => '#NULL!',
+ 'divisionbyzero' => '#DIV/0!',
+ 'value' => '#VALUE!',
+ 'reference' => '#REF!',
+ 'name' => '#NAME?',
+ 'num' => '#NUM!',
+ 'na' => '#N/A',
+ 'gettingdata' => '#GETTING_DATA',
+ ];
+
+ /**
+ * Set the Compatibility Mode.
+ *
+ * @param string $compatibilityMode Compatibility Mode
+ * Permitted values are:
+ * Functions::COMPATIBILITY_EXCEL 'Excel'
+ * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric'
+ * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'
+ *
+ * @return bool (Success or Failure)
+ */
+ public static function setCompatibilityMode($compatibilityMode)
+ {
+ if (
+ ($compatibilityMode == self::COMPATIBILITY_EXCEL) ||
+ ($compatibilityMode == self::COMPATIBILITY_GNUMERIC) ||
+ ($compatibilityMode == self::COMPATIBILITY_OPENOFFICE)
+ ) {
+ self::$compatibilityMode = $compatibilityMode;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return the current Compatibility Mode.
+ *
+ * @return string Compatibility Mode
+ * Possible Return values are:
+ * Functions::COMPATIBILITY_EXCEL 'Excel'
+ * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric'
+ * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'
+ */
+ public static function getCompatibilityMode()
+ {
+ return self::$compatibilityMode;
+ }
+
+ /**
+ * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).
+ *
+ * @param string $returnDateType Return Date Format
+ * Permitted values are:
+ * Functions::RETURNDATE_UNIX_TIMESTAMP 'P'
+ * Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O'
+ * Functions::RETURNDATE_EXCEL 'E'
+ *
+ * @return bool Success or failure
+ */
+ public static function setReturnDateType($returnDateType)
+ {
+ if (
+ ($returnDateType == self::RETURNDATE_UNIX_TIMESTAMP) ||
+ ($returnDateType == self::RETURNDATE_PHP_DATETIME_OBJECT) ||
+ ($returnDateType == self::RETURNDATE_EXCEL)
+ ) {
+ self::$returnDateType = $returnDateType;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).
+ *
+ * @return string Return Date Format
+ * Possible Return values are:
+ * Functions::RETURNDATE_UNIX_TIMESTAMP 'P'
+ * Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O'
+ * Functions::RETURNDATE_EXCEL 'E'
+ */
+ public static function getReturnDateType()
+ {
+ return self::$returnDateType;
+ }
+
+ /**
+ * DUMMY.
+ *
+ * @return string #Not Yet Implemented
+ */
+ public static function DUMMY()
+ {
+ return '#Not Yet Implemented';
+ }
+
+ /**
+ * DIV0.
+ *
+ * @return string #Not Yet Implemented
+ */
+ public static function DIV0()
+ {
+ return self::$errorCodes['divisionbyzero'];
+ }
+
+ /**
+ * NA.
+ *
+ * Excel Function:
+ * =NA()
+ *
+ * Returns the error value #N/A
+ * #N/A is the error value that means "no value is available."
+ *
+ * @return string #N/A!
+ */
+ public static function NA()
+ {
+ return self::$errorCodes['na'];
+ }
+
+ /**
+ * NaN.
+ *
+ * Returns the error value #NUM!
+ *
+ * @return string #NUM!
+ */
+ public static function NAN()
+ {
+ return self::$errorCodes['num'];
+ }
+
+ /**
+ * NAME.
+ *
+ * Returns the error value #NAME?
+ *
+ * @return string #NAME?
+ */
+ public static function NAME()
+ {
+ return self::$errorCodes['name'];
+ }
+
+ /**
+ * REF.
+ *
+ * Returns the error value #REF!
+ *
+ * @return string #REF!
+ */
+ public static function REF()
+ {
+ return self::$errorCodes['reference'];
+ }
+
+ /**
+ * NULL.
+ *
+ * Returns the error value #NULL!
+ *
+ * @return string #NULL!
+ */
+ public static function null()
+ {
+ return self::$errorCodes['null'];
+ }
+
+ /**
+ * VALUE.
+ *
+ * Returns the error value #VALUE!
+ *
+ * @return string #VALUE!
+ */
+ public static function VALUE()
+ {
+ return self::$errorCodes['value'];
+ }
+
+ public static function isMatrixValue($idx)
+ {
+ return (substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0);
+ }
+
+ public static function isValue($idx)
+ {
+ return substr_count($idx, '.') == 0;
+ }
+
+ public static function isCellValue($idx)
+ {
+ return substr_count($idx, '.') > 1;
+ }
+
+ public static function ifCondition($condition)
+ {
+ $condition = self::flattenSingleValue($condition);
+
+ if ($condition === '') {
+ $condition = '=""';
+ }
+
+ if (!is_string($condition) || !in_array($condition[0], ['>', '<', '='])) {
+ if (!is_numeric($condition)) {
+ $condition = Calculation::wrapResult(strtoupper($condition));
+ }
+
+ return str_replace('""""', '""', '=' . $condition);
+ }
+ preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches);
+ [, $operator, $operand] = $matches;
+
+ if (is_numeric(trim($operand, '"'))) {
+ $operand = trim($operand, '"');
+ } elseif (!is_numeric($operand)) {
+ $operand = str_replace('"', '""', $operand);
+ $operand = Calculation::wrapResult(strtoupper($operand));
+ }
+
+ return str_replace('""""', '""', $operator . $operand);
+ }
+
+ /**
+ * ERROR_TYPE.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function errorType($value = '')
+ {
+ $value = self::flattenSingleValue($value);
+
+ $i = 1;
+ foreach (self::$errorCodes as $errorCode) {
+ if ($value === $errorCode) {
+ return $i;
+ }
+ ++$i;
+ }
+
+ return self::NA();
+ }
+
+ /**
+ * IS_BLANK.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isBlank($value = null)
+ {
+ if ($value !== null) {
+ $value = self::flattenSingleValue($value);
+ }
+
+ return $value === null;
+ }
+
+ /**
+ * IS_ERR.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isErr($value = '')
+ {
+ $value = self::flattenSingleValue($value);
+
+ return self::isError($value) && (!self::isNa(($value)));
+ }
+
+ /**
+ * IS_ERROR.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isError($value = '')
+ {
+ $value = self::flattenSingleValue($value);
+
+ if (!is_string($value)) {
+ return false;
+ }
+
+ return in_array($value, self::$errorCodes);
+ }
+
+ /**
+ * IS_NA.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isNa($value = '')
+ {
+ $value = self::flattenSingleValue($value);
+
+ return $value === self::NA();
+ }
+
+ /**
+ * IS_EVEN.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool|string
+ */
+ public static function isEven($value = null)
+ {
+ $value = self::flattenSingleValue($value);
+
+ if ($value === null) {
+ return self::NAME();
+ } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) {
+ return self::VALUE();
+ }
+
+ return $value % 2 == 0;
+ }
+
+ /**
+ * IS_ODD.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool|string
+ */
+ public static function isOdd($value = null)
+ {
+ $value = self::flattenSingleValue($value);
+
+ if ($value === null) {
+ return self::NAME();
+ } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) {
+ return self::VALUE();
+ }
+
+ return abs($value) % 2 == 1;
+ }
+
+ /**
+ * IS_NUMBER.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isNumber($value = null)
+ {
+ $value = self::flattenSingleValue($value);
+
+ if (is_string($value)) {
+ return false;
+ }
+
+ return is_numeric($value);
+ }
+
+ /**
+ * IS_LOGICAL.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isLogical($value = null)
+ {
+ $value = self::flattenSingleValue($value);
+
+ return is_bool($value);
+ }
+
+ /**
+ * IS_TEXT.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isText($value = null)
+ {
+ $value = self::flattenSingleValue($value);
+
+ return is_string($value) && !self::isError($value);
+ }
+
+ /**
+ * IS_NONTEXT.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return bool
+ */
+ public static function isNonText($value = null)
+ {
+ return !self::isText($value);
+ }
+
+ /**
+ * N.
+ *
+ * Returns a value converted to a number
+ *
+ * @param null|mixed $value The value you want converted
+ *
+ * @return number N converts values listed in the following table
+ * If value is or refers to N returns
+ * A number That number
+ * A date The serial number of that date
+ * TRUE 1
+ * FALSE 0
+ * An error value The error value
+ * Anything else 0
+ */
+ public static function n($value = null)
+ {
+ while (is_array($value)) {
+ $value = array_shift($value);
+ }
+
+ switch (gettype($value)) {
+ case 'double':
+ case 'float':
+ case 'integer':
+ return $value;
+ case 'boolean':
+ return (int) $value;
+ case 'string':
+ // Errors
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
+ return $value;
+ }
+
+ break;
+ }
+
+ return 0;
+ }
+
+ /**
+ * TYPE.
+ *
+ * Returns a number that identifies the type of a value
+ *
+ * @param null|mixed $value The value you want tested
+ *
+ * @return number N converts values listed in the following table
+ * If value is or refers to N returns
+ * A number 1
+ * Text 2
+ * Logical Value 4
+ * An error value 16
+ * Array or Matrix 64
+ */
+ public static function TYPE($value = null)
+ {
+ $value = self::flattenArrayIndexed($value);
+ if (is_array($value) && (count($value) > 1)) {
+ end($value);
+ $a = key($value);
+ // Range of cells is an error
+ if (self::isCellValue($a)) {
+ return 16;
+ // Test for Matrix
+ } elseif (self::isMatrixValue($a)) {
+ return 64;
+ }
+ } elseif (empty($value)) {
+ // Empty Cell
+ return 1;
+ }
+ $value = self::flattenSingleValue($value);
+
+ if (($value === null) || (is_float($value)) || (is_int($value))) {
+ return 1;
+ } elseif (is_bool($value)) {
+ return 4;
+ } elseif (is_array($value)) {
+ return 64;
+ } elseif (is_string($value)) {
+ // Errors
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
+ return 16;
+ }
+
+ return 2;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Convert a multi-dimensional array to a simple 1-dimensional array.
+ *
+ * @param array $array Array to be flattened
+ *
+ * @return array Flattened array
+ */
+ public static function flattenArray($array)
+ {
+ if (!is_array($array)) {
+ return (array) $array;
+ }
+
+ $arrayValues = [];
+ foreach ($array as $value) {
+ if (is_array($value)) {
+ foreach ($value as $val) {
+ if (is_array($val)) {
+ foreach ($val as $v) {
+ $arrayValues[] = $v;
+ }
+ } else {
+ $arrayValues[] = $val;
+ }
+ }
+ } else {
+ $arrayValues[] = $value;
+ }
+ }
+
+ return $arrayValues;
+ }
+
+ /**
+ * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing.
+ *
+ * @param array $array Array to be flattened
+ *
+ * @return array Flattened array
+ */
+ public static function flattenArrayIndexed($array)
+ {
+ if (!is_array($array)) {
+ return (array) $array;
+ }
+
+ $arrayValues = [];
+ foreach ($array as $k1 => $value) {
+ if (is_array($value)) {
+ foreach ($value as $k2 => $val) {
+ if (is_array($val)) {
+ foreach ($val as $k3 => $v) {
+ $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v;
+ }
+ } else {
+ $arrayValues[$k1 . '.' . $k2] = $val;
+ }
+ }
+ } else {
+ $arrayValues[$k1] = $value;
+ }
+ }
+
+ return $arrayValues;
+ }
+
+ /**
+ * Convert an array to a single scalar value by extracting the first element.
+ *
+ * @param mixed $value Array or scalar value
+ *
+ * @return mixed
+ */
+ public static function flattenSingleValue($value = '')
+ {
+ while (is_array($value)) {
+ $value = array_shift($value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * ISFORMULA.
+ *
+ * @param mixed $cellReference The cell to check
+ * @param Cell $pCell The current cell (containing this formula)
+ *
+ * @return bool|string
+ */
+ public static function isFormula($cellReference = '', ?Cell $pCell = null)
+ {
+ if ($pCell === null) {
+ return self::REF();
+ }
+
+ preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
+
+ $cellReference = $matches[6] . $matches[7];
+ $worksheetName = str_replace("''", "'", trim($matches[2], "'"));
+
+ $worksheet = (!empty($worksheetName))
+ ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName)
+ : $pCell->getWorksheet();
+
+ return $worksheet->getCell($cellReference)->isFormula();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php
new file mode 100644
index 0000000..eae508e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php
@@ -0,0 +1,390 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+class Logical
+{
+ /**
+ * TRUE.
+ *
+ * Returns the boolean TRUE.
+ *
+ * Excel Function:
+ * =TRUE()
+ *
+ * @return bool True
+ */
+ public static function true()
+ {
+ return true;
+ }
+
+ /**
+ * FALSE.
+ *
+ * Returns the boolean FALSE.
+ *
+ * Excel Function:
+ * =FALSE()
+ *
+ * @return bool False
+ */
+ public static function false()
+ {
+ return false;
+ }
+
+ private static function countTrueValues(array $args)
+ {
+ $returnValue = 0;
+
+ foreach ($args as $arg) {
+ // Is it a boolean value?
+ if (is_bool($arg)) {
+ $returnValue += $arg;
+ } elseif ((is_numeric($arg)) && (!is_string($arg))) {
+ $returnValue += ((int) $arg != 0);
+ } elseif (is_string($arg)) {
+ $arg = strtoupper($arg);
+ if (($arg == 'TRUE') || ($arg == Calculation::getTRUE())) {
+ $arg = true;
+ } elseif (($arg == 'FALSE') || ($arg == Calculation::getFALSE())) {
+ $arg = false;
+ } else {
+ return Functions::VALUE();
+ }
+ $returnValue += ($arg != 0);
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * LOGICAL_AND.
+ *
+ * Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.
+ *
+ * Excel Function:
+ * =AND(logical1[,logical2[, ...]])
+ *
+ * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
+ * or references that contain logical values.
+ *
+ * Boolean arguments are treated as True or False as appropriate
+ * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
+ * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
+ * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return bool|string the logical AND of the arguments
+ */
+ public static function logicalAnd(...$args)
+ {
+ $args = Functions::flattenArray($args);
+
+ if (count($args) == 0) {
+ return Functions::VALUE();
+ }
+
+ $args = array_filter($args, function ($value) {
+ return $value !== null || (is_string($value) && trim($value) == '');
+ });
+ $argCount = count($args);
+
+ $returnValue = self::countTrueValues($args);
+ if (is_string($returnValue)) {
+ return $returnValue;
+ }
+
+ return ($returnValue > 0) && ($returnValue == $argCount);
+ }
+
+ /**
+ * LOGICAL_OR.
+ *
+ * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.
+ *
+ * Excel Function:
+ * =OR(logical1[,logical2[, ...]])
+ *
+ * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
+ * or references that contain logical values.
+ *
+ * Boolean arguments are treated as True or False as appropriate
+ * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
+ * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
+ * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
+ *
+ * @param mixed $args Data values
+ *
+ * @return bool|string the logical OR of the arguments
+ */
+ public static function logicalOr(...$args)
+ {
+ $args = Functions::flattenArray($args);
+
+ if (count($args) == 0) {
+ return Functions::VALUE();
+ }
+
+ $args = array_filter($args, function ($value) {
+ return $value !== null || (is_string($value) && trim($value) == '');
+ });
+
+ $returnValue = self::countTrueValues($args);
+ if (is_string($returnValue)) {
+ return $returnValue;
+ }
+
+ return $returnValue > 0;
+ }
+
+ /**
+ * LOGICAL_XOR.
+ *
+ * Returns the Exclusive Or logical operation for one or more supplied conditions.
+ * i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE, and FALSE otherwise.
+ *
+ * Excel Function:
+ * =XOR(logical1[,logical2[, ...]])
+ *
+ * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
+ * or references that contain logical values.
+ *
+ * Boolean arguments are treated as True or False as appropriate
+ * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
+ * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
+ * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
+ *
+ * @param mixed $args Data values
+ *
+ * @return bool|string the logical XOR of the arguments
+ */
+ public static function logicalXor(...$args)
+ {
+ $args = Functions::flattenArray($args);
+
+ if (count($args) == 0) {
+ return Functions::VALUE();
+ }
+
+ $args = array_filter($args, function ($value) {
+ return $value !== null || (is_string($value) && trim($value) == '');
+ });
+
+ $returnValue = self::countTrueValues($args);
+ if (is_string($returnValue)) {
+ return $returnValue;
+ }
+
+ return $returnValue % 2 == 1;
+ }
+
+ /**
+ * NOT.
+ *
+ * Returns the boolean inverse of the argument.
+ *
+ * Excel Function:
+ * =NOT(logical)
+ *
+ * The argument must evaluate to a logical value such as TRUE or FALSE
+ *
+ * Boolean arguments are treated as True or False as appropriate
+ * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
+ * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
+ * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
+ *
+ * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
+ *
+ * @return bool|string the boolean inverse of the argument
+ */
+ public static function NOT($logical = false)
+ {
+ $logical = Functions::flattenSingleValue($logical);
+
+ if (is_string($logical)) {
+ $logical = strtoupper($logical);
+ if (($logical == 'TRUE') || ($logical == Calculation::getTRUE())) {
+ return false;
+ } elseif (($logical == 'FALSE') || ($logical == Calculation::getFALSE())) {
+ return true;
+ }
+
+ return Functions::VALUE();
+ }
+
+ return !$logical;
+ }
+
+ /**
+ * STATEMENT_IF.
+ *
+ * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
+ *
+ * Excel Function:
+ * =IF(condition[,returnIfTrue[,returnIfFalse]])
+ *
+ * Condition is any value or expression that can be evaluated to TRUE or FALSE.
+ * For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100,
+ * the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.
+ * This argument can use any comparison calculation operator.
+ * ReturnIfTrue is the value that is returned if condition evaluates to TRUE.
+ * For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE,
+ * then the IF function returns the text "Within budget"
+ * If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use
+ * the logical value TRUE for this argument.
+ * ReturnIfTrue can be another formula.
+ * ReturnIfFalse is the value that is returned if condition evaluates to FALSE.
+ * For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE,
+ * then the IF function returns the text "Over budget".
+ * If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned.
+ * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
+ * ReturnIfFalse can be another formula.
+ *
+ * @param mixed $condition Condition to evaluate
+ * @param mixed $returnIfTrue Value to return when condition is true
+ * @param mixed $returnIfFalse Optional value to return when condition is false
+ *
+ * @return mixed The value of returnIfTrue or returnIfFalse determined by condition
+ */
+ public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
+ {
+ if (Functions::isError($condition)) {
+ return $condition;
+ }
+
+ $condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition);
+ $returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue);
+ $returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse);
+
+ return ($condition) ? $returnIfTrue : $returnIfFalse;
+ }
+
+ /**
+ * STATEMENT_SWITCH.
+ *
+ * Returns corresponding with first match (any data type such as a string, numeric, date, etc).
+ *
+ * Excel Function:
+ * =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default])
+ *
+ * Expression
+ * The expression to compare to a list of values.
+ * value1, value2, ... value_n
+ * A list of values that are compared to expression. The SWITCH function is looking for the first value that matches the expression.
+ * result1, result2, ... result_n
+ * A list of results. The SWITCH function returns the corresponding result when a value matches expression.
+ * default
+ * Optional. It is the default to return if expression does not match any of the values (value1, value2, ... value_n).
+ *
+ * @param mixed $arguments Statement arguments
+ *
+ * @return mixed The value of matched expression
+ */
+ public static function statementSwitch(...$arguments)
+ {
+ $result = Functions::VALUE();
+
+ if (count($arguments) > 0) {
+ $targetValue = Functions::flattenSingleValue($arguments[0]);
+ $argc = count($arguments) - 1;
+ $switchCount = floor($argc / 2);
+ $switchSatisfied = false;
+ $hasDefaultClause = $argc % 2 !== 0;
+ $defaultClause = $argc % 2 === 0 ? null : $arguments[count($arguments) - 1];
+
+ if ($switchCount) {
+ for ($index = 0; $index < $switchCount; ++$index) {
+ if ($targetValue == $arguments[$index * 2 + 1]) {
+ $result = $arguments[$index * 2 + 2];
+ $switchSatisfied = true;
+
+ break;
+ }
+ }
+ }
+
+ if (!$switchSatisfied) {
+ $result = $hasDefaultClause ? $defaultClause : Functions::NA();
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * IFERROR.
+ *
+ * Excel Function:
+ * =IFERROR(testValue,errorpart)
+ *
+ * @param mixed $testValue Value to check, is also the value returned when no error
+ * @param mixed $errorpart Value to return when testValue is an error condition
+ *
+ * @return mixed The value of errorpart or testValue determined by error condition
+ */
+ public static function IFERROR($testValue = '', $errorpart = '')
+ {
+ $testValue = ($testValue === null) ? '' : Functions::flattenSingleValue($testValue);
+ $errorpart = ($errorpart === null) ? '' : Functions::flattenSingleValue($errorpart);
+
+ return self::statementIf(Functions::isError($testValue), $errorpart, $testValue);
+ }
+
+ /**
+ * IFNA.
+ *
+ * Excel Function:
+ * =IFNA(testValue,napart)
+ *
+ * @param mixed $testValue Value to check, is also the value returned when not an NA
+ * @param mixed $napart Value to return when testValue is an NA condition
+ *
+ * @return mixed The value of errorpart or testValue determined by error condition
+ */
+ public static function IFNA($testValue = '', $napart = '')
+ {
+ $testValue = ($testValue === null) ? '' : Functions::flattenSingleValue($testValue);
+ $napart = ($napart === null) ? '' : Functions::flattenSingleValue($napart);
+
+ return self::statementIf(Functions::isNa($testValue), $napart, $testValue);
+ }
+
+ /**
+ * IFS.
+ *
+ * Excel Function:
+ * =IFS(testValue1;returnIfTrue1;testValue2;returnIfTrue2;...;testValue_n;returnIfTrue_n)
+ *
+ * testValue1 ... testValue_n
+ * Conditions to Evaluate
+ * returnIfTrue1 ... returnIfTrue_n
+ * Value returned if corresponding testValue (nth) was true
+ *
+ * @param mixed ...$arguments Statement arguments
+ *
+ * @return mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true
+ */
+ public static function IFS(...$arguments)
+ {
+ if (count($arguments) % 2 != 0) {
+ return Functions::NA();
+ }
+ // We use instance of Exception as a falseValue in order to prevent string collision with value in cell
+ $falseValueException = new Exception();
+ for ($i = 0; $i < count($arguments); $i += 2) {
+ $testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]);
+ $returnIfTrue = ($arguments[$i + 1] === null) ? '' : Functions::flattenSingleValue($arguments[$i + 1]);
+ $result = self::statementIf($testValue, $returnIfTrue, $falseValueException);
+
+ if ($result !== $falseValueException) {
+ return $result;
+ }
+ }
+
+ return Functions::NA();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php
new file mode 100644
index 0000000..ca4bd46
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php
@@ -0,0 +1,968 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Cell\Cell;
+use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
+use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
+use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
+
+class LookupRef
+{
+ /**
+ * CELL_ADDRESS.
+ *
+ * Creates a cell address as text, given specified row and column numbers.
+ *
+ * Excel Function:
+ * =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
+ *
+ * @param mixed $row Row number to use in the cell reference
+ * @param mixed $column Column number to use in the cell reference
+ * @param int $relativity Flag indicating the type of reference to return
+ * 1 or omitted Absolute
+ * 2 Absolute row; relative column
+ * 3 Relative row; absolute column
+ * 4 Relative
+ * @param bool $referenceStyle A logical value that specifies the A1 or R1C1 reference style.
+ * TRUE or omitted CELL_ADDRESS returns an A1-style reference
+ * FALSE CELL_ADDRESS returns an R1C1-style reference
+ * @param string $sheetText Optional Name of worksheet to use
+ *
+ * @return string
+ */
+ public static function cellAddress($row, $column, $relativity = 1, $referenceStyle = true, $sheetText = '')
+ {
+ $row = Functions::flattenSingleValue($row);
+ $column = Functions::flattenSingleValue($column);
+ $relativity = Functions::flattenSingleValue($relativity);
+ $sheetText = Functions::flattenSingleValue($sheetText);
+
+ if (($row < 1) || ($column < 1)) {
+ return Functions::VALUE();
+ }
+
+ if ($sheetText > '') {
+ if (strpos($sheetText, ' ') !== false) {
+ $sheetText = "'" . $sheetText . "'";
+ }
+ $sheetText .= '!';
+ }
+ if ((!is_bool($referenceStyle)) || $referenceStyle) {
+ $rowRelative = $columnRelative = '$';
+ $column = Coordinate::stringFromColumnIndex($column);
+ if (($relativity == 2) || ($relativity == 4)) {
+ $columnRelative = '';
+ }
+ if (($relativity == 3) || ($relativity == 4)) {
+ $rowRelative = '';
+ }
+
+ return $sheetText . $columnRelative . $column . $rowRelative . $row;
+ }
+ if (($relativity == 2) || ($relativity == 4)) {
+ $column = '[' . $column . ']';
+ }
+ if (($relativity == 3) || ($relativity == 4)) {
+ $row = '[' . $row . ']';
+ }
+
+ return $sheetText . 'R' . $row . 'C' . $column;
+ }
+
+ /**
+ * COLUMN.
+ *
+ * Returns the column number of the given cell reference
+ * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array.
+ * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
+ * reference of the cell in which the COLUMN function appears; otherwise this function returns 0.
+ *
+ * Excel Function:
+ * =COLUMN([cellAddress])
+ *
+ * @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers
+ *
+ * @return int|int[]
+ */
+ public static function COLUMN($cellAddress = null)
+ {
+ if ($cellAddress === null || trim($cellAddress) === '') {
+ return 0;
+ }
+
+ if (is_array($cellAddress)) {
+ foreach ($cellAddress as $columnKey => $value) {
+ $columnKey = preg_replace('/[^a-z]/i', '', $columnKey);
+
+ return (int) Coordinate::columnIndexFromString($columnKey);
+ }
+ } else {
+ [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ if (strpos($cellAddress, ':') !== false) {
+ [$startAddress, $endAddress] = explode(':', $cellAddress);
+ $startAddress = preg_replace('/[^a-z]/i', '', $startAddress);
+ $endAddress = preg_replace('/[^a-z]/i', '', $endAddress);
+ $returnValue = [];
+ do {
+ $returnValue[] = (int) Coordinate::columnIndexFromString($startAddress);
+ } while ($startAddress++ != $endAddress);
+
+ return $returnValue;
+ }
+ $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress);
+
+ return (int) Coordinate::columnIndexFromString($cellAddress);
+ }
+ }
+
+ /**
+ * COLUMNS.
+ *
+ * Returns the number of columns in an array or reference.
+ *
+ * Excel Function:
+ * =COLUMNS(cellAddress)
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
+ *
+ * @return int|string The number of columns in cellAddress, or a string if arguments are invalid
+ */
+ public static function COLUMNS($cellAddress = null)
+ {
+ if ($cellAddress === null || $cellAddress === '') {
+ return 1;
+ } elseif (!is_array($cellAddress)) {
+ return Functions::VALUE();
+ }
+
+ reset($cellAddress);
+ $isMatrix = (is_numeric(key($cellAddress)));
+ [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
+
+ if ($isMatrix) {
+ return $rows;
+ }
+
+ return $columns;
+ }
+
+ /**
+ * ROW.
+ *
+ * Returns the row number of the given cell reference
+ * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array.
+ * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
+ * reference of the cell in which the ROW function appears; otherwise this function returns 0.
+ *
+ * Excel Function:
+ * =ROW([cellAddress])
+ *
+ * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers
+ *
+ * @return int|mixed[]|string
+ */
+ public static function ROW($cellAddress = null)
+ {
+ if ($cellAddress === null || trim($cellAddress) === '') {
+ return 0;
+ }
+
+ if (is_array($cellAddress)) {
+ foreach ($cellAddress as $columnKey => $rowValue) {
+ foreach ($rowValue as $rowKey => $cellValue) {
+ return (int) preg_replace('/\D/', '', $rowKey);
+ }
+ }
+ } else {
+ [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ if (strpos($cellAddress, ':') !== false) {
+ [$startAddress, $endAddress] = explode(':', $cellAddress);
+ $startAddress = preg_replace('/\D/', '', $startAddress);
+ $endAddress = preg_replace('/\D/', '', $endAddress);
+ $returnValue = [];
+ do {
+ $returnValue[][] = (int) $startAddress;
+ } while ($startAddress++ != $endAddress);
+
+ return $returnValue;
+ }
+ [$cellAddress] = explode(':', $cellAddress);
+
+ return (int) preg_replace('/\D/', '', $cellAddress);
+ }
+ }
+
+ /**
+ * ROWS.
+ *
+ * Returns the number of rows in an array or reference.
+ *
+ * Excel Function:
+ * =ROWS(cellAddress)
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
+ *
+ * @return int|string The number of rows in cellAddress, or a string if arguments are invalid
+ */
+ public static function ROWS($cellAddress = null)
+ {
+ if ($cellAddress === null || $cellAddress === '') {
+ return 1;
+ } elseif (!is_array($cellAddress)) {
+ return Functions::VALUE();
+ }
+
+ reset($cellAddress);
+ $isMatrix = (is_numeric(key($cellAddress)));
+ [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
+
+ if ($isMatrix) {
+ return $columns;
+ }
+
+ return $rows;
+ }
+
+ /**
+ * HYPERLINK.
+ *
+ * Excel Function:
+ * =HYPERLINK(linkURL,displayName)
+ *
+ * @param string $linkURL Value to check, is also the value returned when no error
+ * @param string $displayName Value to return when testValue is an error condition
+ * @param Cell $pCell The cell to set the hyperlink in
+ *
+ * @return mixed The value of $displayName (or $linkURL if $displayName was blank)
+ */
+ public static function HYPERLINK($linkURL = '', $displayName = null, ?Cell $pCell = null)
+ {
+ $linkURL = ($linkURL === null) ? '' : Functions::flattenSingleValue($linkURL);
+ $displayName = ($displayName === null) ? '' : Functions::flattenSingleValue($displayName);
+
+ if ((!is_object($pCell)) || (trim($linkURL) == '')) {
+ return Functions::REF();
+ }
+
+ if ((is_object($displayName)) || trim($displayName) == '') {
+ $displayName = $linkURL;
+ }
+
+ $pCell->getHyperlink()->setUrl($linkURL);
+ $pCell->getHyperlink()->setTooltip($displayName);
+
+ return $displayName;
+ }
+
+ /**
+ * INDIRECT.
+ *
+ * Returns the reference specified by a text string.
+ * References are immediately evaluated to display their contents.
+ *
+ * Excel Function:
+ * =INDIRECT(cellAddress)
+ *
+ * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
+ *
+ * @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula)
+ * @param Cell $pCell The current cell (containing this formula)
+ *
+ * @return mixed The cells referenced by cellAddress
+ *
+ * @TODO Support for the optional a1 parameter introduced in Excel 2010
+ */
+ public static function INDIRECT($cellAddress = null, ?Cell $pCell = null)
+ {
+ $cellAddress = Functions::flattenSingleValue($cellAddress);
+ if ($cellAddress === null || $cellAddress === '') {
+ return Functions::REF();
+ }
+
+ $cellAddress1 = $cellAddress;
+ $cellAddress2 = null;
+ if (strpos($cellAddress, ':') !== false) {
+ [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);
+ }
+
+ if (
+ (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
+ (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))
+ ) {
+ if (!preg_match('/^' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '$/i', $cellAddress1, $matches)) {
+ return Functions::REF();
+ }
+
+ if (strpos($cellAddress, '!') !== false) {
+ [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ $sheetName = trim($sheetName, "'");
+ $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
+ } else {
+ $pSheet = $pCell->getWorksheet();
+ }
+
+ return Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, false);
+ }
+
+ if (strpos($cellAddress, '!') !== false) {
+ [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ $sheetName = trim($sheetName, "'");
+ $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
+ } else {
+ $pSheet = $pCell->getWorksheet();
+ }
+
+ return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false);
+ }
+
+ /**
+ * OFFSET.
+ *
+ * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.
+ * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and
+ * the number of columns to be returned.
+ *
+ * Excel Function:
+ * =OFFSET(cellAddress, rows, cols, [height], [width])
+ *
+ * @param null|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
+ * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
+ * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to.
+ * Using 5 as the rows argument specifies that the upper-left cell in the reference is
+ * five rows below reference. Rows can be positive (which means below the starting reference)
+ * or negative (which means above the starting reference).
+ * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result
+ * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the
+ * reference is five columns to the right of reference. Cols can be positive (which means
+ * to the right of the starting reference) or negative (which means to the left of the
+ * starting reference).
+ * @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
+ * @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
+ *
+ * @return string A reference to a cell or range of cells
+ */
+ public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $pCell = null)
+ {
+ $rows = Functions::flattenSingleValue($rows);
+ $columns = Functions::flattenSingleValue($columns);
+ $height = Functions::flattenSingleValue($height);
+ $width = Functions::flattenSingleValue($width);
+ if ($cellAddress === null) {
+ return 0;
+ }
+
+ if (!is_object($pCell)) {
+ return Functions::REF();
+ }
+
+ $sheetName = null;
+ if (strpos($cellAddress, '!')) {
+ [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ $sheetName = trim($sheetName, "'");
+ }
+ if (strpos($cellAddress, ':')) {
+ [$startCell, $endCell] = explode(':', $cellAddress);
+ } else {
+ $startCell = $endCell = $cellAddress;
+ }
+ [$startCellColumn, $startCellRow] = Coordinate::coordinateFromString($startCell);
+ [$endCellColumn, $endCellRow] = Coordinate::coordinateFromString($endCell);
+
+ $startCellRow += $rows;
+ $startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1;
+ $startCellColumn += $columns;
+
+ if (($startCellRow <= 0) || ($startCellColumn < 0)) {
+ return Functions::REF();
+ }
+ $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1;
+ if (($width != null) && (!is_object($width))) {
+ $endCellColumn = $startCellColumn + $width - 1;
+ } else {
+ $endCellColumn += $columns;
+ }
+ $startCellColumn = Coordinate::stringFromColumnIndex($startCellColumn + 1);
+
+ if (($height != null) && (!is_object($height))) {
+ $endCellRow = $startCellRow + $height - 1;
+ } else {
+ $endCellRow += $rows;
+ }
+
+ if (($endCellRow <= 0) || ($endCellColumn < 0)) {
+ return Functions::REF();
+ }
+ $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1);
+
+ $cellAddress = $startCellColumn . $startCellRow;
+ if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {
+ $cellAddress .= ':' . $endCellColumn . $endCellRow;
+ }
+
+ if ($sheetName !== null) {
+ $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
+ } else {
+ $pSheet = $pCell->getWorksheet();
+ }
+
+ return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false);
+ }
+
+ /**
+ * CHOOSE.
+ *
+ * Uses lookup_value to return a value from the list of value arguments.
+ * Use CHOOSE to select one of up to 254 values based on the lookup_value.
+ *
+ * Excel Function:
+ * =CHOOSE(index_num, value1, [value2], ...)
+ *
+ * @return mixed The selected value
+ */
+ public static function CHOOSE(...$chooseArgs)
+ {
+ $chosenEntry = Functions::flattenArray(array_shift($chooseArgs));
+ $entryCount = count($chooseArgs) - 1;
+
+ if (is_array($chosenEntry)) {
+ $chosenEntry = array_shift($chosenEntry);
+ }
+ if ((is_numeric($chosenEntry)) && (!is_bool($chosenEntry))) {
+ --$chosenEntry;
+ } else {
+ return Functions::VALUE();
+ }
+ $chosenEntry = floor($chosenEntry);
+ if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) {
+ return Functions::VALUE();
+ }
+
+ if (is_array($chooseArgs[$chosenEntry])) {
+ return Functions::flattenArray($chooseArgs[$chosenEntry]);
+ }
+
+ return $chooseArgs[$chosenEntry];
+ }
+
+ /**
+ * MATCH.
+ *
+ * The MATCH function searches for a specified item in a range of cells
+ *
+ * Excel Function:
+ * =MATCH(lookup_value, lookup_array, [match_type])
+ *
+ * @param mixed $lookupValue The value that you want to match in lookup_array
+ * @param mixed $lookupArray The range of cells being searched
+ * @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below.
+ * If match_type is 1 or -1, the list has to be ordered.
+ *
+ * @return int|string The relative position of the found item
+ */
+ public static function MATCH($lookupValue, $lookupArray, $matchType = 1)
+ {
+ $lookupArray = Functions::flattenArray($lookupArray);
+ $lookupValue = Functions::flattenSingleValue($lookupValue);
+ $matchType = ($matchType === null) ? 1 : (int) Functions::flattenSingleValue($matchType);
+
+ // MATCH is not case sensitive, so we convert lookup value to be lower cased in case it's string type.
+ if (is_string($lookupValue)) {
+ $lookupValue = StringHelper::strToLower($lookupValue);
+ }
+
+ // Lookup_value type has to be number, text, or logical values
+ if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {
+ return Functions::NA();
+ }
+
+ // Match_type is 0, 1 or -1
+ if (($matchType !== 0) && ($matchType !== -1) && ($matchType !== 1)) {
+ return Functions::NA();
+ }
+
+ // Lookup_array should not be empty
+ $lookupArraySize = count($lookupArray);
+ if ($lookupArraySize <= 0) {
+ return Functions::NA();
+ }
+
+ if ($matchType == 1) {
+ // If match_type is 1 the list has to be processed from last to first
+
+ $lookupArray = array_reverse($lookupArray);
+ $keySet = array_reverse(array_keys($lookupArray));
+ }
+
+ // Lookup_array should contain only number, text, or logical values, or empty (null) cells
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ // check the type of the value
+ if (
+ (!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) &&
+ (!is_bool($lookupArrayValue)) && ($lookupArrayValue !== null)
+ ) {
+ return Functions::NA();
+ }
+ // Convert strings to lowercase for case-insensitive testing
+ if (is_string($lookupArrayValue)) {
+ $lookupArray[$i] = StringHelper::strToLower($lookupArrayValue);
+ }
+ if (($lookupArrayValue === null) && (($matchType == 1) || ($matchType == -1))) {
+ unset($lookupArray[$i]);
+ }
+ }
+
+ // **
+ // find the match
+ // **
+
+ if ($matchType === 0 || $matchType === 1) {
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ $typeMatch = ((gettype($lookupValue) === gettype($lookupArrayValue)) || (is_numeric($lookupValue) && is_numeric($lookupArrayValue)));
+ $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue;
+ $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue;
+ $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch;
+
+ if ($matchType === 0) {
+ if ($typeMatch && is_string($lookupValue) && (bool) preg_match('/([\?\*])/', $lookupValue)) {
+ $splitString = $lookupValue;
+ $chars = array_map(function ($i) use ($splitString) {
+ return mb_substr($splitString, $i, 1);
+ }, range(0, mb_strlen($splitString) - 1));
+
+ $length = count($chars);
+ $pattern = '/^';
+ for ($j = 0; $j < $length; ++$j) {
+ if ($chars[$j] === '~') {
+ if (isset($chars[$j + 1])) {
+ if ($chars[$j + 1] === '*') {
+ $pattern .= preg_quote($chars[$j + 1], '/');
+ ++$j;
+ } elseif ($chars[$j + 1] === '?') {
+ $pattern .= preg_quote($chars[$j + 1], '/');
+ ++$j;
+ }
+ } else {
+ $pattern .= preg_quote($chars[$j], '/');
+ }
+ } elseif ($chars[$j] === '*') {
+ $pattern .= '.*';
+ } elseif ($chars[$j] === '?') {
+ $pattern .= '.{1}';
+ } else {
+ $pattern .= preg_quote($chars[$j], '/');
+ }
+ }
+
+ $pattern .= '$/';
+ if ((bool) preg_match($pattern, $lookupArrayValue)) {
+ // exact match
+ return $i + 1;
+ }
+ } elseif ($exactMatch) {
+ // exact match
+ return $i + 1;
+ }
+ } elseif (($matchType === 1) && $typeMatch && ($lookupArrayValue <= $lookupValue)) {
+ $i = array_search($i, $keySet);
+
+ // The current value is the (first) match
+ return $i + 1;
+ }
+ }
+ } else {
+ $maxValueKey = null;
+
+ // The basic algorithm is:
+ // Iterate and keep the highest match until the next element is smaller than the searched value.
+ // Return immediately if perfect match is found
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue);
+ $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue;
+ $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue;
+ $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch;
+
+ if ($exactMatch) {
+ // Another "special" case. If a perfect match is found,
+ // the algorithm gives up immediately
+ return $i + 1;
+ } elseif ($typeMatch & $lookupArrayValue >= $lookupValue) {
+ $maxValueKey = $i + 1;
+ } elseif ($typeMatch & $lookupArrayValue < $lookupValue) {
+ //Excel algorithm gives up immediately if the first element is smaller than the searched value
+ break;
+ }
+ }
+
+ if ($maxValueKey !== null) {
+ return $maxValueKey;
+ }
+ }
+
+ // Unsuccessful in finding a match, return #N/A error value
+ return Functions::NA();
+ }
+
+ /**
+ * INDEX.
+ *
+ * Uses an index to choose a value from a reference or array
+ *
+ * Excel Function:
+ * =INDEX(range_array, row_num, [column_num])
+ *
+ * @param mixed $arrayValues A range of cells or an array constant
+ * @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required.
+ * @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required.
+ *
+ * @return mixed the value of a specified cell or array of cells
+ */
+ public static function INDEX($arrayValues, $rowNum = 0, $columnNum = 0)
+ {
+ $rowNum = Functions::flattenSingleValue($rowNum);
+ $columnNum = Functions::flattenSingleValue($columnNum);
+
+ if (($rowNum < 0) || ($columnNum < 0)) {
+ return Functions::VALUE();
+ }
+
+ if (!is_array($arrayValues) || ($rowNum > count($arrayValues))) {
+ return Functions::REF();
+ }
+
+ $rowKeys = array_keys($arrayValues);
+ $columnKeys = @array_keys($arrayValues[$rowKeys[0]]);
+
+ if ($columnNum > count($columnKeys)) {
+ return Functions::VALUE();
+ } elseif ($columnNum == 0) {
+ if ($rowNum == 0) {
+ return $arrayValues;
+ }
+ $rowNum = $rowKeys[--$rowNum];
+ $returnArray = [];
+ foreach ($arrayValues as $arrayColumn) {
+ if (is_array($arrayColumn)) {
+ if (isset($arrayColumn[$rowNum])) {
+ $returnArray[] = $arrayColumn[$rowNum];
+ } else {
+ return [$rowNum => $arrayValues[$rowNum]];
+ }
+ } else {
+ return $arrayValues[$rowNum];
+ }
+ }
+
+ return $returnArray;
+ }
+ $columnNum = $columnKeys[--$columnNum];
+ if ($rowNum > count($rowKeys)) {
+ return Functions::VALUE();
+ } elseif ($rowNum == 0) {
+ return $arrayValues[$columnNum];
+ }
+ $rowNum = $rowKeys[--$rowNum];
+
+ return $arrayValues[$rowNum][$columnNum];
+ }
+
+ /**
+ * TRANSPOSE.
+ *
+ * @param array $matrixData A matrix of values
+ *
+ * @return array
+ *
+ * Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix
+ */
+ public static function TRANSPOSE($matrixData)
+ {
+ $returnMatrix = [];
+ if (!is_array($matrixData)) {
+ $matrixData = [[$matrixData]];
+ }
+
+ $column = 0;
+ foreach ($matrixData as $matrixRow) {
+ $row = 0;
+ foreach ($matrixRow as $matrixCell) {
+ $returnMatrix[$row][$column] = $matrixCell;
+ ++$row;
+ }
+ ++$column;
+ }
+
+ return $returnMatrix;
+ }
+
+ private static function vlookupSort($a, $b)
+ {
+ reset($a);
+ $firstColumn = key($a);
+ $aLower = StringHelper::strToLower($a[$firstColumn]);
+ $bLower = StringHelper::strToLower($b[$firstColumn]);
+ if ($aLower == $bLower) {
+ return 0;
+ }
+
+ return ($aLower < $bLower) ? -1 : 1;
+ }
+
+ /**
+ * VLOOKUP
+ * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number.
+ *
+ * @param mixed $lookup_value The value that you want to match in lookup_array
+ * @param mixed $lookup_array The range of cells being searched
+ * @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1.
+ * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
+ *
+ * @return mixed The value of the found cell
+ */
+ public static function VLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true)
+ {
+ $lookup_value = Functions::flattenSingleValue($lookup_value);
+ $index_number = Functions::flattenSingleValue($index_number);
+ $not_exact_match = Functions::flattenSingleValue($not_exact_match);
+
+ // index_number must be greater than or equal to 1
+ if ($index_number < 1) {
+ return Functions::VALUE();
+ }
+
+ // index_number must be less than or equal to the number of columns in lookup_array
+ if ((!is_array($lookup_array)) || (empty($lookup_array))) {
+ return Functions::REF();
+ }
+ $f = array_keys($lookup_array);
+ $firstRow = array_pop($f);
+ if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) {
+ return Functions::REF();
+ }
+ $columnKeys = array_keys($lookup_array[$firstRow]);
+ $returnColumn = $columnKeys[--$index_number];
+ $firstColumn = array_shift($columnKeys);
+
+ if (!$not_exact_match) {
+ uasort($lookup_array, ['self', 'vlookupSort']);
+ }
+
+ $lookupLower = StringHelper::strToLower($lookup_value);
+ $rowNumber = $rowValue = false;
+ foreach ($lookup_array as $rowKey => $rowData) {
+ $firstLower = StringHelper::strToLower($rowData[$firstColumn]);
+
+ // break if we have passed possible keys
+ if (
+ (is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) ||
+ (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && ($firstLower > $lookupLower))
+ ) {
+ break;
+ }
+ // remember the last key, but only if datatypes match
+ if (
+ (is_numeric($lookup_value) && is_numeric($rowData[$firstColumn])) ||
+ (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]))
+ ) {
+ if ($not_exact_match) {
+ $rowNumber = $rowKey;
+
+ continue;
+ } elseif (
+ ($firstLower == $lookupLower)
+ // Spreadsheets software returns first exact match,
+ // we have sorted and we might have broken key orders
+ // we want the first one (by its initial index)
+ && (($rowNumber == false) || ($rowKey < $rowNumber))
+ ) {
+ $rowNumber = $rowKey;
+ }
+ }
+ }
+
+ if ($rowNumber !== false) {
+ // return the appropriate value
+ return $lookup_array[$rowNumber][$returnColumn];
+ }
+
+ return Functions::NA();
+ }
+
+ /**
+ * HLOOKUP
+ * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number.
+ *
+ * @param mixed $lookup_value The value that you want to match in lookup_array
+ * @param mixed $lookup_array The range of cells being searched
+ * @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1.
+ * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
+ *
+ * @return mixed The value of the found cell
+ */
+ public static function HLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true)
+ {
+ $lookup_value = Functions::flattenSingleValue($lookup_value);
+ $index_number = Functions::flattenSingleValue($index_number);
+ $not_exact_match = Functions::flattenSingleValue($not_exact_match);
+
+ // index_number must be greater than or equal to 1
+ if ($index_number < 1) {
+ return Functions::VALUE();
+ }
+
+ // index_number must be less than or equal to the number of columns in lookup_array
+ if ((!is_array($lookup_array)) || (empty($lookup_array))) {
+ return Functions::REF();
+ }
+ $f = array_keys($lookup_array);
+ $firstRow = reset($f);
+ if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array))) {
+ return Functions::REF();
+ }
+
+ $firstkey = $f[0] - 1;
+ $returnColumn = $firstkey + $index_number;
+ $firstColumn = array_shift($f);
+ $rowNumber = null;
+ foreach ($lookup_array[$firstColumn] as $rowKey => $rowData) {
+ // break if we have passed possible keys
+ $bothNumeric = is_numeric($lookup_value) && is_numeric($rowData);
+ $bothNotNumeric = !is_numeric($lookup_value) && !is_numeric($rowData);
+ $lookupLower = StringHelper::strToLower($lookup_value);
+ $rowDataLower = StringHelper::strToLower($rowData);
+
+ if (
+ $not_exact_match && (
+ ($bothNumeric && $rowData > $lookup_value) ||
+ ($bothNotNumeric && $rowDataLower > $lookupLower)
+ )
+ ) {
+ break;
+ }
+
+ // Remember the last key, but only if datatypes match (as in VLOOKUP)
+ if ($bothNumeric || $bothNotNumeric) {
+ if ($not_exact_match) {
+ $rowNumber = $rowKey;
+
+ continue;
+ } elseif (
+ $rowDataLower === $lookupLower
+ && ($rowNumber === null || $rowKey < $rowNumber)
+ ) {
+ $rowNumber = $rowKey;
+ }
+ }
+ }
+
+ if ($rowNumber !== null) {
+ // otherwise return the appropriate value
+ return $lookup_array[$returnColumn][$rowNumber];
+ }
+
+ return Functions::NA();
+ }
+
+ /**
+ * LOOKUP
+ * The LOOKUP function searches for value either from a one-row or one-column range or from an array.
+ *
+ * @param mixed $lookup_value The value that you want to match in lookup_array
+ * @param mixed $lookup_vector The range of cells being searched
+ * @param null|mixed $result_vector The column from which the matching value must be returned
+ *
+ * @return mixed The value of the found cell
+ */
+ public static function LOOKUP($lookup_value, $lookup_vector, $result_vector = null)
+ {
+ $lookup_value = Functions::flattenSingleValue($lookup_value);
+
+ if (!is_array($lookup_vector)) {
+ return Functions::NA();
+ }
+ $hasResultVector = isset($result_vector);
+ $lookupRows = count($lookup_vector);
+ $l = array_keys($lookup_vector);
+ $l = array_shift($l);
+ $lookupColumns = count($lookup_vector[$l]);
+ // we correctly orient our results
+ if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) {
+ $lookup_vector = self::TRANSPOSE($lookup_vector);
+ $lookupRows = count($lookup_vector);
+ $l = array_keys($lookup_vector);
+ $lookupColumns = count($lookup_vector[array_shift($l)]);
+ }
+
+ if ($result_vector === null) {
+ $result_vector = $lookup_vector;
+ }
+ $resultRows = count($result_vector);
+ $l = array_keys($result_vector);
+ $l = array_shift($l);
+ $resultColumns = count($result_vector[$l]);
+ // we correctly orient our results
+ if ($resultRows === 1 && $resultColumns > 1) {
+ $result_vector = self::TRANSPOSE($result_vector);
+ $resultRows = count($result_vector);
+ $r = array_keys($result_vector);
+ $resultColumns = count($result_vector[array_shift($r)]);
+ }
+
+ if ($lookupRows === 2 && !$hasResultVector) {
+ $result_vector = array_pop($lookup_vector);
+ $lookup_vector = array_shift($lookup_vector);
+ }
+
+ if ($lookupColumns !== 2) {
+ foreach ($lookup_vector as &$value) {
+ if (is_array($value)) {
+ $k = array_keys($value);
+ $key1 = $key2 = array_shift($k);
+ ++$key2;
+ $dataValue1 = $value[$key1];
+ } else {
+ $key1 = 0;
+ $key2 = 1;
+ $dataValue1 = $value;
+ }
+ $dataValue2 = array_shift($result_vector);
+ if (is_array($dataValue2)) {
+ $dataValue2 = array_shift($dataValue2);
+ }
+ $value = [$key1 => $dataValue1, $key2 => $dataValue2];
+ }
+ unset($value);
+ }
+
+ return self::VLOOKUP($lookup_value, $lookup_vector, 2);
+ }
+
+ /**
+ * FORMULATEXT.
+ *
+ * @param mixed $cellReference The cell to check
+ * @param Cell $pCell The current cell (containing this formula)
+ *
+ * @return string
+ */
+ public static function FORMULATEXT($cellReference = '', ?Cell $pCell = null)
+ {
+ if ($pCell === null) {
+ return Functions::REF();
+ }
+
+ preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
+
+ $cellReference = $matches[6] . $matches[7];
+ $worksheetName = trim($matches[3], "'");
+ $worksheet = (!empty($worksheetName))
+ ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName)
+ : $pCell->getWorksheet();
+
+ if (!$worksheet->getCell($cellReference)->isFormula()) {
+ return Functions::NA();
+ }
+
+ return $worksheet->getCell($cellReference)->getValue();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
new file mode 100644
index 0000000..e39cf02
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
@@ -0,0 +1,1815 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use Exception;
+use Matrix\Exception as MatrixException;
+use Matrix\Matrix;
+
+class MathTrig
+{
+ //
+ // Private method to return an array of the factors of the input value
+ //
+ private static function factors($value)
+ {
+ $startVal = floor(sqrt($value));
+
+ $factorArray = [];
+ for ($i = $startVal; $i > 1; --$i) {
+ if (($value % $i) == 0) {
+ $factorArray = array_merge($factorArray, self::factors($value / $i));
+ $factorArray = array_merge($factorArray, self::factors($i));
+ if ($i <= sqrt($value)) {
+ break;
+ }
+ }
+ }
+ if (!empty($factorArray)) {
+ rsort($factorArray);
+
+ return $factorArray;
+ }
+
+ return [(int) $value];
+ }
+
+ private static function romanCut($num, $n)
+ {
+ return ($num - ($num % $n)) / $n;
+ }
+
+ /**
+ * ARABIC.
+ *
+ * Converts a Roman numeral to an Arabic numeral.
+ *
+ * Excel Function:
+ * ARABIC(text)
+ *
+ * @param string $roman
+ *
+ * @return int|string the arabic numberal contrived from the roman numeral
+ */
+ public static function ARABIC($roman)
+ {
+ // An empty string should return 0
+ $roman = substr(trim(strtoupper((string) Functions::flattenSingleValue($roman))), 0, 255);
+ if ($roman === '') {
+ return 0;
+ }
+
+ // Convert the roman numeral to an arabic number
+ $negativeNumber = $roman[0] === '-';
+ if ($negativeNumber) {
+ $roman = substr($roman, 1);
+ }
+
+ try {
+ $arabic = self::calculateArabic(str_split($roman));
+ } catch (Exception $e) {
+ return Functions::VALUE(); // Invalid character detected
+ }
+
+ if ($negativeNumber) {
+ $arabic *= -1; // The number should be negative
+ }
+
+ return $arabic;
+ }
+
+ /**
+ * Recursively calculate the arabic value of a roman numeral.
+ *
+ * @param int $sum
+ * @param int $subtract
+ *
+ * @return int
+ */
+ protected static function calculateArabic(array $roman, &$sum = 0, $subtract = 0)
+ {
+ $lookup = [
+ 'M' => 1000,
+ 'D' => 500,
+ 'C' => 100,
+ 'L' => 50,
+ 'X' => 10,
+ 'V' => 5,
+ 'I' => 1,
+ ];
+
+ $numeral = array_shift($roman);
+ if (!isset($lookup[$numeral])) {
+ throw new Exception('Invalid character detected');
+ }
+
+ $arabic = $lookup[$numeral];
+ if (count($roman) > 0 && isset($lookup[$roman[0]]) && $arabic < $lookup[$roman[0]]) {
+ $subtract += $arabic;
+ } else {
+ $sum += ($arabic - $subtract);
+ $subtract = 0;
+ }
+
+ if (count($roman) > 0) {
+ self::calculateArabic($roman, $sum, $subtract);
+ }
+
+ return $sum;
+ }
+
+ /**
+ * ATAN2.
+ *
+ * This function calculates the arc tangent of the two variables x and y. It is similar to
+ * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used
+ * to determine the quadrant of the result.
+ * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a
+ * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between
+ * -pi and pi, excluding -pi.
+ *
+ * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard
+ * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.
+ *
+ * Excel Function:
+ * ATAN2(xCoordinate,yCoordinate)
+ *
+ * @param float $xCoordinate the x-coordinate of the point
+ * @param float $yCoordinate the y-coordinate of the point
+ *
+ * @return float|string the inverse tangent of the specified x- and y-coordinates, or a string containing an error
+ */
+ public static function ATAN2($xCoordinate = null, $yCoordinate = null)
+ {
+ $xCoordinate = Functions::flattenSingleValue($xCoordinate);
+ $yCoordinate = Functions::flattenSingleValue($yCoordinate);
+
+ $xCoordinate = ($xCoordinate !== null) ? $xCoordinate : 0.0;
+ $yCoordinate = ($yCoordinate !== null) ? $yCoordinate : 0.0;
+
+ if (
+ ((is_numeric($xCoordinate)) || (is_bool($xCoordinate))) &&
+ ((is_numeric($yCoordinate))) || (is_bool($yCoordinate))
+ ) {
+ $xCoordinate = (float) $xCoordinate;
+ $yCoordinate = (float) $yCoordinate;
+
+ if (($xCoordinate == 0) && ($yCoordinate == 0)) {
+ return Functions::DIV0();
+ }
+
+ return atan2($yCoordinate, $xCoordinate);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * BASE.
+ *
+ * Converts a number into a text representation with the given radix (base).
+ *
+ * Excel Function:
+ * BASE(Number, Radix [Min_length])
+ *
+ * @param float $number
+ * @param float $radix
+ * @param int $minLength
+ *
+ * @return string the text representation with the given radix (base)
+ */
+ public static function BASE($number, $radix, $minLength = null)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $radix = Functions::flattenSingleValue($radix);
+ $minLength = Functions::flattenSingleValue($minLength);
+
+ if (is_numeric($number) && is_numeric($radix) && ($minLength === null || is_numeric($minLength))) {
+ // Truncate to an integer
+ $number = (int) $number;
+ $radix = (int) $radix;
+ $minLength = (int) $minLength;
+
+ if ($number < 0 || $number >= 2 ** 53 || $radix < 2 || $radix > 36) {
+ return Functions::NAN(); // Numeric range constraints
+ }
+
+ $outcome = strtoupper((string) base_convert($number, 10, $radix));
+ if ($minLength !== null) {
+ $outcome = str_pad($outcome, $minLength, '0', STR_PAD_LEFT); // String padding
+ }
+
+ return $outcome;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * CEILING.
+ *
+ * Returns number rounded up, away from zero, to the nearest multiple of significance.
+ * For example, if you want to avoid using pennies in your prices and your product is
+ * priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the
+ * nearest nickel.
+ *
+ * Excel Function:
+ * CEILING(number[,significance])
+ *
+ * @param float $number the number you want to round
+ * @param float $significance the multiple to which you want to round
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function CEILING($number, $significance = null)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $significance = Functions::flattenSingleValue($significance);
+
+ if (
+ ($significance === null) &&
+ (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)
+ ) {
+ $significance = $number / abs($number);
+ }
+
+ if ((is_numeric($number)) && (is_numeric($significance))) {
+ if (($number == 0.0) || ($significance == 0.0)) {
+ return 0.0;
+ } elseif (self::SIGN($number) == self::SIGN($significance)) {
+ return ceil($number / $significance) * $significance;
+ }
+
+ return Functions::NAN();
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * COMBIN.
+ *
+ * Returns the number of combinations for a given number of items. Use COMBIN to
+ * determine the total possible number of groups for a given number of items.
+ *
+ * Excel Function:
+ * COMBIN(numObjs,numInSet)
+ *
+ * @param int $numObjs Number of different objects
+ * @param int $numInSet Number of objects in each combination
+ *
+ * @return int|string Number of combinations, or a string containing an error
+ */
+ public static function COMBIN($numObjs, $numInSet)
+ {
+ $numObjs = Functions::flattenSingleValue($numObjs);
+ $numInSet = Functions::flattenSingleValue($numInSet);
+
+ if ((is_numeric($numObjs)) && (is_numeric($numInSet))) {
+ if ($numObjs < $numInSet) {
+ return Functions::NAN();
+ } elseif ($numInSet < 0) {
+ return Functions::NAN();
+ }
+
+ return round(self::FACT($numObjs) / self::FACT($numObjs - $numInSet)) / self::FACT($numInSet);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * EVEN.
+ *
+ * Returns number rounded up to the nearest even integer.
+ * You can use this function for processing items that come in twos. For example,
+ * a packing crate accepts rows of one or two items. The crate is full when
+ * the number of items, rounded up to the nearest two, matches the crate's
+ * capacity.
+ *
+ * Excel Function:
+ * EVEN(number)
+ *
+ * @param float $number Number to round
+ *
+ * @return int|string Rounded Number, or a string containing an error
+ */
+ public static function EVEN($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if ($number === null) {
+ return 0;
+ } elseif (is_bool($number)) {
+ $number = (int) $number;
+ }
+
+ if (is_numeric($number)) {
+ $significance = 2 * self::SIGN($number);
+
+ return (int) self::CEILING($number, $significance);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FACT.
+ *
+ * Returns the factorial of a number.
+ * The factorial of a number is equal to 1*2*3*...* number.
+ *
+ * Excel Function:
+ * FACT(factVal)
+ *
+ * @param float $factVal Factorial Value
+ *
+ * @return int|string Factorial, or a string containing an error
+ */
+ public static function FACT($factVal)
+ {
+ $factVal = Functions::flattenSingleValue($factVal);
+
+ if (is_numeric($factVal)) {
+ if ($factVal < 0) {
+ return Functions::NAN();
+ }
+ $factLoop = floor($factVal);
+ if (
+ (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) &&
+ ($factVal > $factLoop)
+ ) {
+ return Functions::NAN();
+ }
+
+ $factorial = 1;
+ while ($factLoop > 1) {
+ $factorial *= $factLoop--;
+ }
+
+ return $factorial;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FACTDOUBLE.
+ *
+ * Returns the double factorial of a number.
+ *
+ * Excel Function:
+ * FACTDOUBLE(factVal)
+ *
+ * @param float $factVal Factorial Value
+ *
+ * @return int|string Double Factorial, or a string containing an error
+ */
+ public static function FACTDOUBLE($factVal)
+ {
+ $factLoop = Functions::flattenSingleValue($factVal);
+
+ if (is_numeric($factLoop)) {
+ $factLoop = floor($factLoop);
+ if ($factVal < 0) {
+ return Functions::NAN();
+ }
+ $factorial = 1;
+ while ($factLoop > 1) {
+ $factorial *= $factLoop--;
+ --$factLoop;
+ }
+
+ return $factorial;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FLOOR.
+ *
+ * Rounds number down, toward zero, to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * FLOOR(number[,significance])
+ *
+ * @param float $number Number to round
+ * @param float $significance Significance
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function FLOOR($number, $significance = null)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $significance = Functions::flattenSingleValue($significance);
+
+ if (
+ ($significance === null) &&
+ (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)
+ ) {
+ $significance = $number / abs($number);
+ }
+
+ if ((is_numeric($number)) && (is_numeric($significance))) {
+ if ($significance == 0.0) {
+ return Functions::DIV0();
+ } elseif ($number == 0.0) {
+ return 0.0;
+ } elseif (self::SIGN($significance) == 1) {
+ return floor($number / $significance) * $significance;
+ } elseif (self::SIGN($number) == -1 && self::SIGN($significance) == -1) {
+ return floor($number / $significance) * $significance;
+ }
+
+ return Functions::NAN();
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FLOOR.MATH.
+ *
+ * Round a number down to the nearest integer or to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * FLOOR.MATH(number[,significance[,mode]])
+ *
+ * @param float $number Number to round
+ * @param float $significance Significance
+ * @param int $mode direction to round negative numbers
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function FLOORMATH($number, $significance = null, $mode = 0)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $significance = Functions::flattenSingleValue($significance);
+ $mode = Functions::flattenSingleValue($mode);
+
+ if (is_numeric($number) && $significance === null) {
+ $significance = $number / abs($number);
+ }
+
+ if (is_numeric($number) && is_numeric($significance) && is_numeric($mode)) {
+ if ($significance == 0.0) {
+ return Functions::DIV0();
+ } elseif ($number == 0.0) {
+ return 0.0;
+ } elseif (self::SIGN($significance) == -1 || (self::SIGN($number) == -1 && !empty($mode))) {
+ return ceil($number / $significance) * $significance;
+ }
+
+ return floor($number / $significance) * $significance;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FLOOR.PRECISE.
+ *
+ * Rounds number down, toward zero, to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * FLOOR.PRECISE(number[,significance])
+ *
+ * @param float $number Number to round
+ * @param float $significance Significance
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function FLOORPRECISE($number, $significance = 1)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $significance = Functions::flattenSingleValue($significance);
+
+ if ((is_numeric($number)) && (is_numeric($significance))) {
+ if ($significance == 0.0) {
+ return Functions::DIV0();
+ } elseif ($number == 0.0) {
+ return 0.0;
+ }
+
+ return floor($number / abs($significance)) * abs($significance);
+ }
+
+ return Functions::VALUE();
+ }
+
+ private static function evaluateGCD($a, $b)
+ {
+ return $b ? self::evaluateGCD($b, $a % $b) : $a;
+ }
+
+ /**
+ * GCD.
+ *
+ * Returns the greatest common divisor of a series of numbers.
+ * The greatest common divisor is the largest integer that divides both
+ * number1 and number2 without a remainder.
+ *
+ * Excel Function:
+ * GCD(number1[,number2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int|mixed|string Greatest Common Divisor, or a string containing an error
+ */
+ public static function GCD(...$args)
+ {
+ $args = Functions::flattenArray($args);
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $value) {
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ } elseif ($value < 0) {
+ return Functions::NAN();
+ }
+ }
+
+ $gcd = (int) array_pop($args);
+ do {
+ $gcd = self::evaluateGCD($gcd, (int) array_pop($args));
+ } while (!empty($args));
+
+ return $gcd;
+ }
+
+ /**
+ * INT.
+ *
+ * Casts a floating point value to an integer
+ *
+ * Excel Function:
+ * INT(number)
+ *
+ * @param float $number Number to cast to an integer
+ *
+ * @return int|string Integer value, or a string containing an error
+ */
+ public static function INT($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if ($number === null) {
+ return 0;
+ } elseif (is_bool($number)) {
+ return (int) $number;
+ }
+ if (is_numeric($number)) {
+ return (int) floor($number);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * LCM.
+ *
+ * Returns the lowest common multiplier of a series of numbers
+ * The least common multiple is the smallest positive integer that is a multiple
+ * of all integer arguments number1, number2, and so on. Use LCM to add fractions
+ * with different denominators.
+ *
+ * Excel Function:
+ * LCM(number1[,number2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int|string Lowest Common Multiplier, or a string containing an error
+ */
+ public static function LCM(...$args)
+ {
+ $returnValue = 1;
+ $allPoweredFactors = [];
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $value) {
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ }
+ if ($value == 0) {
+ return 0;
+ } elseif ($value < 0) {
+ return Functions::NAN();
+ }
+ $myFactors = self::factors(floor($value));
+ $myCountedFactors = array_count_values($myFactors);
+ $myPoweredFactors = [];
+ foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) {
+ $myPoweredFactors[$myCountedFactor] = $myCountedFactor ** $myCountedPower;
+ }
+ foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) {
+ if (isset($allPoweredFactors[$myPoweredValue])) {
+ if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) {
+ $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
+ }
+ } else {
+ $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
+ }
+ }
+ }
+ foreach ($allPoweredFactors as $allPoweredFactor) {
+ $returnValue *= (int) $allPoweredFactor;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * LOG_BASE.
+ *
+ * Returns the logarithm of a number to a specified base. The default base is 10.
+ *
+ * Excel Function:
+ * LOG(number[,base])
+ *
+ * @param float $number The positive real number for which you want the logarithm
+ * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function logBase($number = null, $base = 10)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $base = ($base === null) ? 10 : (float) Functions::flattenSingleValue($base);
+
+ if ((!is_numeric($base)) || (!is_numeric($number))) {
+ return Functions::VALUE();
+ }
+ if (($base <= 0) || ($number <= 0)) {
+ return Functions::NAN();
+ }
+
+ return log($number, $base);
+ }
+
+ /**
+ * MDETERM.
+ *
+ * Returns the matrix determinant of an array.
+ *
+ * Excel Function:
+ * MDETERM(array)
+ *
+ * @param array $matrixValues A matrix of values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function MDETERM($matrixValues)
+ {
+ $matrixData = [];
+ if (!is_array($matrixValues)) {
+ $matrixValues = [[$matrixValues]];
+ }
+
+ $row = $maxColumn = 0;
+ foreach ($matrixValues as $matrixRow) {
+ if (!is_array($matrixRow)) {
+ $matrixRow = [$matrixRow];
+ }
+ $column = 0;
+ foreach ($matrixRow as $matrixCell) {
+ if ((is_string($matrixCell)) || ($matrixCell === null)) {
+ return Functions::VALUE();
+ }
+ $matrixData[$row][$column] = $matrixCell;
+ ++$column;
+ }
+ if ($column > $maxColumn) {
+ $maxColumn = $column;
+ }
+ ++$row;
+ }
+
+ $matrix = new Matrix($matrixData);
+ if (!$matrix->isSquare()) {
+ return Functions::VALUE();
+ }
+
+ try {
+ return $matrix->determinant();
+ } catch (MatrixException $ex) {
+ return Functions::VALUE();
+ }
+ }
+
+ /**
+ * MINVERSE.
+ *
+ * Returns the inverse matrix for the matrix stored in an array.
+ *
+ * Excel Function:
+ * MINVERSE(array)
+ *
+ * @param array $matrixValues A matrix of values
+ *
+ * @return array|string The result, or a string containing an error
+ */
+ public static function MINVERSE($matrixValues)
+ {
+ $matrixData = [];
+ if (!is_array($matrixValues)) {
+ $matrixValues = [[$matrixValues]];
+ }
+
+ $row = $maxColumn = 0;
+ foreach ($matrixValues as $matrixRow) {
+ if (!is_array($matrixRow)) {
+ $matrixRow = [$matrixRow];
+ }
+ $column = 0;
+ foreach ($matrixRow as $matrixCell) {
+ if ((is_string($matrixCell)) || ($matrixCell === null)) {
+ return Functions::VALUE();
+ }
+ $matrixData[$row][$column] = $matrixCell;
+ ++$column;
+ }
+ if ($column > $maxColumn) {
+ $maxColumn = $column;
+ }
+ ++$row;
+ }
+
+ $matrix = new Matrix($matrixData);
+ if (!$matrix->isSquare()) {
+ return Functions::VALUE();
+ }
+
+ if ($matrix->determinant() == 0.0) {
+ return Functions::NAN();
+ }
+
+ try {
+ return $matrix->inverse()->toArray();
+ } catch (MatrixException $ex) {
+ return Functions::VALUE();
+ }
+ }
+
+ /**
+ * MMULT.
+ *
+ * @param array $matrixData1 A matrix of values
+ * @param array $matrixData2 A matrix of values
+ *
+ * @return array|string The result, or a string containing an error
+ */
+ public static function MMULT($matrixData1, $matrixData2)
+ {
+ $matrixAData = $matrixBData = [];
+ if (!is_array($matrixData1)) {
+ $matrixData1 = [[$matrixData1]];
+ }
+ if (!is_array($matrixData2)) {
+ $matrixData2 = [[$matrixData2]];
+ }
+
+ try {
+ $rowA = 0;
+ foreach ($matrixData1 as $matrixRow) {
+ if (!is_array($matrixRow)) {
+ $matrixRow = [$matrixRow];
+ }
+ $columnA = 0;
+ foreach ($matrixRow as $matrixCell) {
+ if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
+ return Functions::VALUE();
+ }
+ $matrixAData[$rowA][$columnA] = $matrixCell;
+ ++$columnA;
+ }
+ ++$rowA;
+ }
+ $matrixA = new Matrix($matrixAData);
+ $rowB = 0;
+ foreach ($matrixData2 as $matrixRow) {
+ if (!is_array($matrixRow)) {
+ $matrixRow = [$matrixRow];
+ }
+ $columnB = 0;
+ foreach ($matrixRow as $matrixCell) {
+ if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
+ return Functions::VALUE();
+ }
+ $matrixBData[$rowB][$columnB] = $matrixCell;
+ ++$columnB;
+ }
+ ++$rowB;
+ }
+ $matrixB = new Matrix($matrixBData);
+
+ if ($columnA != $rowB) {
+ return Functions::VALUE();
+ }
+
+ return $matrixA->multiply($matrixB)->toArray();
+ } catch (MatrixException $ex) {
+ return Functions::VALUE();
+ }
+ }
+
+ /**
+ * MOD.
+ *
+ * @param int $a Dividend
+ * @param int $b Divisor
+ *
+ * @return int|string Remainder, or a string containing an error
+ */
+ public static function MOD($a = 1, $b = 1)
+ {
+ $a = (float) Functions::flattenSingleValue($a);
+ $b = (float) Functions::flattenSingleValue($b);
+
+ if ($b == 0.0) {
+ return Functions::DIV0();
+ } elseif (($a < 0.0) && ($b > 0.0)) {
+ return $b - fmod(abs($a), $b);
+ } elseif (($a > 0.0) && ($b < 0.0)) {
+ return $b + fmod($a, abs($b));
+ }
+
+ return fmod($a, $b);
+ }
+
+ /**
+ * MROUND.
+ *
+ * Rounds a number to the nearest multiple of a specified value
+ *
+ * @param float $number Number to round
+ * @param int $multiple Multiple to which you want to round $number
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function MROUND($number, $multiple)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $multiple = Functions::flattenSingleValue($multiple);
+
+ if ((is_numeric($number)) && (is_numeric($multiple))) {
+ if ($multiple == 0) {
+ return 0;
+ }
+ if ((self::SIGN($number)) == (self::SIGN($multiple))) {
+ $multiplier = 1 / $multiple;
+
+ return round($number * $multiplier) / $multiplier;
+ }
+
+ return Functions::NAN();
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * MULTINOMIAL.
+ *
+ * Returns the ratio of the factorial of a sum of values to the product of factorials.
+ *
+ * @param mixed[] $args An array of mixed values for the Data Series
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function MULTINOMIAL(...$args)
+ {
+ $summer = 0;
+ $divisor = 1;
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if (is_numeric($arg)) {
+ if ($arg < 1) {
+ return Functions::NAN();
+ }
+ $summer += floor($arg);
+ $divisor *= self::FACT($arg);
+ } else {
+ return Functions::VALUE();
+ }
+ }
+
+ // Return
+ if ($summer > 0) {
+ $summer = self::FACT($summer);
+
+ return $summer / $divisor;
+ }
+
+ return 0;
+ }
+
+ /**
+ * ODD.
+ *
+ * Returns number rounded up to the nearest odd integer.
+ *
+ * @param float $number Number to round
+ *
+ * @return int|string Rounded Number, or a string containing an error
+ */
+ public static function ODD($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if ($number === null) {
+ return 1;
+ } elseif (is_bool($number)) {
+ return 1;
+ } elseif (is_numeric($number)) {
+ $significance = self::SIGN($number);
+ if ($significance == 0) {
+ return 1;
+ }
+
+ $result = self::CEILING($number, $significance);
+ if ($result == self::EVEN($result)) {
+ $result += $significance;
+ }
+
+ return (int) $result;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * POWER.
+ *
+ * Computes x raised to the power y.
+ *
+ * @param float $x
+ * @param float $y
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function POWER($x = 0, $y = 2)
+ {
+ $x = Functions::flattenSingleValue($x);
+ $y = Functions::flattenSingleValue($y);
+
+ // Validate parameters
+ if ($x == 0.0 && $y == 0.0) {
+ return Functions::NAN();
+ } elseif ($x == 0.0 && $y < 0.0) {
+ return Functions::DIV0();
+ }
+
+ // Return
+ $result = $x ** $y;
+
+ return (!is_nan($result) && !is_infinite($result)) ? $result : Functions::NAN();
+ }
+
+ /**
+ * PRODUCT.
+ *
+ * PRODUCT returns the product of all the values and cells referenced in the argument list.
+ *
+ * Excel Function:
+ * PRODUCT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function PRODUCT(...$args)
+ {
+ // Return value
+ $returnValue = null;
+
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($returnValue === null) {
+ $returnValue = $arg;
+ } else {
+ $returnValue *= $arg;
+ }
+ }
+ }
+
+ // Return
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * QUOTIENT.
+ *
+ * QUOTIENT function returns the integer portion of a division. Numerator is the divided number
+ * and denominator is the divisor.
+ *
+ * Excel Function:
+ * QUOTIENT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function QUOTIENT(...$args)
+ {
+ // Return value
+ $returnValue = null;
+
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($returnValue === null) {
+ $returnValue = ($arg == 0) ? 0 : $arg;
+ } else {
+ if (($returnValue == 0) || ($arg == 0)) {
+ $returnValue = 0;
+ } else {
+ $returnValue /= $arg;
+ }
+ }
+ }
+ }
+
+ // Return
+ return (int) $returnValue;
+ }
+
+ /**
+ * RAND.
+ *
+ * @param int $min Minimal value
+ * @param int $max Maximal value
+ *
+ * @return int Random number
+ */
+ public static function RAND($min = 0, $max = 0)
+ {
+ $min = Functions::flattenSingleValue($min);
+ $max = Functions::flattenSingleValue($max);
+
+ if ($min == 0 && $max == 0) {
+ return (mt_rand(0, 10000000)) / 10000000;
+ }
+
+ return mt_rand($min, $max);
+ }
+
+ public static function ROMAN($aValue, $style = 0)
+ {
+ $aValue = Functions::flattenSingleValue($aValue);
+ $style = ($style === null) ? 0 : (int) Functions::flattenSingleValue($style);
+ if ((!is_numeric($aValue)) || ($aValue < 0) || ($aValue >= 4000)) {
+ return Functions::VALUE();
+ }
+ $aValue = (int) $aValue;
+ if ($aValue == 0) {
+ return '';
+ }
+
+ $mill = ['', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM'];
+ $cent = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'];
+ $tens = ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'];
+ $ones = ['', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'];
+
+ $roman = '';
+ while ($aValue > 5999) {
+ $roman .= 'M';
+ $aValue -= 1000;
+ }
+ $m = self::romanCut($aValue, 1000);
+ $aValue %= 1000;
+ $c = self::romanCut($aValue, 100);
+ $aValue %= 100;
+ $t = self::romanCut($aValue, 10);
+ $aValue %= 10;
+
+ return $roman . $mill[$m] . $cent[$c] . $tens[$t] . $ones[$aValue];
+ }
+
+ /**
+ * ROUNDUP.
+ *
+ * Rounds a number up to a specified number of decimal places
+ *
+ * @param float $number Number to round
+ * @param int $digits Number of digits to which you want to round $number
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function ROUNDUP($number, $digits)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $digits = Functions::flattenSingleValue($digits);
+
+ if ((is_numeric($number)) && (is_numeric($digits))) {
+ if ($number < 0.0) {
+ return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);
+ }
+
+ return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * ROUNDDOWN.
+ *
+ * Rounds a number down to a specified number of decimal places
+ *
+ * @param float $number Number to round
+ * @param int $digits Number of digits to which you want to round $number
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function ROUNDDOWN($number, $digits)
+ {
+ $number = Functions::flattenSingleValue($number);
+ $digits = Functions::flattenSingleValue($digits);
+
+ if ((is_numeric($number)) && (is_numeric($digits))) {
+ if ($number < 0.0) {
+ return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);
+ }
+
+ return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SERIESSUM.
+ *
+ * Returns the sum of a power series
+ *
+ * @param mixed[] $args An array of mixed values for the Data Series
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SERIESSUM(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+
+ $x = array_shift($aArgs);
+ $n = array_shift($aArgs);
+ $m = array_shift($aArgs);
+
+ if ((is_numeric($x)) && (is_numeric($n)) && (is_numeric($m))) {
+ // Calculate
+ $i = 0;
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $returnValue += $arg * $x ** ($n + ($m * $i++));
+ } else {
+ return Functions::VALUE();
+ }
+ }
+
+ return $returnValue;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SIGN.
+ *
+ * Determines the sign of a number. Returns 1 if the number is positive, zero (0)
+ * if the number is 0, and -1 if the number is negative.
+ *
+ * @param float $number Number to round
+ *
+ * @return int|string sign value, or a string containing an error
+ */
+ public static function SIGN($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if (is_bool($number)) {
+ return (int) $number;
+ }
+ if (is_numeric($number)) {
+ if ($number == 0.0) {
+ return 0;
+ }
+
+ return $number / abs($number);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SQRTPI.
+ *
+ * Returns the square root of (number * pi).
+ *
+ * @param float $number Number
+ *
+ * @return float|string Square Root of Number * Pi, or a string containing an error
+ */
+ public static function SQRTPI($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if (is_numeric($number)) {
+ if ($number < 0) {
+ return Functions::NAN();
+ }
+
+ return sqrt($number * M_PI);
+ }
+
+ return Functions::VALUE();
+ }
+
+ protected static function filterHiddenArgs($cellReference, $args)
+ {
+ return array_filter(
+ $args,
+ function ($index) use ($cellReference) {
+ [, $row, $column] = explode('.', $index);
+
+ return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() &&
+ $cellReference->getWorksheet()->getColumnDimension($column)->getVisible();
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ protected static function filterFormulaArgs($cellReference, $args)
+ {
+ return array_filter(
+ $args,
+ function ($index) use ($cellReference) {
+ [, $row, $column] = explode('.', $index);
+ if ($cellReference->getWorksheet()->cellExists($column . $row)) {
+ //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
+ $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
+ $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
+
+ return !$isFormula || $cellFormula;
+ }
+
+ return true;
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ /**
+ * SUBTOTAL.
+ *
+ * Returns a subtotal in a list or database.
+ *
+ * @param int $functionType
+ * A number 1 to 11 that specifies which function to
+ * use in calculating subtotals within a range
+ * list
+ * Numbers 101 to 111 shadow the functions of 1 to 11
+ * but ignore any values in the range that are
+ * in hidden rows or columns
+ * @param mixed[] $args A mixed data series of values
+ *
+ * @return float|string
+ */
+ public static function SUBTOTAL($functionType, ...$args)
+ {
+ $cellReference = array_pop($args);
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $subtotal = Functions::flattenSingleValue($functionType);
+
+ // Calculate
+ if ((is_numeric($subtotal)) && (!is_string($subtotal))) {
+ if ($subtotal > 100) {
+ $aArgs = self::filterHiddenArgs($cellReference, $aArgs);
+ $subtotal -= 100;
+ }
+
+ $aArgs = self::filterFormulaArgs($cellReference, $aArgs);
+ switch ($subtotal) {
+ case 1:
+ return Statistical::AVERAGE($aArgs);
+ case 2:
+ return Statistical::COUNT($aArgs);
+ case 3:
+ return Statistical::COUNTA($aArgs);
+ case 4:
+ return Statistical::MAX($aArgs);
+ case 5:
+ return Statistical::MIN($aArgs);
+ case 6:
+ return self::PRODUCT($aArgs);
+ case 7:
+ return Statistical::STDEV($aArgs);
+ case 8:
+ return Statistical::STDEVP($aArgs);
+ case 9:
+ return self::SUM($aArgs);
+ case 10:
+ return Statistical::VARFunc($aArgs);
+ case 11:
+ return Statistical::VARP($aArgs);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SUM.
+ *
+ * SUM computes the sum of all the values and cells referenced in the argument list.
+ *
+ * Excel Function:
+ * SUM(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function SUM(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through the arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $returnValue += $arg;
+ } elseif (Functions::isError($arg)) {
+ return $arg;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * SUMIF.
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * SUMIF(value1[,value2[, ...]],condition)
+ *
+ * @param mixed $aArgs Data values
+ * @param string $condition the criteria that defines which cells will be summed
+ * @param mixed $sumArgs
+ *
+ * @return float
+ */
+ public static function SUMIF($aArgs, $condition, $sumArgs = [])
+ {
+ $returnValue = 0;
+
+ $aArgs = Functions::flattenArray($aArgs);
+ $sumArgs = Functions::flattenArray($sumArgs);
+ if (empty($sumArgs)) {
+ $sumArgs = $aArgs;
+ }
+ $condition = Functions::ifCondition($condition);
+ // Loop through arguments
+ foreach ($aArgs as $key => $arg) {
+ if (!is_numeric($arg)) {
+ $arg = str_replace('"', '""', $arg);
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ }
+
+ $testCondition = '=' . $arg . $condition;
+ $sumValue = array_key_exists($key, $sumArgs) ? $sumArgs[$key] : 0;
+
+ if (
+ is_numeric($sumValue) &&
+ Calculation::getInstance()->_calculateFormulaValue($testCondition)
+ ) {
+ // Is it a value within our criteria and only numeric can be added to the result
+ $returnValue += $sumValue;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * SUMIFS.
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * SUMIFS(value1[,value2[, ...]],condition)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float
+ */
+ public static function SUMIFS(...$args)
+ {
+ $arrayList = $args;
+
+ // Return value
+ $returnValue = 0;
+
+ $sumArgs = Functions::flattenArray(array_shift($arrayList));
+ $aArgsArray = [];
+ $conditions = [];
+
+ while (count($arrayList) > 0) {
+ $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
+ $conditions[] = Functions::ifCondition(array_shift($arrayList));
+ }
+
+ // Loop through each sum and see if arguments and conditions are true
+ foreach ($sumArgs as $index => $value) {
+ $valid = true;
+
+ foreach ($conditions as $cidx => $condition) {
+ $arg = $aArgsArray[$cidx][$index];
+
+ // Loop through arguments
+ if (!is_numeric($arg)) {
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ // Is not a value within our criteria
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ }
+
+ if ($valid) {
+ $returnValue += $value;
+ }
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ /**
+ * SUMPRODUCT.
+ *
+ * Excel Function:
+ * SUMPRODUCT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SUMPRODUCT(...$args)
+ {
+ $arrayList = $args;
+
+ $wrkArray = Functions::flattenArray(array_shift($arrayList));
+ $wrkCellCount = count($wrkArray);
+
+ for ($i = 0; $i < $wrkCellCount; ++$i) {
+ if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) {
+ $wrkArray[$i] = 0;
+ }
+ }
+
+ foreach ($arrayList as $matrixData) {
+ $array2 = Functions::flattenArray($matrixData);
+ $count = count($array2);
+ if ($wrkCellCount != $count) {
+ return Functions::VALUE();
+ }
+
+ foreach ($array2 as $i => $val) {
+ if ((!is_numeric($val)) || (is_string($val))) {
+ $val = 0;
+ }
+ $wrkArray[$i] *= $val;
+ }
+ }
+
+ return array_sum($wrkArray);
+ }
+
+ /**
+ * SUMSQ.
+ *
+ * SUMSQ returns the sum of the squares of the arguments
+ *
+ * Excel Function:
+ * SUMSQ(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function SUMSQ(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $returnValue += ($arg * $arg);
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * SUMX2MY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float
+ */
+ public static function SUMX2MY2($matrixData1, $matrixData2)
+ {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = min(count($array1), count($array2));
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (
+ ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
+ ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
+ ) {
+ $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * SUMX2PY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float
+ */
+ public static function SUMX2PY2($matrixData1, $matrixData2)
+ {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = min(count($array1), count($array2));
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (
+ ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
+ ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
+ ) {
+ $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * SUMXMY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float
+ */
+ public static function SUMXMY2($matrixData1, $matrixData2)
+ {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = min(count($array1), count($array2));
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (
+ ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
+ ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
+ ) {
+ $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * TRUNC.
+ *
+ * Truncates value to the number of fractional digits by number_digits.
+ *
+ * @param float $value
+ * @param int $digits
+ *
+ * @return float|string Truncated value, or a string containing an error
+ */
+ public static function TRUNC($value = 0, $digits = 0)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $digits = Functions::flattenSingleValue($digits);
+
+ // Validate parameters
+ if ((!is_numeric($value)) || (!is_numeric($digits))) {
+ return Functions::VALUE();
+ }
+ $digits = floor($digits);
+
+ // Truncate
+ $adjust = 10 ** $digits;
+
+ if (($digits > 0) && (rtrim((int) ((abs($value) - abs((int) $value)) * $adjust), '0') < $adjust / 10)) {
+ return $value;
+ }
+
+ return ((int) ($value * $adjust)) / $adjust;
+ }
+
+ /**
+ * SEC.
+ *
+ * Returns the secant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The secant of the angle
+ */
+ public static function SEC($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = cos($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * SECH.
+ *
+ * Returns the hyperbolic secant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic secant of the angle
+ */
+ public static function SECH($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = cosh($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * CSC.
+ *
+ * Returns the cosecant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The cosecant of the angle
+ */
+ public static function CSC($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = sin($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * CSCH.
+ *
+ * Returns the hyperbolic cosecant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic cosecant of the angle
+ */
+ public static function CSCH($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = sinh($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * COT.
+ *
+ * Returns the cotangent of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The cotangent of the angle
+ */
+ public static function COT($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = tan($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * COTH.
+ *
+ * Returns the hyperbolic cotangent of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic cotangent of the angle
+ */
+ public static function COTH($angle)
+ {
+ $angle = Functions::flattenSingleValue($angle);
+
+ if (!is_numeric($angle)) {
+ return Functions::VALUE();
+ }
+
+ $result = tanh($angle);
+
+ return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ }
+
+ /**
+ * ACOT.
+ *
+ * Returns the arccotangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The arccotangent of the number
+ */
+ public static function ACOT($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if (!is_numeric($number)) {
+ return Functions::VALUE();
+ }
+
+ return (M_PI / 2) - atan($number);
+ }
+
+ /**
+ * ACOTH.
+ *
+ * Returns the hyperbolic arccotangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The hyperbolic arccotangent of the number
+ */
+ public static function ACOTH($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+
+ if (!is_numeric($number)) {
+ return Functions::VALUE();
+ }
+
+ $result = log(($number + 1) / ($number - 1)) / 2;
+
+ return is_nan($result) ? Functions::NAN() : $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
new file mode 100644
index 0000000..641e9d2
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
@@ -0,0 +1,3906 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Shared\Trend\Trend;
+
+class Statistical
+{
+ const LOG_GAMMA_X_MAX_VALUE = 2.55e305;
+ const XMININ = 2.23e-308;
+ const EPS = 2.22e-16;
+ const MAX_VALUE = 1.2e308;
+ const MAX_ITERATIONS = 256;
+ const SQRT2PI = 2.5066282746310005024157652848110452530069867406099;
+
+ private static function checkTrendArrays(&$array1, &$array2)
+ {
+ if (!is_array($array1)) {
+ $array1 = [$array1];
+ }
+ if (!is_array($array2)) {
+ $array2 = [$array2];
+ }
+
+ $array1 = Functions::flattenArray($array1);
+ $array2 = Functions::flattenArray($array2);
+ foreach ($array1 as $key => $value) {
+ if ((is_bool($value)) || (is_string($value)) || ($value === null)) {
+ unset($array1[$key], $array2[$key]);
+ }
+ }
+ foreach ($array2 as $key => $value) {
+ if ((is_bool($value)) || (is_string($value)) || ($value === null)) {
+ unset($array1[$key], $array2[$key]);
+ }
+ }
+ $array1 = array_merge($array1);
+ $array2 = array_merge($array2);
+
+ return true;
+ }
+
+ /**
+ * Incomplete beta function.
+ *
+ * @author Jaco van Kooten
+ * @author Paul Meagher
+ *
+ * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).
+ *
+ * @param mixed $x require 0<=x<=1
+ * @param mixed $p require p>0
+ * @param mixed $q require q>0
+ *
+ * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow
+ */
+ private static function incompleteBeta($x, $p, $q)
+ {
+ if ($x <= 0.0) {
+ return 0.0;
+ } elseif ($x >= 1.0) {
+ return 1.0;
+ } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
+ return 0.0;
+ }
+ $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x));
+ if ($x < ($p + 1.0) / ($p + $q + 2.0)) {
+ return $beta_gam * self::betaFraction($x, $p, $q) / $p;
+ }
+
+ return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q);
+ }
+
+ // Function cache for logBeta function
+ private static $logBetaCacheP = 0.0;
+
+ private static $logBetaCacheQ = 0.0;
+
+ private static $logBetaCacheResult = 0.0;
+
+ /**
+ * The natural logarithm of the beta function.
+ *
+ * @param mixed $p require p>0
+ * @param mixed $q require q>0
+ *
+ * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
+ *
+ * @author Jaco van Kooten
+ */
+ private static function logBeta($p, $q)
+ {
+ if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) {
+ self::$logBetaCacheP = $p;
+ self::$logBetaCacheQ = $q;
+ if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
+ self::$logBetaCacheResult = 0.0;
+ } else {
+ self::$logBetaCacheResult = self::logGamma($p) + self::logGamma($q) - self::logGamma($p + $q);
+ }
+ }
+
+ return self::$logBetaCacheResult;
+ }
+
+ /**
+ * Evaluates of continued fraction part of incomplete beta function.
+ * Based on an idea from Numerical Recipes (W.H. Press et al, 1992).
+ *
+ * @author Jaco van Kooten
+ *
+ * @param mixed $x
+ * @param mixed $p
+ * @param mixed $q
+ *
+ * @return float
+ */
+ private static function betaFraction($x, $p, $q)
+ {
+ $c = 1.0;
+ $sum_pq = $p + $q;
+ $p_plus = $p + 1.0;
+ $p_minus = $p - 1.0;
+ $h = 1.0 - $sum_pq * $x / $p_plus;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $frac = $h;
+ $m = 1;
+ $delta = 0.0;
+ while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) {
+ $m2 = 2 * $m;
+ // even index for d
+ $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2));
+ $h = 1.0 + $d * $h;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $c = 1.0 + $d / $c;
+ if (abs($c) < self::XMININ) {
+ $c = self::XMININ;
+ }
+ $frac *= $h * $c;
+ // odd index for d
+ $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2));
+ $h = 1.0 + $d * $h;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $c = 1.0 + $d / $c;
+ if (abs($c) < self::XMININ) {
+ $c = self::XMININ;
+ }
+ $delta = $h * $c;
+ $frac *= $delta;
+ ++$m;
+ }
+
+ return $frac;
+ }
+
+ /**
+ * logGamma function.
+ *
+ * @version 1.1
+ *
+ * @author Jaco van Kooten
+ *
+ * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher.
+ *
+ * The natural logarithm of the gamma function. <br />
+ * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz <br />
+ * Applied Mathematics Division <br />
+ * Argonne National Laboratory <br />
+ * Argonne, IL 60439 <br />
+ * <p>
+ * References:
+ * <ol>
+ * <li>W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural
+ * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.</li>
+ * <li>K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.</li>
+ * <li>Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.</li>
+ * </ol>
+ * </p>
+ * <p>
+ * From the original documentation:
+ * </p>
+ * <p>
+ * This routine calculates the LOG(GAMMA) function for a positive real argument X.
+ * Computation is based on an algorithm outlined in references 1 and 2.
+ * The program uses rational functions that theoretically approximate LOG(GAMMA)
+ * to at least 18 significant decimal digits. The approximation for X > 12 is from
+ * reference 3, while approximations for X < 12.0 are similar to those in reference
+ * 1, but are unpublished. The accuracy achieved depends on the arithmetic system,
+ * the compiler, the intrinsic functions, and proper selection of the
+ * machine-dependent constants.
+ * </p>
+ * <p>
+ * Error returns: <br />
+ * The program returns the value XINF for X .LE. 0.0 or when overflow would occur.
+ * The computation is believed to be free of underflow and overflow.
+ * </p>
+ *
+ * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305
+ */
+
+ // Function cache for logGamma
+ private static $logGammaCacheResult = 0.0;
+
+ private static $logGammaCacheX = 0.0;
+
+ private static function logGamma($x)
+ {
+ // Log Gamma related constants
+ static $lg_d1 = -0.5772156649015328605195174;
+ static $lg_d2 = 0.4227843350984671393993777;
+ static $lg_d4 = 1.791759469228055000094023;
+
+ static $lg_p1 = [
+ 4.945235359296727046734888,
+ 201.8112620856775083915565,
+ 2290.838373831346393026739,
+ 11319.67205903380828685045,
+ 28557.24635671635335736389,
+ 38484.96228443793359990269,
+ 26377.48787624195437963534,
+ 7225.813979700288197698961,
+ ];
+ static $lg_p2 = [
+ 4.974607845568932035012064,
+ 542.4138599891070494101986,
+ 15506.93864978364947665077,
+ 184793.2904445632425417223,
+ 1088204.76946882876749847,
+ 3338152.967987029735917223,
+ 5106661.678927352456275255,
+ 3074109.054850539556250927,
+ ];
+ static $lg_p4 = [
+ 14745.02166059939948905062,
+ 2426813.369486704502836312,
+ 121475557.4045093227939592,
+ 2663432449.630976949898078,
+ 29403789566.34553899906876,
+ 170266573776.5398868392998,
+ 492612579337.743088758812,
+ 560625185622.3951465078242,
+ ];
+ static $lg_q1 = [
+ 67.48212550303777196073036,
+ 1113.332393857199323513008,
+ 7738.757056935398733233834,
+ 27639.87074403340708898585,
+ 54993.10206226157329794414,
+ 61611.22180066002127833352,
+ 36351.27591501940507276287,
+ 8785.536302431013170870835,
+ ];
+ static $lg_q2 = [
+ 183.0328399370592604055942,
+ 7765.049321445005871323047,
+ 133190.3827966074194402448,
+ 1136705.821321969608938755,
+ 5267964.117437946917577538,
+ 13467014.54311101692290052,
+ 17827365.30353274213975932,
+ 9533095.591844353613395747,
+ ];
+ static $lg_q4 = [
+ 2690.530175870899333379843,
+ 639388.5654300092398984238,
+ 41355999.30241388052042842,
+ 1120872109.61614794137657,
+ 14886137286.78813811542398,
+ 101680358627.2438228077304,
+ 341747634550.7377132798597,
+ 446315818741.9713286462081,
+ ];
+ static $lg_c = [
+ -0.001910444077728,
+ 8.4171387781295e-4,
+ -5.952379913043012e-4,
+ 7.93650793500350248e-4,
+ -0.002777777777777681622553,
+ 0.08333333333333333331554247,
+ 0.0057083835261,
+ ];
+
+ // Rough estimate of the fourth root of logGamma_xBig
+ static $lg_frtbig = 2.25e76;
+ static $pnt68 = 0.6796875;
+
+ if ($x == self::$logGammaCacheX) {
+ return self::$logGammaCacheResult;
+ }
+ $y = $x;
+ if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) {
+ if ($y <= self::EPS) {
+ $res = -log($y);
+ } elseif ($y <= 1.5) {
+ // ---------------------
+ // EPS .LT. X .LE. 1.5
+ // ---------------------
+ if ($y < $pnt68) {
+ $corr = -log($y);
+ $xm1 = $y;
+ } else {
+ $corr = 0.0;
+ $xm1 = $y - 1.0;
+ }
+ if ($y <= 0.5 || $y >= $pnt68) {
+ $xden = 1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm1 + $lg_p1[$i];
+ $xden = $xden * $xm1 + $lg_q1[$i];
+ }
+ $res = $corr + $xm1 * ($lg_d1 + $xm1 * ($xnum / $xden));
+ } else {
+ $xm2 = $y - 1.0;
+ $xden = 1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm2 + $lg_p2[$i];
+ $xden = $xden * $xm2 + $lg_q2[$i];
+ }
+ $res = $corr + $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden));
+ }
+ } elseif ($y <= 4.0) {
+ // ---------------------
+ // 1.5 .LT. X .LE. 4.0
+ // ---------------------
+ $xm2 = $y - 2.0;
+ $xden = 1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm2 + $lg_p2[$i];
+ $xden = $xden * $xm2 + $lg_q2[$i];
+ }
+ $res = $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden));
+ } elseif ($y <= 12.0) {
+ // ----------------------
+ // 4.0 .LT. X .LE. 12.0
+ // ----------------------
+ $xm4 = $y - 4.0;
+ $xden = -1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm4 + $lg_p4[$i];
+ $xden = $xden * $xm4 + $lg_q4[$i];
+ }
+ $res = $lg_d4 + $xm4 * ($xnum / $xden);
+ } else {
+ // ---------------------------------
+ // Evaluate for argument .GE. 12.0
+ // ---------------------------------
+ $res = 0.0;
+ if ($y <= $lg_frtbig) {
+ $res = $lg_c[6];
+ $ysq = $y * $y;
+ for ($i = 0; $i < 6; ++$i) {
+ $res = $res / $ysq + $lg_c[$i];
+ }
+ $res /= $y;
+ $corr = log($y);
+ $res = $res + log(self::SQRT2PI) - 0.5 * $corr;
+ $res += $y * ($corr - 1.0);
+ }
+ }
+ } else {
+ // --------------------------
+ // Return for bad arguments
+ // --------------------------
+ $res = self::MAX_VALUE;
+ }
+ // ------------------------------
+ // Final adjustments and return
+ // ------------------------------
+ self::$logGammaCacheX = $x;
+ self::$logGammaCacheResult = $res;
+
+ return $res;
+ }
+
+ //
+ // Private implementation of the incomplete Gamma function
+ //
+ private static function incompleteGamma($a, $x)
+ {
+ static $max = 32;
+ $summer = 0;
+ for ($n = 0; $n <= $max; ++$n) {
+ $divisor = $a;
+ for ($i = 1; $i <= $n; ++$i) {
+ $divisor *= ($a + $i);
+ }
+ $summer += ($x ** $n / $divisor);
+ }
+
+ return $x ** $a * exp(0 - $x) * $summer;
+ }
+
+ //
+ // Private implementation of the Gamma function
+ //
+ private static function gamma($data)
+ {
+ if ($data == 0.0) {
+ return 0;
+ }
+
+ static $p0 = 1.000000000190015;
+ static $p = [
+ 1 => 76.18009172947146,
+ 2 => -86.50532032941677,
+ 3 => 24.01409824083091,
+ 4 => -1.231739572450155,
+ 5 => 1.208650973866179e-3,
+ 6 => -5.395239384953e-6,
+ ];
+
+ $y = $x = $data;
+ $tmp = $x + 5.5;
+ $tmp -= ($x + 0.5) * log($tmp);
+
+ $summer = $p0;
+ for ($j = 1; $j <= 6; ++$j) {
+ $summer += ($p[$j] / ++$y);
+ }
+
+ return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x));
+ }
+
+ /*
+ * inverse_ncdf.php
+ * -------------------
+ * begin : Friday, January 16, 2004
+ * copyright : (C) 2004 Michael Nickerson
+ * email : nickersonm@yahoo.com
+ *
+ */
+ private static function inverseNcdf($p)
+ {
+ // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to
+ // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as
+ // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html
+ // I have not checked the accuracy of this implementation. Be aware that PHP
+ // will truncate the coeficcients to 14 digits.
+
+ // You have permission to use and distribute this function freely for
+ // whatever purpose you want, but please show common courtesy and give credit
+ // where credit is due.
+
+ // Input paramater is $p - probability - where 0 < p < 1.
+
+ // Coefficients in rational approximations
+ static $a = [
+ 1 => -3.969683028665376e+01,
+ 2 => 2.209460984245205e+02,
+ 3 => -2.759285104469687e+02,
+ 4 => 1.383577518672690e+02,
+ 5 => -3.066479806614716e+01,
+ 6 => 2.506628277459239e+00,
+ ];
+
+ static $b = [
+ 1 => -5.447609879822406e+01,
+ 2 => 1.615858368580409e+02,
+ 3 => -1.556989798598866e+02,
+ 4 => 6.680131188771972e+01,
+ 5 => -1.328068155288572e+01,
+ ];
+
+ static $c = [
+ 1 => -7.784894002430293e-03,
+ 2 => -3.223964580411365e-01,
+ 3 => -2.400758277161838e+00,
+ 4 => -2.549732539343734e+00,
+ 5 => 4.374664141464968e+00,
+ 6 => 2.938163982698783e+00,
+ ];
+
+ static $d = [
+ 1 => 7.784695709041462e-03,
+ 2 => 3.224671290700398e-01,
+ 3 => 2.445134137142996e+00,
+ 4 => 3.754408661907416e+00,
+ ];
+
+ // Define lower and upper region break-points.
+ $p_low = 0.02425; //Use lower region approx. below this
+ $p_high = 1 - $p_low; //Use upper region approx. above this
+
+ if (0 < $p && $p < $p_low) {
+ // Rational approximation for lower region.
+ $q = sqrt(-2 * log($p));
+
+ return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
+ (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
+ } elseif ($p_low <= $p && $p <= $p_high) {
+ // Rational approximation for central region.
+ $q = $p - 0.5;
+ $r = $q * $q;
+
+ return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q /
+ ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1);
+ } elseif ($p_high < $p && $p < 1) {
+ // Rational approximation for upper region.
+ $q = sqrt(-2 * log(1 - $p));
+
+ return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
+ (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
+ }
+ // If 0 < p < 1, return a null value
+ return Functions::NULL();
+ }
+
+ /**
+ * MS Excel does not count Booleans if passed as cell values, but they are counted if passed as literals.
+ * OpenOffice Calc always counts Booleans.
+ * Gnumeric never counts Booleans.
+ *
+ * @param mixed $arg
+ * @param mixed $k
+ *
+ * @return int|mixed
+ */
+ private static function testAcceptedBoolean($arg, $k)
+ {
+ if (
+ (is_bool($arg)) &&
+ ((!Functions::isCellValue($k) && (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_EXCEL)) ||
+ (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE))
+ ) {
+ $arg = (int) $arg;
+ }
+
+ return $arg;
+ }
+
+ /**
+ * @param mixed $arg
+ * @param mixed $k
+ *
+ * @return bool
+ */
+ private static function isAcceptedCountable($arg, $k)
+ {
+ if (
+ ((is_numeric($arg)) && (!is_string($arg))) ||
+ ((is_numeric($arg)) && (!Functions::isCellValue($k)) &&
+ (Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC))
+ ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * AVEDEV.
+ *
+ * Returns the average of the absolute deviations of data points from their mean.
+ * AVEDEV is a measure of the variability in a data set.
+ *
+ * Excel Function:
+ * AVEDEV(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function AVEDEV(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ // Return value
+ $returnValue = 0;
+
+ $aMean = self::AVERAGE(...$args);
+ if ($aMean === Functions::DIV0()) {
+ return Functions::NAN();
+ } elseif ($aMean === Functions::VALUE()) {
+ return Functions::VALUE();
+ }
+
+ $aCount = 0;
+ foreach ($aArgs as $k => $arg) {
+ $arg = self::testAcceptedBoolean($arg, $k);
+ // Is it a numeric value?
+ // Strings containing numeric values are only counted if they are string literals (not cell values)
+ // and then only in MS Excel and in Open Office, not in Gnumeric
+ if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) {
+ return Functions::VALUE();
+ }
+ if (self::isAcceptedCountable($arg, $k)) {
+ $returnValue += abs($arg - $aMean);
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if ($aCount === 0) {
+ return Functions::DIV0();
+ }
+
+ return $returnValue / $aCount;
+ }
+
+ /**
+ * AVERAGE.
+ *
+ * Returns the average (arithmetic mean) of the arguments
+ *
+ * Excel Function:
+ * AVERAGE(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function AVERAGE(...$args)
+ {
+ $returnValue = $aCount = 0;
+
+ // Loop through arguments
+ foreach (Functions::flattenArrayIndexed($args) as $k => $arg) {
+ $arg = self::testAcceptedBoolean($arg, $k);
+ // Is it a numeric value?
+ // Strings containing numeric values are only counted if they are string literals (not cell values)
+ // and then only in MS Excel and in Open Office, not in Gnumeric
+ if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) {
+ return Functions::VALUE();
+ }
+ if (self::isAcceptedCountable($arg, $k)) {
+ $returnValue += $arg;
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if ($aCount > 0) {
+ return $returnValue / $aCount;
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * AVERAGEA.
+ *
+ * Returns the average of its arguments, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * AVERAGEA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function AVERAGEA(...$args)
+ {
+ $returnValue = null;
+
+ $aCount = 0;
+ // Loop through arguments
+ foreach (Functions::flattenArrayIndexed($args) as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ $returnValue += $arg;
+ ++$aCount;
+ }
+ }
+ }
+
+ if ($aCount > 0) {
+ return $returnValue / $aCount;
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * AVERAGEIF.
+ *
+ * Returns the average value from a range of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * AVERAGEIF(value1[,value2[, ...]],condition)
+ *
+ * @param mixed $aArgs Data values
+ * @param string $condition the criteria that defines which cells will be checked
+ * @param mixed[] $averageArgs Data values
+ *
+ * @return float|string
+ */
+ public static function AVERAGEIF($aArgs, $condition, $averageArgs = [])
+ {
+ $returnValue = 0;
+
+ $aArgs = Functions::flattenArray($aArgs);
+ $averageArgs = Functions::flattenArray($averageArgs);
+ if (empty($averageArgs)) {
+ $averageArgs = $aArgs;
+ }
+ $condition = Functions::ifCondition($condition);
+ $conditionIsNumeric = strpos($condition, '"') === false;
+
+ // Loop through arguments
+ $aCount = 0;
+ foreach ($aArgs as $key => $arg) {
+ if (!is_numeric($arg)) {
+ if ($conditionIsNumeric) {
+ continue;
+ }
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ } elseif (!$conditionIsNumeric) {
+ continue;
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ $returnValue += $averageArgs[$key];
+ ++$aCount;
+ }
+ }
+
+ if ($aCount > 0) {
+ return $returnValue / $aCount;
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * BETADIST.
+ *
+ * Returns the beta distribution.
+ *
+ * @param float $value Value at which you want to evaluate the distribution
+ * @param float $alpha Parameter to the distribution
+ * @param float $beta Parameter to the distribution
+ * @param mixed $rMin
+ * @param mixed $rMax
+ *
+ * @return float|string
+ */
+ public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+ $rMin = Functions::flattenSingleValue($rMin);
+ $rMax = Functions::flattenSingleValue($rMax);
+
+ if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) {
+ if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) {
+ return Functions::NAN();
+ }
+ if ($rMin > $rMax) {
+ $tmp = $rMin;
+ $rMin = $rMax;
+ $rMax = $tmp;
+ }
+ $value -= $rMin;
+ $value /= ($rMax - $rMin);
+
+ return self::incompleteBeta($value, $alpha, $beta);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * BETAINV.
+ *
+ * Returns the inverse of the Beta distribution.
+ *
+ * @param float $probability Probability at which you want to evaluate the distribution
+ * @param float $alpha Parameter to the distribution
+ * @param float $beta Parameter to the distribution
+ * @param float $rMin Minimum value
+ * @param float $rMax Maximum value
+ *
+ * @return float|string
+ */
+ public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+ $rMin = Functions::flattenSingleValue($rMin);
+ $rMax = Functions::flattenSingleValue($rMax);
+
+ if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) {
+ if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0) || ($probability > 1)) {
+ return Functions::NAN();
+ }
+ if ($rMin > $rMax) {
+ $tmp = $rMin;
+ $rMin = $rMax;
+ $rMax = $tmp;
+ }
+ $a = 0;
+ $b = 2;
+
+ $i = 0;
+ while ((($b - $a) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
+ $guess = ($a + $b) / 2;
+ $result = self::BETADIST($guess, $alpha, $beta);
+ if (($result == $probability) || ($result == 0)) {
+ $b = $a;
+ } elseif ($result > $probability) {
+ $b = $guess;
+ } else {
+ $a = $guess;
+ }
+ }
+ if ($i == self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return round($rMin + $guess * ($rMax - $rMin), 12);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * BINOMDIST.
+ *
+ * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with
+ * a fixed number of tests or trials, when the outcomes of any trial are only success or failure,
+ * when trials are independent, and when the probability of success is constant throughout the
+ * experiment. For example, BINOMDIST can calculate the probability that two of the next three
+ * babies born are male.
+ *
+ * @param float $value Number of successes in trials
+ * @param float $trials Number of trials
+ * @param float $probability Probability of success on each trial
+ * @param bool $cumulative
+ *
+ * @return float|string
+ */
+ public static function BINOMDIST($value, $trials, $probability, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $trials = Functions::flattenSingleValue($trials);
+ $probability = Functions::flattenSingleValue($probability);
+
+ if ((is_numeric($value)) && (is_numeric($trials)) && (is_numeric($probability))) {
+ $value = floor($value);
+ $trials = floor($trials);
+ if (($value < 0) || ($value > $trials)) {
+ return Functions::NAN();
+ }
+ if (($probability < 0) || ($probability > 1)) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ $summer = 0;
+ for ($i = 0; $i <= $value; ++$i) {
+ $summer += MathTrig::COMBIN($trials, $i) * $probability ** $i * (1 - $probability) ** ($trials - $i);
+ }
+
+ return $summer;
+ }
+
+ return MathTrig::COMBIN($trials, $value) * $probability ** $value * (1 - $probability) ** ($trials - $value);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * CHIDIST.
+ *
+ * Returns the one-tailed probability of the chi-squared distribution.
+ *
+ * @param float $value Value for the function
+ * @param float $degrees degrees of freedom
+ *
+ * @return float|string
+ */
+ public static function CHIDIST($value, $degrees)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $degrees = Functions::flattenSingleValue($degrees);
+
+ if ((is_numeric($value)) && (is_numeric($degrees))) {
+ $degrees = floor($degrees);
+ if ($degrees < 1) {
+ return Functions::NAN();
+ }
+ if ($value < 0) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ return 1;
+ }
+
+ return Functions::NAN();
+ }
+
+ return 1 - (self::incompleteGamma($degrees / 2, $value / 2) / self::gamma($degrees / 2));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * CHIINV.
+ *
+ * Returns the one-tailed probability of the chi-squared distribution.
+ *
+ * @param float $probability Probability for the function
+ * @param float $degrees degrees of freedom
+ *
+ * @return float|string
+ */
+ public static function CHIINV($probability, $degrees)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $degrees = Functions::flattenSingleValue($degrees);
+
+ if ((is_numeric($probability)) && (is_numeric($degrees))) {
+ $degrees = floor($degrees);
+
+ $xLo = 100;
+ $xHi = 0;
+
+ $x = $xNew = 1;
+ $dx = 1;
+ $i = 0;
+
+ while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
+ // Apply Newton-Raphson step
+ $result = 1 - (self::incompleteGamma($degrees / 2, $x / 2) / self::gamma($degrees / 2));
+ $error = $result - $probability;
+ if ($error == 0.0) {
+ $dx = 0;
+ } elseif ($error < 0.0) {
+ $xLo = $x;
+ } else {
+ $xHi = $x;
+ }
+ // Avoid division by zero
+ if ($result != 0.0) {
+ $dx = $error / $result;
+ $xNew = $x - $dx;
+ }
+ // If the NR fails to converge (which for example may be the
+ // case if the initial guess is too rough) we apply a bisection
+ // step to determine a more narrow interval around the root.
+ if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {
+ $xNew = ($xLo + $xHi) / 2;
+ $dx = $xNew - $x;
+ }
+ $x = $xNew;
+ }
+ if ($i == self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return round($x, 12);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * CONFIDENCE.
+ *
+ * Returns the confidence interval for a population mean
+ *
+ * @param float $alpha
+ * @param float $stdDev Standard Deviation
+ * @param float $size
+ *
+ * @return float|string
+ */
+ public static function CONFIDENCE($alpha, $stdDev, $size)
+ {
+ $alpha = Functions::flattenSingleValue($alpha);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+ $size = Functions::flattenSingleValue($size);
+
+ if ((is_numeric($alpha)) && (is_numeric($stdDev)) && (is_numeric($size))) {
+ $size = floor($size);
+ if (($alpha <= 0) || ($alpha >= 1)) {
+ return Functions::NAN();
+ }
+ if (($stdDev <= 0) || ($size < 1)) {
+ return Functions::NAN();
+ }
+
+ return self::NORMSINV(1 - $alpha / 2) * $stdDev / sqrt($size);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * CORREL.
+ *
+ * Returns covariance, the average of the products of deviations for each data point pair.
+ *
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param null|mixed $xValues array of mixed Data Series X
+ *
+ * @return float|string
+ */
+ public static function CORREL($yValues, $xValues = null)
+ {
+ if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) {
+ return Functions::VALUE();
+ }
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getCorrelation();
+ }
+
+ /**
+ * COUNT.
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * COUNT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int
+ */
+ public static function COUNT(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArrayIndexed($args);
+ foreach ($aArgs as $k => $arg) {
+ $arg = self::testAcceptedBoolean($arg, $k);
+ // Is it a numeric value?
+ // Strings containing numeric values are only counted if they are string literals (not cell values)
+ // and then only in MS Excel and in Open Office, not in Gnumeric
+ if (self::isAcceptedCountable($arg, $k)) {
+ ++$returnValue;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * COUNTA.
+ *
+ * Counts the number of cells that are not empty within the list of arguments
+ *
+ * Excel Function:
+ * COUNTA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int
+ */
+ public static function COUNTA(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArrayIndexed($args);
+ foreach ($aArgs as $k => $arg) {
+ // Nulls are counted if literals, but not if cell values
+ if ($arg !== null || (!Functions::isCellValue($k))) {
+ ++$returnValue;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * COUNTBLANK.
+ *
+ * Counts the number of empty cells within the list of arguments
+ *
+ * Excel Function:
+ * COUNTBLANK(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int
+ */
+ public static function COUNTBLANK(...$args)
+ {
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a blank cell?
+ if (($arg === null) || ((is_string($arg)) && ($arg == ''))) {
+ ++$returnValue;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * COUNTIF.
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * COUNTIF(value1[,value2[, ...]],condition)
+ *
+ * @param mixed $aArgs Data values
+ * @param string $condition the criteria that defines which cells will be counted
+ *
+ * @return int
+ */
+ public static function COUNTIF($aArgs, $condition)
+ {
+ $returnValue = 0;
+
+ $aArgs = Functions::flattenArray($aArgs);
+ $condition = Functions::ifCondition($condition);
+ $conditionIsNumeric = strpos($condition, '"') === false;
+ // Loop through arguments
+ foreach ($aArgs as $arg) {
+ if (!is_numeric($arg)) {
+ if ($conditionIsNumeric) {
+ continue;
+ }
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ } elseif (!$conditionIsNumeric) {
+ continue;
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ // Is it a value within our criteria
+ ++$returnValue;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * COUNTIFS.
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)
+ *
+ * @param mixed $args Criterias
+ *
+ * @return int
+ */
+ public static function COUNTIFS(...$args)
+ {
+ $arrayList = $args;
+
+ // Return value
+ $returnValue = 0;
+
+ if (empty($arrayList)) {
+ return $returnValue;
+ }
+
+ $aArgsArray = [];
+ $conditions = [];
+
+ while (count($arrayList) > 0) {
+ $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
+ $conditions[] = Functions::ifCondition(array_shift($arrayList));
+ }
+
+ // Loop through each arg and see if arguments and conditions are true
+ foreach (array_keys($aArgsArray[0]) as $index) {
+ $valid = true;
+
+ foreach ($conditions as $cidx => $condition) {
+ $conditionIsNumeric = strpos($condition, '"') === false;
+ $arg = $aArgsArray[$cidx][$index];
+
+ // Loop through arguments
+ if (!is_numeric($arg)) {
+ if ($conditionIsNumeric) {
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ } elseif (!$conditionIsNumeric) {
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ // Is not a value within our criteria
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ }
+
+ if ($valid) {
+ ++$returnValue;
+ }
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ /**
+ * COVAR.
+ *
+ * Returns covariance, the average of the products of deviations for each data point pair.
+ *
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param mixed $xValues array of mixed Data Series X
+ *
+ * @return float|string
+ */
+ public static function COVAR($yValues, $xValues)
+ {
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getCovariance();
+ }
+
+ /**
+ * CRITBINOM.
+ *
+ * Returns the smallest value for which the cumulative binomial distribution is greater
+ * than or equal to a criterion value
+ *
+ * See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used
+ *
+ * @param float $trials number of Bernoulli trials
+ * @param float $probability probability of a success on each trial
+ * @param float $alpha criterion value
+ *
+ * @return int|string
+ *
+ * @TODO Warning. This implementation differs from the algorithm detailed on the MS
+ * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess
+ * This eliminates a potential endless loop error, but may have an adverse affect on the
+ * accuracy of the function (although all my tests have so far returned correct results).
+ */
+ public static function CRITBINOM($trials, $probability, $alpha)
+ {
+ $trials = floor(Functions::flattenSingleValue($trials));
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+
+ if ((is_numeric($trials)) && (is_numeric($probability)) && (is_numeric($alpha))) {
+ $trials = (int) $trials;
+ if ($trials < 0) {
+ return Functions::NAN();
+ } elseif (($probability < 0.0) || ($probability > 1.0)) {
+ return Functions::NAN();
+ } elseif (($alpha < 0.0) || ($alpha > 1.0)) {
+ return Functions::NAN();
+ }
+
+ if ($alpha <= 0.5) {
+ $t = sqrt(log(1 / ($alpha * $alpha)));
+ $trialsApprox = 0 - ($t + (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t));
+ } else {
+ $t = sqrt(log(1 / (1 - $alpha) ** 2));
+ $trialsApprox = $t - (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t);
+ }
+
+ $Guess = floor($trials * $probability + $trialsApprox * sqrt($trials * $probability * (1 - $probability)));
+ if ($Guess < 0) {
+ $Guess = 0;
+ } elseif ($Guess > $trials) {
+ $Guess = $trials;
+ }
+
+ $TotalUnscaledProbability = $UnscaledPGuess = $UnscaledCumPGuess = 0.0;
+ $EssentiallyZero = 10e-12;
+
+ $m = floor($trials * $probability);
+ ++$TotalUnscaledProbability;
+ if ($m == $Guess) {
+ ++$UnscaledPGuess;
+ }
+ if ($m <= $Guess) {
+ ++$UnscaledCumPGuess;
+ }
+
+ $PreviousValue = 1;
+ $Done = false;
+ $k = $m + 1;
+ while ((!$Done) && ($k <= $trials)) {
+ $CurrentValue = $PreviousValue * ($trials - $k + 1) * $probability / ($k * (1 - $probability));
+ $TotalUnscaledProbability += $CurrentValue;
+ if ($k == $Guess) {
+ $UnscaledPGuess += $CurrentValue;
+ }
+ if ($k <= $Guess) {
+ $UnscaledCumPGuess += $CurrentValue;
+ }
+ if ($CurrentValue <= $EssentiallyZero) {
+ $Done = true;
+ }
+ $PreviousValue = $CurrentValue;
+ ++$k;
+ }
+
+ $PreviousValue = 1;
+ $Done = false;
+ $k = $m - 1;
+ while ((!$Done) && ($k >= 0)) {
+ $CurrentValue = $PreviousValue * $k + 1 * (1 - $probability) / (($trials - $k) * $probability);
+ $TotalUnscaledProbability += $CurrentValue;
+ if ($k == $Guess) {
+ $UnscaledPGuess += $CurrentValue;
+ }
+ if ($k <= $Guess) {
+ $UnscaledCumPGuess += $CurrentValue;
+ }
+ if ($CurrentValue <= $EssentiallyZero) {
+ $Done = true;
+ }
+ $PreviousValue = $CurrentValue;
+ --$k;
+ }
+
+ $PGuess = $UnscaledPGuess / $TotalUnscaledProbability;
+ $CumPGuess = $UnscaledCumPGuess / $TotalUnscaledProbability;
+
+ $CumPGuessMinus1 = $CumPGuess - 1;
+
+ while (true) {
+ if (($CumPGuessMinus1 < $alpha) && ($CumPGuess >= $alpha)) {
+ return $Guess;
+ } elseif (($CumPGuessMinus1 < $alpha) && ($CumPGuess < $alpha)) {
+ $PGuessPlus1 = $PGuess * ($trials - $Guess) * $probability / $Guess / (1 - $probability);
+ $CumPGuessMinus1 = $CumPGuess;
+ $CumPGuess = $CumPGuess + $PGuessPlus1;
+ $PGuess = $PGuessPlus1;
+ ++$Guess;
+ } elseif (($CumPGuessMinus1 >= $alpha) && ($CumPGuess >= $alpha)) {
+ $PGuessMinus1 = $PGuess * $Guess * (1 - $probability) / ($trials - $Guess + 1) / $probability;
+ $CumPGuess = $CumPGuessMinus1;
+ $CumPGuessMinus1 = $CumPGuessMinus1 - $PGuess;
+ $PGuess = $PGuessMinus1;
+ --$Guess;
+ }
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * DEVSQ.
+ *
+ * Returns the sum of squares of deviations of data points from their sample mean.
+ *
+ * Excel Function:
+ * DEVSQ(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function DEVSQ(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ // Return value
+ $returnValue = null;
+
+ $aMean = self::AVERAGE($aArgs);
+ if ($aMean != Functions::DIV0()) {
+ $aCount = -1;
+ foreach ($aArgs as $k => $arg) {
+ // Is it a numeric value?
+ if (
+ (is_bool($arg)) &&
+ ((!Functions::isCellValue($k)) ||
+ (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
+ ) {
+ $arg = (int) $arg;
+ }
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($returnValue === null) {
+ $returnValue = ($arg - $aMean) ** 2;
+ } else {
+ $returnValue += ($arg - $aMean) ** 2;
+ }
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if ($returnValue === null) {
+ return Functions::NAN();
+ }
+
+ return $returnValue;
+ }
+
+ return Functions::NA();
+ }
+
+ /**
+ * EXPONDIST.
+ *
+ * Returns the exponential distribution. Use EXPONDIST to model the time between events,
+ * such as how long an automated bank teller takes to deliver cash. For example, you can
+ * use EXPONDIST to determine the probability that the process takes at most 1 minute.
+ *
+ * @param float $value Value of the function
+ * @param float $lambda The parameter value
+ * @param bool $cumulative
+ *
+ * @return float|string
+ */
+ public static function EXPONDIST($value, $lambda, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $lambda = Functions::flattenSingleValue($lambda);
+ $cumulative = Functions::flattenSingleValue($cumulative);
+
+ if ((is_numeric($value)) && (is_numeric($lambda))) {
+ if (($value < 0) || ($lambda < 0)) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ return 1 - exp(0 - $value * $lambda);
+ }
+
+ return $lambda * exp(0 - $value * $lambda);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ private static function betaFunction($a, $b)
+ {
+ return (self::gamma($a) * self::gamma($b)) / self::gamma($a + $b);
+ }
+
+ private static function regularizedIncompleteBeta($value, $a, $b)
+ {
+ return self::incompleteBeta($value, $a, $b) / self::betaFunction($a, $b);
+ }
+
+ /**
+ * F.DIST.
+ *
+ * Returns the F probability distribution.
+ * You can use this function to determine whether two data sets have different degrees of diversity.
+ * For example, you can examine the test scores of men and women entering high school, and determine
+ * if the variability in the females is different from that found in the males.
+ *
+ * @param float $value Value of the function
+ * @param int $u The numerator degrees of freedom
+ * @param int $v The denominator degrees of freedom
+ * @param bool $cumulative If cumulative is TRUE, F.DIST returns the cumulative distribution function;
+ * if FALSE, it returns the probability density function.
+ *
+ * @return float|string
+ */
+ public static function FDIST2($value, $u, $v, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $u = Functions::flattenSingleValue($u);
+ $v = Functions::flattenSingleValue($v);
+ $cumulative = Functions::flattenSingleValue($cumulative);
+
+ if (is_numeric($value) && is_numeric($u) && is_numeric($v)) {
+ if ($value < 0 || $u < 1 || $v < 1) {
+ return Functions::NAN();
+ }
+
+ $cumulative = (bool) $cumulative;
+ $u = (int) $u;
+ $v = (int) $v;
+
+ if ($cumulative) {
+ $adjustedValue = ($u * $value) / ($u * $value + $v);
+
+ return self::incompleteBeta($adjustedValue, $u / 2, $v / 2);
+ }
+
+ return (self::gamma(($v + $u) / 2) / (self::gamma($u / 2) * self::gamma($v / 2))) *
+ (($u / $v) ** ($u / 2)) *
+ (($value ** (($u - 2) / 2)) / ((1 + ($u / $v) * $value) ** (($u + $v) / 2)));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FISHER.
+ *
+ * Returns the Fisher transformation at x. This transformation produces a function that
+ * is normally distributed rather than skewed. Use this function to perform hypothesis
+ * testing on the correlation coefficient.
+ *
+ * @param float $value
+ *
+ * @return float|string
+ */
+ public static function FISHER($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (is_numeric($value)) {
+ if (($value <= -1) || ($value >= 1)) {
+ return Functions::NAN();
+ }
+
+ return 0.5 * log((1 + $value) / (1 - $value));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FISHERINV.
+ *
+ * Returns the inverse of the Fisher transformation. Use this transformation when
+ * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then
+ * FISHERINV(y) = x.
+ *
+ * @param float $value
+ *
+ * @return float|string
+ */
+ public static function FISHERINV($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (is_numeric($value)) {
+ return (exp(2 * $value) - 1) / (exp(2 * $value) + 1);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FORECAST.
+ *
+ * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value.
+ *
+ * @param float $xValue Value of X for which we want to find Y
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param mixed $xValues of mixed Data Series X
+ *
+ * @return bool|float|string
+ */
+ public static function FORECAST($xValue, $yValues, $xValues)
+ {
+ $xValue = Functions::flattenSingleValue($xValue);
+ if (!is_numeric($xValue)) {
+ return Functions::VALUE();
+ } elseif (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getValueOfYForX($xValue);
+ }
+
+ /**
+ * GAMMA.
+ *
+ * Return the gamma function value.
+ *
+ * @param float $value
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function GAMMAFunction($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ } elseif ((((int) $value) == ((float) $value)) && $value <= 0.0) {
+ return Functions::NAN();
+ }
+
+ return self::gamma($value);
+ }
+
+ /**
+ * GAMMADIST.
+ *
+ * Returns the gamma distribution.
+ *
+ * @param float $value Value at which you want to evaluate the distribution
+ * @param float $a Parameter to the distribution
+ * @param float $b Parameter to the distribution
+ * @param bool $cumulative
+ *
+ * @return float|string
+ */
+ public static function GAMMADIST($value, $a, $b, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $a = Functions::flattenSingleValue($a);
+ $b = Functions::flattenSingleValue($b);
+
+ if ((is_numeric($value)) && (is_numeric($a)) && (is_numeric($b))) {
+ if (($value < 0) || ($a <= 0) || ($b <= 0)) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ return self::incompleteGamma($a, $value / $b) / self::gamma($a);
+ }
+
+ return (1 / ($b ** $a * self::gamma($a))) * $value ** ($a - 1) * exp(0 - ($value / $b));
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * GAMMAINV.
+ *
+ * Returns the inverse of the Gamma distribution.
+ *
+ * @param float $probability Probability at which you want to evaluate the distribution
+ * @param float $alpha Parameter to the distribution
+ * @param float $beta Parameter to the distribution
+ *
+ * @return float|string
+ */
+ public static function GAMMAINV($probability, $alpha, $beta)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+
+ if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta))) {
+ if (($alpha <= 0) || ($beta <= 0) || ($probability < 0) || ($probability > 1)) {
+ return Functions::NAN();
+ }
+
+ $xLo = 0;
+ $xHi = $alpha * $beta * 5;
+
+ $x = $xNew = 1;
+ $dx = 1024;
+ $i = 0;
+
+ while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
+ // Apply Newton-Raphson step
+ $error = self::GAMMADIST($x, $alpha, $beta, true) - $probability;
+ if ($error < 0.0) {
+ $xLo = $x;
+ } else {
+ $xHi = $x;
+ }
+ $pdf = self::GAMMADIST($x, $alpha, $beta, false);
+ // Avoid division by zero
+ if ($pdf != 0.0) {
+ $dx = $error / $pdf;
+ $xNew = $x - $dx;
+ }
+ // If the NR fails to converge (which for example may be the
+ // case if the initial guess is too rough) we apply a bisection
+ // step to determine a more narrow interval around the root.
+ if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) {
+ $xNew = ($xLo + $xHi) / 2;
+ $dx = $xNew - $x;
+ }
+ $x = $xNew;
+ }
+ if ($i == self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return $x;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * GAMMALN.
+ *
+ * Returns the natural logarithm of the gamma function.
+ *
+ * @param float $value
+ *
+ * @return float|string
+ */
+ public static function GAMMALN($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (is_numeric($value)) {
+ if ($value <= 0) {
+ return Functions::NAN();
+ }
+
+ return log(self::gamma($value));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * GAUSS.
+ *
+ * Calculates the probability that a member of a standard normal population will fall between
+ * the mean and z standard deviations from the mean.
+ *
+ * @param float $value
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function GAUSS($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ }
+
+ return self::NORMDIST($value, 0, 1, true) - 0.5;
+ }
+
+ /**
+ * GEOMEAN.
+ *
+ * Returns the geometric mean of an array or range of positive data. For example, you
+ * can use GEOMEAN to calculate average growth rate given compound interest with
+ * variable rates.
+ *
+ * Excel Function:
+ * GEOMEAN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function GEOMEAN(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ $aMean = MathTrig::PRODUCT($aArgs);
+ if (is_numeric($aMean) && ($aMean > 0)) {
+ $aCount = self::COUNT($aArgs);
+ if (self::MIN($aArgs) > 0) {
+ return $aMean ** (1 / $aCount);
+ }
+ }
+
+ return Functions::NAN();
+ }
+
+ /**
+ * GROWTH.
+ *
+ * Returns values along a predicted exponential Trend
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ * @param mixed[] $newValues Values of X for which we want to find Y
+ * @param bool $const a logical value specifying whether to force the intersect to equal 0
+ *
+ * @return array of float
+ */
+ public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true)
+ {
+ $yValues = Functions::flattenArray($yValues);
+ $xValues = Functions::flattenArray($xValues);
+ $newValues = Functions::flattenArray($newValues);
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+
+ $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
+ if (empty($newValues)) {
+ $newValues = $bestFitExponential->getXValues();
+ }
+
+ $returnArray = [];
+ foreach ($newValues as $xValue) {
+ $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue);
+ }
+
+ return $returnArray;
+ }
+
+ /**
+ * HARMEAN.
+ *
+ * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the
+ * arithmetic mean of reciprocals.
+ *
+ * Excel Function:
+ * HARMEAN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function HARMEAN(...$args)
+ {
+ // Return value
+ $returnValue = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ if (self::MIN($aArgs) < 0) {
+ return Functions::NAN();
+ }
+ $aCount = 0;
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($arg <= 0) {
+ return Functions::NAN();
+ }
+ $returnValue += (1 / $arg);
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if ($aCount > 0) {
+ return 1 / ($returnValue / $aCount);
+ }
+
+ return Functions::NA();
+ }
+
+ /**
+ * HYPGEOMDIST.
+ *
+ * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of
+ * sample successes, given the sample size, population successes, and population size.
+ *
+ * @param float $sampleSuccesses Number of successes in the sample
+ * @param float $sampleNumber Size of the sample
+ * @param float $populationSuccesses Number of successes in the population
+ * @param float $populationNumber Population size
+ *
+ * @return float|string
+ */
+ public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber)
+ {
+ $sampleSuccesses = Functions::flattenSingleValue($sampleSuccesses);
+ $sampleNumber = Functions::flattenSingleValue($sampleNumber);
+ $populationSuccesses = Functions::flattenSingleValue($populationSuccesses);
+ $populationNumber = Functions::flattenSingleValue($populationNumber);
+
+ if ((is_numeric($sampleSuccesses)) && (is_numeric($sampleNumber)) && (is_numeric($populationSuccesses)) && (is_numeric($populationNumber))) {
+ $sampleSuccesses = floor($sampleSuccesses);
+ $sampleNumber = floor($sampleNumber);
+ $populationSuccesses = floor($populationSuccesses);
+ $populationNumber = floor($populationNumber);
+
+ if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) {
+ return Functions::NAN();
+ }
+ if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) {
+ return Functions::NAN();
+ }
+ if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) {
+ return Functions::NAN();
+ }
+
+ return MathTrig::COMBIN($populationSuccesses, $sampleSuccesses) *
+ MathTrig::COMBIN($populationNumber - $populationSuccesses, $sampleNumber - $sampleSuccesses) /
+ MathTrig::COMBIN($populationNumber, $sampleNumber);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * INTERCEPT.
+ *
+ * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string
+ */
+ public static function INTERCEPT($yValues, $xValues)
+ {
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getIntersect();
+ }
+
+ /**
+ * KURT.
+ *
+ * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness
+ * or flatness of a distribution compared with the normal distribution. Positive
+ * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a
+ * relatively flat distribution.
+ *
+ * @param array ...$args Data Series
+ *
+ * @return float|string
+ */
+ public static function KURT(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $mean = self::AVERAGE($aArgs);
+ $stdDev = self::STDEV($aArgs);
+
+ if ($stdDev > 0) {
+ $count = $summer = 0;
+ // Loop through arguments
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summer += (($arg - $mean) / $stdDev) ** 4;
+ ++$count;
+ }
+ }
+ }
+
+ // Return
+ if ($count > 3) {
+ return $summer * ($count * ($count + 1) / (($count - 1) * ($count - 2) * ($count - 3))) - (3 * ($count - 1) ** 2 / (($count - 2) * ($count - 3)));
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * LARGE.
+ *
+ * Returns the nth largest value in a data set. You can use this function to
+ * select a value based on its relative standing.
+ *
+ * Excel Function:
+ * LARGE(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function LARGE(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+ $entry = array_pop($aArgs);
+
+ if ((is_numeric($entry)) && (!is_string($entry))) {
+ $entry = (int) floor($entry);
+
+ // Calculate
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+ $count = self::COUNT($mArgs);
+ --$entry;
+ if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
+ return Functions::NAN();
+ }
+ rsort($mArgs);
+
+ return $mArgs[$entry];
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * LINEST.
+ *
+ * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data,
+ * and then returns an array that describes the line.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param null|mixed[] $xValues Data Series X
+ * @param bool $const a logical value specifying whether to force the intersect to equal 0
+ * @param bool $stats a logical value specifying whether to return additional regression statistics
+ *
+ * @return array|int|string The result, or a string containing an error
+ */
+ public static function LINEST($yValues, $xValues = null, $const = true, $stats = false)
+ {
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+ $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
+ if ($xValues === null) {
+ $xValues = range(1, count(Functions::flattenArray($yValues)));
+ }
+
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return 0;
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
+ if ($stats) {
+ return [
+ [
+ $bestFitLinear->getSlope(),
+ $bestFitLinear->getSlopeSE(),
+ $bestFitLinear->getGoodnessOfFit(),
+ $bestFitLinear->getF(),
+ $bestFitLinear->getSSRegression(),
+ ],
+ [
+ $bestFitLinear->getIntersect(),
+ $bestFitLinear->getIntersectSE(),
+ $bestFitLinear->getStdevOfResiduals(),
+ $bestFitLinear->getDFResiduals(),
+ $bestFitLinear->getSSResiduals(),
+ ],
+ ];
+ }
+
+ return [
+ $bestFitLinear->getSlope(),
+ $bestFitLinear->getIntersect(),
+ ];
+ }
+
+ /**
+ * LOGEST.
+ *
+ * Calculates an exponential curve that best fits the X and Y data series,
+ * and then returns an array that describes the line.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param null|mixed[] $xValues Data Series X
+ * @param bool $const a logical value specifying whether to force the intersect to equal 0
+ * @param bool $stats a logical value specifying whether to return additional regression statistics
+ *
+ * @return array|int|string The result, or a string containing an error
+ */
+ public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false)
+ {
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+ $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
+ if ($xValues === null) {
+ $xValues = range(1, count(Functions::flattenArray($yValues)));
+ }
+
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ foreach ($yValues as $value) {
+ if ($value <= 0.0) {
+ return Functions::NAN();
+ }
+ }
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return 1;
+ }
+
+ $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
+ if ($stats) {
+ return [
+ [
+ $bestFitExponential->getSlope(),
+ $bestFitExponential->getSlopeSE(),
+ $bestFitExponential->getGoodnessOfFit(),
+ $bestFitExponential->getF(),
+ $bestFitExponential->getSSRegression(),
+ ],
+ [
+ $bestFitExponential->getIntersect(),
+ $bestFitExponential->getIntersectSE(),
+ $bestFitExponential->getStdevOfResiduals(),
+ $bestFitExponential->getDFResiduals(),
+ $bestFitExponential->getSSResiduals(),
+ ],
+ ];
+ }
+
+ return [
+ $bestFitExponential->getSlope(),
+ $bestFitExponential->getIntersect(),
+ ];
+ }
+
+ /**
+ * LOGINV.
+ *
+ * Returns the inverse of the normal cumulative distribution
+ *
+ * @param float $probability
+ * @param float $mean
+ * @param float $stdDev
+ *
+ * @return float|string The result, or a string containing an error
+ *
+ * @TODO Try implementing P J Acklam's refinement algorithm for greater
+ * accuracy if I can get my head round the mathematics
+ * (as described at) http://home.online.no/~pjacklam/notes/invnorm/
+ */
+ public static function LOGINV($probability, $mean, $stdDev)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if (($probability < 0) || ($probability > 1) || ($stdDev <= 0)) {
+ return Functions::NAN();
+ }
+
+ return exp($mean + $stdDev * self::NORMSINV($probability));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * LOGNORMDIST.
+ *
+ * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed
+ * with parameters mean and standard_dev.
+ *
+ * @param float $value
+ * @param float $mean
+ * @param float $stdDev
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function LOGNORMDIST($value, $mean, $stdDev)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if (($value <= 0) || ($stdDev <= 0)) {
+ return Functions::NAN();
+ }
+
+ return self::NORMSDIST((log($value) - $mean) / $stdDev);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * LOGNORM.DIST.
+ *
+ * Returns the lognormal distribution of x, where ln(x) is normally distributed
+ * with parameters mean and standard_dev.
+ *
+ * @param float $value
+ * @param float $mean
+ * @param float $stdDev
+ * @param bool $cumulative
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function LOGNORMDIST2($value, $mean, $stdDev, $cumulative = false)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+ $cumulative = (bool) Functions::flattenSingleValue($cumulative);
+
+ if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if (($value <= 0) || ($stdDev <= 0)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative === true) {
+ return self::NORMSDIST2((log($value) - $mean) / $stdDev, true);
+ }
+
+ return (1 / (sqrt(2 * M_PI) * $stdDev * $value)) *
+ exp(0 - ((log($value) - $mean) ** 2 / (2 * $stdDev ** 2)));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * MAX.
+ *
+ * MAX returns the value of the element of the values passed that has the highest value,
+ * with negative numbers considered smaller than positive numbers.
+ *
+ * Excel Function:
+ * MAX(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function MAX(...$args)
+ {
+ $returnValue = null;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if (($returnValue === null) || ($arg > $returnValue)) {
+ $returnValue = $arg;
+ }
+ }
+ }
+
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MAXA.
+ *
+ * Returns the greatest value in a list of arguments, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * MAXA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function MAXA(...$args)
+ {
+ $returnValue = null;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ if (($returnValue === null) || ($arg > $returnValue)) {
+ $returnValue = $arg;
+ }
+ }
+ }
+
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MAXIFS.
+ *
+ * Counts the maximum value within a range of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
+ *
+ * @param mixed $args Data range and criterias
+ *
+ * @return float
+ */
+ public static function MAXIFS(...$args)
+ {
+ $arrayList = $args;
+
+ // Return value
+ $returnValue = null;
+
+ $maxArgs = Functions::flattenArray(array_shift($arrayList));
+ $aArgsArray = [];
+ $conditions = [];
+
+ while (count($arrayList) > 0) {
+ $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
+ $conditions[] = Functions::ifCondition(array_shift($arrayList));
+ }
+
+ // Loop through each arg and see if arguments and conditions are true
+ foreach ($maxArgs as $index => $value) {
+ $valid = true;
+
+ foreach ($conditions as $cidx => $condition) {
+ $arg = $aArgsArray[$cidx][$index];
+
+ // Loop through arguments
+ if (!is_numeric($arg)) {
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ // Is not a value within our criteria
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ }
+
+ if ($valid) {
+ $returnValue = $returnValue === null ? $value : max($value, $returnValue);
+ }
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ /**
+ * MEDIAN.
+ *
+ * Returns the median of the given numbers. The median is the number in the middle of a set of numbers.
+ *
+ * Excel Function:
+ * MEDIAN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function MEDIAN(...$args)
+ {
+ $returnValue = Functions::NAN();
+
+ $mArgs = [];
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+
+ $mValueCount = count($mArgs);
+ if ($mValueCount > 0) {
+ sort($mArgs, SORT_NUMERIC);
+ $mValueCount = $mValueCount / 2;
+ if ($mValueCount == floor($mValueCount)) {
+ $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2;
+ } else {
+ $mValueCount = floor($mValueCount);
+ $returnValue = $mArgs[$mValueCount];
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MIN.
+ *
+ * MIN returns the value of the element of the values passed that has the smallest value,
+ * with negative numbers considered smaller than positive numbers.
+ *
+ * Excel Function:
+ * MIN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function MIN(...$args)
+ {
+ $returnValue = null;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if (($returnValue === null) || ($arg < $returnValue)) {
+ $returnValue = $arg;
+ }
+ }
+ }
+
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MINA.
+ *
+ * Returns the smallest value in a list of arguments, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * MINA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float
+ */
+ public static function MINA(...$args)
+ {
+ $returnValue = null;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ if (($returnValue === null) || ($arg < $returnValue)) {
+ $returnValue = $arg;
+ }
+ }
+ }
+
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MINIFS.
+ *
+ * Returns the minimum value within a range of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
+ *
+ * @param mixed $args Data range and criterias
+ *
+ * @return float
+ */
+ public static function MINIFS(...$args)
+ {
+ $arrayList = $args;
+
+ // Return value
+ $returnValue = null;
+
+ $minArgs = Functions::flattenArray(array_shift($arrayList));
+ $aArgsArray = [];
+ $conditions = [];
+
+ while (count($arrayList) > 0) {
+ $aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
+ $conditions[] = Functions::ifCondition(array_shift($arrayList));
+ }
+
+ // Loop through each arg and see if arguments and conditions are true
+ foreach ($minArgs as $index => $value) {
+ $valid = true;
+
+ foreach ($conditions as $cidx => $condition) {
+ $arg = $aArgsArray[$cidx][$index];
+
+ // Loop through arguments
+ if (!is_numeric($arg)) {
+ $arg = Calculation::wrapResult(strtoupper($arg));
+ }
+ $testCondition = '=' . $arg . $condition;
+ if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
+ // Is not a value within our criteria
+ $valid = false;
+
+ break; // if false found, don't need to check other conditions
+ }
+ }
+
+ if ($valid) {
+ $returnValue = $returnValue === null ? $value : min($value, $returnValue);
+ }
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ //
+ // Special variant of array_count_values that isn't limited to strings and integers,
+ // but can work with floating point numbers as values
+ //
+ private static function modeCalc($data)
+ {
+ $frequencyArray = [];
+ $index = 0;
+ $maxfreq = 0;
+ $maxfreqkey = '';
+ $maxfreqdatum = '';
+ foreach ($data as $datum) {
+ $found = false;
+ ++$index;
+ foreach ($frequencyArray as $key => $value) {
+ if ((string) $value['value'] == (string) $datum) {
+ ++$frequencyArray[$key]['frequency'];
+ $freq = $frequencyArray[$key]['frequency'];
+ if ($freq > $maxfreq) {
+ $maxfreq = $freq;
+ $maxfreqkey = $key;
+ $maxfreqdatum = $datum;
+ } elseif ($freq == $maxfreq) {
+ if ($frequencyArray[$key]['index'] < $frequencyArray[$maxfreqkey]['index']) {
+ $maxfreqkey = $key;
+ $maxfreqdatum = $datum;
+ }
+ }
+ $found = true;
+
+ break;
+ }
+ }
+ if (!$found) {
+ $frequencyArray[] = [
+ 'value' => $datum,
+ 'frequency' => 1,
+ 'index' => $index,
+ ];
+ }
+ }
+
+ if ($maxfreq <= 1) {
+ return Functions::NA();
+ }
+
+ return $maxfreqdatum;
+ }
+
+ /**
+ * MODE.
+ *
+ * Returns the most frequently occurring, or repetitive, value in an array or range of data
+ *
+ * Excel Function:
+ * MODE(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function MODE(...$args)
+ {
+ $returnValue = Functions::NA();
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+
+ if (!empty($mArgs)) {
+ return self::modeCalc($mArgs);
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * NEGBINOMDIST.
+ *
+ * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that
+ * there will be number_f failures before the number_s-th success, when the constant
+ * probability of a success is probability_s. This function is similar to the binomial
+ * distribution, except that the number of successes is fixed, and the number of trials is
+ * variable. Like the binomial, trials are assumed to be independent.
+ *
+ * @param float $failures Number of Failures
+ * @param float $successes Threshold number of Successes
+ * @param float $probability Probability of success on each trial
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NEGBINOMDIST($failures, $successes, $probability)
+ {
+ $failures = floor(Functions::flattenSingleValue($failures));
+ $successes = floor(Functions::flattenSingleValue($successes));
+ $probability = Functions::flattenSingleValue($probability);
+
+ if ((is_numeric($failures)) && (is_numeric($successes)) && (is_numeric($probability))) {
+ if (($failures < 0) || ($successes < 1)) {
+ return Functions::NAN();
+ } elseif (($probability < 0) || ($probability > 1)) {
+ return Functions::NAN();
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ if (($failures + $successes - 1) <= 0) {
+ return Functions::NAN();
+ }
+ }
+
+ return (MathTrig::COMBIN($failures + $successes - 1, $successes - 1)) * ($probability ** $successes) * ((1 - $probability) ** $failures);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * NORMDIST.
+ *
+ * Returns the normal distribution for the specified mean and standard deviation. This
+ * function has a very wide range of applications in statistics, including hypothesis
+ * testing.
+ *
+ * @param float $value
+ * @param float $mean Mean Value
+ * @param float $stdDev Standard Deviation
+ * @param bool $cumulative
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NORMDIST($value, $mean, $stdDev, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if ($stdDev < 0) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ return 0.5 * (1 + Engineering::erfVal(($value - $mean) / ($stdDev * sqrt(2))));
+ }
+
+ return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (($value - $mean) ** 2 / (2 * ($stdDev * $stdDev))));
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * NORMINV.
+ *
+ * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
+ *
+ * @param float $probability
+ * @param float $mean Mean Value
+ * @param float $stdDev Standard Deviation
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NORMINV($probability, $mean, $stdDev)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if (($probability < 0) || ($probability > 1)) {
+ return Functions::NAN();
+ }
+ if ($stdDev < 0) {
+ return Functions::NAN();
+ }
+
+ return (self::inverseNcdf($probability) * $stdDev) + $mean;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * NORMSDIST.
+ *
+ * Returns the standard normal cumulative distribution function. The distribution has
+ * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a
+ * table of standard normal curve areas.
+ *
+ * @param float $value
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NORMSDIST($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ }
+
+ return self::NORMDIST($value, 0, 1, true);
+ }
+
+ /**
+ * NORM.S.DIST.
+ *
+ * Returns the standard normal cumulative distribution function. The distribution has
+ * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a
+ * table of standard normal curve areas.
+ *
+ * @param float $value
+ * @param bool $cumulative
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NORMSDIST2($value, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ if (!is_numeric($value)) {
+ return Functions::VALUE();
+ }
+ $cumulative = (bool) Functions::flattenSingleValue($cumulative);
+
+ return self::NORMDIST($value, 0, 1, $cumulative);
+ }
+
+ /**
+ * NORMSINV.
+ *
+ * Returns the inverse of the standard normal cumulative distribution
+ *
+ * @param float $value
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function NORMSINV($value)
+ {
+ return self::NORMINV($value, 0, 1);
+ }
+
+ /**
+ * PERCENTILE.
+ *
+ * Returns the nth percentile of values in a range..
+ *
+ * Excel Function:
+ * PERCENTILE(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function PERCENTILE(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $entry = array_pop($aArgs);
+
+ if ((is_numeric($entry)) && (!is_string($entry))) {
+ if (($entry < 0) || ($entry > 1)) {
+ return Functions::NAN();
+ }
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+ $mValueCount = count($mArgs);
+ if ($mValueCount > 0) {
+ sort($mArgs);
+ $count = self::COUNT($mArgs);
+ $index = $entry * ($count - 1);
+ $iBase = floor($index);
+ if ($index == $iBase) {
+ return $mArgs[$index];
+ }
+ $iNext = $iBase + 1;
+ $iProportion = $index - $iBase;
+
+ return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * PERCENTRANK.
+ *
+ * Returns the rank of a value in a data set as a percentage of the data set.
+ *
+ * @param float[] $valueSet An array of, or a reference to, a list of numbers
+ * @param int $value the number whose rank you want to find
+ * @param int $significance the number of significant digits for the returned percentage value
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function PERCENTRANK($valueSet, $value, $significance = 3)
+ {
+ $valueSet = Functions::flattenArray($valueSet);
+ $value = Functions::flattenSingleValue($value);
+ $significance = ($significance === null) ? 3 : (int) Functions::flattenSingleValue($significance);
+
+ foreach ($valueSet as $key => $valueEntry) {
+ if (!is_numeric($valueEntry)) {
+ unset($valueSet[$key]);
+ }
+ }
+ sort($valueSet, SORT_NUMERIC);
+ $valueCount = count($valueSet);
+ if ($valueCount == 0) {
+ return Functions::NAN();
+ }
+
+ $valueAdjustor = $valueCount - 1;
+ if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) {
+ return Functions::NA();
+ }
+
+ $pos = array_search($value, $valueSet);
+ if ($pos === false) {
+ $pos = 0;
+ $testValue = $valueSet[0];
+ while ($testValue < $value) {
+ $testValue = $valueSet[++$pos];
+ }
+ --$pos;
+ $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos]));
+ }
+
+ return round($pos / $valueAdjustor, $significance);
+ }
+
+ /**
+ * PERMUT.
+ *
+ * Returns the number of permutations for a given number of objects that can be
+ * selected from number objects. A permutation is any set or subset of objects or
+ * events where internal order is significant. Permutations are different from
+ * combinations, for which the internal order is not significant. Use this function
+ * for lottery-style probability calculations.
+ *
+ * @param int $numObjs Number of different objects
+ * @param int $numInSet Number of objects in each permutation
+ *
+ * @return int|string Number of permutations, or a string containing an error
+ */
+ public static function PERMUT($numObjs, $numInSet)
+ {
+ $numObjs = Functions::flattenSingleValue($numObjs);
+ $numInSet = Functions::flattenSingleValue($numInSet);
+
+ if ((is_numeric($numObjs)) && (is_numeric($numInSet))) {
+ $numInSet = floor($numInSet);
+ if ($numObjs < $numInSet) {
+ return Functions::NAN();
+ }
+
+ return round(MathTrig::FACT($numObjs) / MathTrig::FACT($numObjs - $numInSet));
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * POISSON.
+ *
+ * Returns the Poisson distribution. A common application of the Poisson distribution
+ * is predicting the number of events over a specific time, such as the number of
+ * cars arriving at a toll plaza in 1 minute.
+ *
+ * @param float $value
+ * @param float $mean Mean Value
+ * @param bool $cumulative
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function POISSON($value, $mean, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+
+ if ((is_numeric($value)) && (is_numeric($mean))) {
+ if (($value < 0) || ($mean <= 0)) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ $summer = 0;
+ $floor = floor($value);
+ for ($i = 0; $i <= $floor; ++$i) {
+ $summer += $mean ** $i / MathTrig::FACT($i);
+ }
+
+ return exp(0 - $mean) * $summer;
+ }
+
+ return (exp(0 - $mean) * $mean ** $value) / MathTrig::FACT($value);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * QUARTILE.
+ *
+ * Returns the quartile of a data set.
+ *
+ * Excel Function:
+ * QUARTILE(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function QUARTILE(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $entry = floor(array_pop($aArgs));
+
+ if ((is_numeric($entry)) && (!is_string($entry))) {
+ $entry /= 4;
+ if (($entry < 0) || ($entry > 1)) {
+ return Functions::NAN();
+ }
+
+ return self::PERCENTILE($aArgs, $entry);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * RANK.
+ *
+ * Returns the rank of a number in a list of numbers.
+ *
+ * @param int $value the number whose rank you want to find
+ * @param float[] $valueSet An array of, or a reference to, a list of numbers
+ * @param int $order Order to sort the values in the value set
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function RANK($value, $valueSet, $order = 0)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $valueSet = Functions::flattenArray($valueSet);
+ $order = ($order === null) ? 0 : (int) Functions::flattenSingleValue($order);
+
+ foreach ($valueSet as $key => $valueEntry) {
+ if (!is_numeric($valueEntry)) {
+ unset($valueSet[$key]);
+ }
+ }
+
+ if ($order == 0) {
+ rsort($valueSet, SORT_NUMERIC);
+ } else {
+ sort($valueSet, SORT_NUMERIC);
+ }
+ $pos = array_search($value, $valueSet);
+ if ($pos === false) {
+ return Functions::NA();
+ }
+
+ return ++$pos;
+ }
+
+ /**
+ * RSQ.
+ *
+ * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function RSQ($yValues, $xValues)
+ {
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getGoodnessOfFit();
+ }
+
+ /**
+ * SKEW.
+ *
+ * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry
+ * of a distribution around its mean. Positive skewness indicates a distribution with an
+ * asymmetric tail extending toward more positive values. Negative skewness indicates a
+ * distribution with an asymmetric tail extending toward more negative values.
+ *
+ * @param array ...$args Data Series
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SKEW(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $mean = self::AVERAGE($aArgs);
+ $stdDev = self::STDEV($aArgs);
+
+ $count = $summer = 0;
+ // Loop through arguments
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summer += (($arg - $mean) / $stdDev) ** 3;
+ ++$count;
+ }
+ }
+ }
+
+ if ($count > 2) {
+ return $summer * ($count / (($count - 1) * ($count - 2)));
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * SLOPE.
+ *
+ * Returns the slope of the linear regression line through data points in known_y's and known_x's.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SLOPE($yValues, $xValues)
+ {
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getSlope();
+ }
+
+ /**
+ * SMALL.
+ *
+ * Returns the nth smallest value in a data set. You can use this function to
+ * select a value based on its relative standing.
+ *
+ * Excel Function:
+ * SMALL(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SMALL(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $entry = array_pop($aArgs);
+
+ if ((is_numeric($entry)) && (!is_string($entry))) {
+ $entry = (int) floor($entry);
+
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+ $count = self::COUNT($mArgs);
+ --$entry;
+ if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
+ return Functions::NAN();
+ }
+ sort($mArgs);
+
+ return $mArgs[$entry];
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * STANDARDIZE.
+ *
+ * Returns a normalized value from a distribution characterized by mean and standard_dev.
+ *
+ * @param float $value Value to normalize
+ * @param float $mean Mean Value
+ * @param float $stdDev Standard Deviation
+ *
+ * @return float|string Standardized value, or a string containing an error
+ */
+ public static function STANDARDIZE($value, $mean, $stdDev)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
+ if ($stdDev <= 0) {
+ return Functions::NAN();
+ }
+
+ return ($value - $mean) / $stdDev;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * STDEV.
+ *
+ * Estimates standard deviation based on a sample. The standard deviation is a measure of how
+ * widely values are dispersed from the average value (the mean).
+ *
+ * Excel Function:
+ * STDEV(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function STDEV(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ // Return value
+ $returnValue = null;
+
+ $aMean = self::AVERAGE($aArgs);
+ if ($aMean !== null) {
+ $aCount = -1;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
+ ) {
+ $arg = (int) $arg;
+ }
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($returnValue === null) {
+ $returnValue = ($arg - $aMean) ** 2;
+ } else {
+ $returnValue += ($arg - $aMean) ** 2;
+ }
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if (($aCount > 0) && ($returnValue >= 0)) {
+ return sqrt($returnValue / $aCount);
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * STDEVA.
+ *
+ * Estimates standard deviation based on a sample, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * STDEVA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function STDEVA(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ $returnValue = null;
+
+ $aMean = self::AVERAGEA($aArgs);
+ if ($aMean !== null) {
+ $aCount = -1;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ if ($returnValue === null) {
+ $returnValue = ($arg - $aMean) ** 2;
+ } else {
+ $returnValue += ($arg - $aMean) ** 2;
+ }
+ ++$aCount;
+ }
+ }
+ }
+
+ if (($aCount > 0) && ($returnValue >= 0)) {
+ return sqrt($returnValue / $aCount);
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * STDEVP.
+ *
+ * Calculates standard deviation based on the entire population
+ *
+ * Excel Function:
+ * STDEVP(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function STDEVP(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ $returnValue = null;
+
+ $aMean = self::AVERAGE($aArgs);
+ if ($aMean !== null) {
+ $aCount = 0;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
+ ) {
+ $arg = (int) $arg;
+ }
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($returnValue === null) {
+ $returnValue = ($arg - $aMean) ** 2;
+ } else {
+ $returnValue += ($arg - $aMean) ** 2;
+ }
+ ++$aCount;
+ }
+ }
+
+ if (($aCount > 0) && ($returnValue >= 0)) {
+ return sqrt($returnValue / $aCount);
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * STDEVPA.
+ *
+ * Calculates standard deviation based on the entire population, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * STDEVPA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function STDEVPA(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ $returnValue = null;
+
+ $aMean = self::AVERAGEA($aArgs);
+ if ($aMean !== null) {
+ $aCount = 0;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_bool($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ if ($returnValue === null) {
+ $returnValue = ($arg - $aMean) ** 2;
+ } else {
+ $returnValue += ($arg - $aMean) ** 2;
+ }
+ ++$aCount;
+ }
+ }
+ }
+
+ if (($aCount > 0) && ($returnValue >= 0)) {
+ return sqrt($returnValue / $aCount);
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * STEYX.
+ *
+ * Returns the standard error of the predicted y-value for each x in the regression.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string
+ */
+ public static function STEYX($yValues, $xValues)
+ {
+ if (!self::checkTrendArrays($yValues, $xValues)) {
+ return Functions::VALUE();
+ }
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
+ return Functions::NA();
+ } elseif ($yValueCount == 1) {
+ return Functions::DIV0();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getStdevOfResiduals();
+ }
+
+ /**
+ * TDIST.
+ *
+ * Returns the probability of Student's T distribution.
+ *
+ * @param float $value Value for the function
+ * @param float $degrees degrees of freedom
+ * @param float $tails number of tails (1 or 2)
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function TDIST($value, $degrees, $tails)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $degrees = floor(Functions::flattenSingleValue($degrees));
+ $tails = floor(Functions::flattenSingleValue($tails));
+
+ if ((is_numeric($value)) && (is_numeric($degrees)) && (is_numeric($tails))) {
+ if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) {
+ return Functions::NAN();
+ }
+ // tdist, which finds the probability that corresponds to a given value
+ // of t with k degrees of freedom. This algorithm is translated from a
+ // pascal function on p81 of "Statistical Computing in Pascal" by D
+ // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd:
+ // London). The above Pascal algorithm is itself a translation of the
+ // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer
+ // Laboratory as reported in (among other places) "Applied Statistics
+ // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis
+ // Horwood Ltd.; W. Sussex, England).
+ $tterm = $degrees;
+ $ttheta = atan2($value, sqrt($tterm));
+ $tc = cos($ttheta);
+ $ts = sin($ttheta);
+
+ if (($degrees % 2) == 1) {
+ $ti = 3;
+ $tterm = $tc;
+ } else {
+ $ti = 2;
+ $tterm = 1;
+ }
+
+ $tsum = $tterm;
+ while ($ti < $degrees) {
+ $tterm *= $tc * $tc * ($ti - 1) / $ti;
+ $tsum += $tterm;
+ $ti += 2;
+ }
+ $tsum *= $ts;
+ if (($degrees % 2) == 1) {
+ $tsum = Functions::M_2DIVPI * ($tsum + $ttheta);
+ }
+ $tValue = 0.5 * (1 + $tsum);
+ if ($tails == 1) {
+ return 1 - abs($tValue);
+ }
+
+ return 1 - abs((1 - $tValue) - $tValue);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * TINV.
+ *
+ * Returns the one-tailed probability of the chi-squared distribution.
+ *
+ * @param float $probability Probability for the function
+ * @param float $degrees degrees of freedom
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function TINV($probability, $degrees)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $degrees = floor(Functions::flattenSingleValue($degrees));
+
+ if ((is_numeric($probability)) && (is_numeric($degrees))) {
+ $xLo = 100;
+ $xHi = 0;
+
+ $x = $xNew = 1;
+ $dx = 1;
+ $i = 0;
+
+ while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
+ // Apply Newton-Raphson step
+ $result = self::TDIST($x, $degrees, 2);
+ $error = $result - $probability;
+ if ($error == 0.0) {
+ $dx = 0;
+ } elseif ($error < 0.0) {
+ $xLo = $x;
+ } else {
+ $xHi = $x;
+ }
+ // Avoid division by zero
+ if ($result != 0.0) {
+ $dx = $error / $result;
+ $xNew = $x - $dx;
+ }
+ // If the NR fails to converge (which for example may be the
+ // case if the initial guess is too rough) we apply a bisection
+ // step to determine a more narrow interval around the root.
+ if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {
+ $xNew = ($xLo + $xHi) / 2;
+ $dx = $xNew - $x;
+ }
+ $x = $xNew;
+ }
+ if ($i == self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return round($x, 12);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * TREND.
+ *
+ * Returns values along a linear Trend
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ * @param mixed[] $newValues Values of X for which we want to find Y
+ * @param bool $const a logical value specifying whether to force the intersect to equal 0
+ *
+ * @return array of float
+ */
+ public static function TREND($yValues, $xValues = [], $newValues = [], $const = true)
+ {
+ $yValues = Functions::flattenArray($yValues);
+ $xValues = Functions::flattenArray($xValues);
+ $newValues = Functions::flattenArray($newValues);
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
+ if (empty($newValues)) {
+ $newValues = $bestFitLinear->getXValues();
+ }
+
+ $returnArray = [];
+ foreach ($newValues as $xValue) {
+ $returnArray[0][] = $bestFitLinear->getValueOfYForX($xValue);
+ }
+
+ return $returnArray;
+ }
+
+ /**
+ * TRIMMEAN.
+ *
+ * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean
+ * taken by excluding a percentage of data points from the top and bottom tails
+ * of a data set.
+ *
+ * Excel Function:
+ * TRIMEAN(value1[,value2[, ...]], $discard)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string
+ */
+ public static function TRIMMEAN(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $percent = array_pop($aArgs);
+
+ if ((is_numeric($percent)) && (!is_string($percent))) {
+ if (($percent < 0) || ($percent > 1)) {
+ return Functions::NAN();
+ }
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+ $discard = floor(self::COUNT($mArgs) * $percent / 2);
+ sort($mArgs);
+ for ($i = 0; $i < $discard; ++$i) {
+ array_pop($mArgs);
+ array_shift($mArgs);
+ }
+
+ return self::AVERAGE($mArgs);
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * VARFunc.
+ *
+ * Estimates variance based on a sample.
+ *
+ * Excel Function:
+ * VAR(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function VARFunc(...$args)
+ {
+ $returnValue = Functions::DIV0();
+
+ $summerA = $summerB = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ $aCount = 0;
+ foreach ($aArgs as $arg) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ }
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summerA += ($arg * $arg);
+ $summerB += $arg;
+ ++$aCount;
+ }
+ }
+
+ if ($aCount > 1) {
+ $summerA *= $aCount;
+ $summerB *= $summerB;
+ $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1));
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * VARA.
+ *
+ * Estimates variance based on a sample, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * VARA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function VARA(...$args)
+ {
+ $returnValue = Functions::DIV0();
+
+ $summerA = $summerB = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $aCount = 0;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_string($arg)) &&
+ (Functions::isValue($k))
+ ) {
+ return Functions::VALUE();
+ } elseif (
+ (is_string($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ $summerA += ($arg * $arg);
+ $summerB += $arg;
+ ++$aCount;
+ }
+ }
+ }
+
+ if ($aCount > 1) {
+ $summerA *= $aCount;
+ $summerB *= $summerB;
+ $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1));
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * VARP.
+ *
+ * Calculates variance based on the entire population
+ *
+ * Excel Function:
+ * VARP(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function VARP(...$args)
+ {
+ // Return value
+ $returnValue = Functions::DIV0();
+
+ $summerA = $summerB = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ $aCount = 0;
+ foreach ($aArgs as $arg) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ }
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summerA += ($arg * $arg);
+ $summerB += $arg;
+ ++$aCount;
+ }
+ }
+
+ if ($aCount > 0) {
+ $summerA *= $aCount;
+ $summerB *= $summerB;
+ $returnValue = ($summerA - $summerB) / ($aCount * $aCount);
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * VARPA.
+ *
+ * Calculates variance based on the entire population, including numbers, text, and logical values
+ *
+ * Excel Function:
+ * VARPA(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function VARPA(...$args)
+ {
+ $returnValue = Functions::DIV0();
+
+ $summerA = $summerB = 0;
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $aCount = 0;
+ foreach ($aArgs as $k => $arg) {
+ if (
+ (is_string($arg)) &&
+ (Functions::isValue($k))
+ ) {
+ return Functions::VALUE();
+ } elseif (
+ (is_string($arg)) &&
+ (!Functions::isMatrixValue($k))
+ ) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) {
+ if (is_bool($arg)) {
+ $arg = (int) $arg;
+ } elseif (is_string($arg)) {
+ $arg = 0;
+ }
+ $summerA += ($arg * $arg);
+ $summerB += $arg;
+ ++$aCount;
+ }
+ }
+ }
+
+ if ($aCount > 0) {
+ $summerA *= $aCount;
+ $summerB *= $summerB;
+ $returnValue = ($summerA - $summerB) / ($aCount * $aCount);
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * WEIBULL.
+ *
+ * Returns the Weibull distribution. Use this distribution in reliability
+ * analysis, such as calculating a device's mean time to failure.
+ *
+ * @param float $value
+ * @param float $alpha Alpha Parameter
+ * @param float $beta Beta Parameter
+ * @param bool $cumulative
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function WEIBULL($value, $alpha, $beta, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+
+ if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta))) {
+ if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) {
+ return Functions::NAN();
+ }
+ if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
+ if ($cumulative) {
+ return 1 - exp(0 - ($value / $beta) ** $alpha);
+ }
+
+ return ($alpha / $beta ** $alpha) * $value ** ($alpha - 1) * exp(0 - ($value / $beta) ** $alpha);
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * ZTEST.
+ *
+ * Returns the Weibull distribution. Use this distribution in reliability
+ * analysis, such as calculating a device's mean time to failure.
+ *
+ * @param float $dataSet
+ * @param float $m0 Alpha Parameter
+ * @param float $sigma Beta Parameter
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function ZTEST($dataSet, $m0, $sigma = null)
+ {
+ $dataSet = Functions::flattenArrayIndexed($dataSet);
+ $m0 = Functions::flattenSingleValue($m0);
+ $sigma = Functions::flattenSingleValue($sigma);
+
+ if ($sigma === null) {
+ $sigma = self::STDEV($dataSet);
+ }
+ $n = count($dataSet);
+
+ return 1 - self::NORMSDIST((self::AVERAGE($dataSet) - $m0) / ($sigma / sqrt($n)));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php
new file mode 100644
index 0000000..a04ecdb
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php
@@ -0,0 +1,675 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use DateTimeInterface;
+use PhpOffice\PhpSpreadsheet\Shared\Date;
+use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
+use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
+
+class TextData
+{
+ private static $invalidChars;
+
+ private static function unicodeToOrd($character)
+ {
+ return unpack('V', iconv('UTF-8', 'UCS-4LE', $character))[1];
+ }
+
+ /**
+ * CHARACTER.
+ *
+ * @param string $character Value
+ *
+ * @return string
+ */
+ public static function CHARACTER($character)
+ {
+ $character = Functions::flattenSingleValue($character);
+
+ if ((!is_numeric($character)) || ($character < 0)) {
+ return Functions::VALUE();
+ }
+
+ if (function_exists('iconv')) {
+ return iconv('UCS-4LE', 'UTF-8', pack('V', $character));
+ }
+
+ return mb_convert_encoding('&#' . (int) $character . ';', 'UTF-8', 'HTML-ENTITIES');
+ }
+
+ /**
+ * TRIMNONPRINTABLE.
+ *
+ * @param mixed $stringValue Value to check
+ *
+ * @return string
+ */
+ public static function TRIMNONPRINTABLE($stringValue = '')
+ {
+ $stringValue = Functions::flattenSingleValue($stringValue);
+
+ if (is_bool($stringValue)) {
+ return ($stringValue) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (self::$invalidChars === null) {
+ self::$invalidChars = range(chr(0), chr(31));
+ }
+
+ if (is_string($stringValue) || is_numeric($stringValue)) {
+ return str_replace(self::$invalidChars, '', trim($stringValue, "\x00..\x1F"));
+ }
+
+ return null;
+ }
+
+ /**
+ * TRIMSPACES.
+ *
+ * @param mixed $stringValue Value to check
+ *
+ * @return string
+ */
+ public static function TRIMSPACES($stringValue = '')
+ {
+ $stringValue = Functions::flattenSingleValue($stringValue);
+ if (is_bool($stringValue)) {
+ return ($stringValue) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (is_string($stringValue) || is_numeric($stringValue)) {
+ return trim(preg_replace('/ +/', ' ', trim($stringValue, ' ')), ' ');
+ }
+
+ return null;
+ }
+
+ private static function convertBooleanValue($value)
+ {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ return (int) $value;
+ }
+
+ return ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ /**
+ * ASCIICODE.
+ *
+ * @param string $characters Value
+ *
+ * @return int|string A string if arguments are invalid
+ */
+ public static function ASCIICODE($characters)
+ {
+ if (($characters === null) || ($characters === '')) {
+ return Functions::VALUE();
+ }
+ $characters = Functions::flattenSingleValue($characters);
+ if (is_bool($characters)) {
+ $characters = self::convertBooleanValue($characters);
+ }
+
+ $character = $characters;
+ if (mb_strlen($characters, 'UTF-8') > 1) {
+ $character = mb_substr($characters, 0, 1, 'UTF-8');
+ }
+
+ return self::unicodeToOrd($character);
+ }
+
+ /**
+ * CONCATENATE.
+ *
+ * @return string
+ */
+ public static function CONCATENATE(...$args)
+ {
+ $returnValue = '';
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $arg) {
+ if (is_bool($arg)) {
+ $arg = self::convertBooleanValue($arg);
+ }
+ $returnValue .= $arg;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * DOLLAR.
+ *
+ * This function converts a number to text using currency format, with the decimals rounded to the specified place.
+ * The format used is $#,##0.00_);($#,##0.00)..
+ *
+ * @param float $value The value to format
+ * @param int $decimals The number of digits to display to the right of the decimal point.
+ * If decimals is negative, number is rounded to the left of the decimal point.
+ * If you omit decimals, it is assumed to be 2
+ *
+ * @return string
+ */
+ public static function DOLLAR($value = 0, $decimals = 2)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $decimals = $decimals === null ? 0 : Functions::flattenSingleValue($decimals);
+
+ // Validate parameters
+ if (!is_numeric($value) || !is_numeric($decimals)) {
+ return Functions::NAN();
+ }
+ $decimals = floor($decimals);
+
+ $mask = '$#,##0';
+ if ($decimals > 0) {
+ $mask .= '.' . str_repeat('0', $decimals);
+ } else {
+ $round = 10 ** abs($decimals);
+ if ($value < 0) {
+ $round = 0 - $round;
+ }
+ $value = MathTrig::MROUND($value, $round);
+ }
+
+ return NumberFormat::toFormattedString($value, $mask);
+ }
+
+ /**
+ * SEARCHSENSITIVE.
+ *
+ * @param string $needle The string to look for
+ * @param string $haystack The string in which to look
+ * @param int $offset Offset within $haystack
+ *
+ * @return string
+ */
+ public static function SEARCHSENSITIVE($needle, $haystack, $offset = 1)
+ {
+ $needle = Functions::flattenSingleValue($needle);
+ $haystack = Functions::flattenSingleValue($haystack);
+ $offset = Functions::flattenSingleValue($offset);
+
+ if (!is_bool($needle)) {
+ if (is_bool($haystack)) {
+ $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) {
+ if (StringHelper::countCharacters($needle) === 0) {
+ return $offset;
+ }
+
+ $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');
+ if ($pos !== false) {
+ return ++$pos;
+ }
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SEARCHINSENSITIVE.
+ *
+ * @param string $needle The string to look for
+ * @param string $haystack The string in which to look
+ * @param int $offset Offset within $haystack
+ *
+ * @return string
+ */
+ public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1)
+ {
+ $needle = Functions::flattenSingleValue($needle);
+ $haystack = Functions::flattenSingleValue($haystack);
+ $offset = Functions::flattenSingleValue($offset);
+
+ if (!is_bool($needle)) {
+ if (is_bool($haystack)) {
+ $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) {
+ if (StringHelper::countCharacters($needle) === 0) {
+ return $offset;
+ }
+
+ $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8');
+ if ($pos !== false) {
+ return ++$pos;
+ }
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * FIXEDFORMAT.
+ *
+ * @param mixed $value Value to check
+ * @param int $decimals
+ * @param bool $no_commas
+ *
+ * @return string
+ */
+ public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $decimals = Functions::flattenSingleValue($decimals);
+ $no_commas = Functions::flattenSingleValue($no_commas);
+
+ // Validate parameters
+ if (!is_numeric($value) || !is_numeric($decimals)) {
+ return Functions::NAN();
+ }
+ $decimals = (int) floor($decimals);
+
+ $valueResult = round($value, $decimals);
+ if ($decimals < 0) {
+ $decimals = 0;
+ }
+ if (!$no_commas) {
+ $valueResult = number_format(
+ $valueResult,
+ $decimals,
+ StringHelper::getDecimalSeparator(),
+ StringHelper::getThousandsSeparator()
+ );
+ }
+
+ return (string) $valueResult;
+ }
+
+ /**
+ * LEFT.
+ *
+ * @param string $value Value
+ * @param int $chars Number of characters
+ *
+ * @return string
+ */
+ public static function LEFT($value = '', $chars = 1)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $chars = Functions::flattenSingleValue($chars);
+
+ if ($chars < 0) {
+ return Functions::VALUE();
+ }
+
+ if (is_bool($value)) {
+ $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return mb_substr($value, 0, $chars, 'UTF-8');
+ }
+
+ /**
+ * MID.
+ *
+ * @param string $value Value
+ * @param int $start Start character
+ * @param int $chars Number of characters
+ *
+ * @return string
+ */
+ public static function MID($value = '', $start = 1, $chars = null)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $start = Functions::flattenSingleValue($start);
+ $chars = Functions::flattenSingleValue($chars);
+
+ if (($start < 1) || ($chars < 0)) {
+ return Functions::VALUE();
+ }
+
+ if (is_bool($value)) {
+ $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (empty($chars)) {
+ return '';
+ }
+
+ return mb_substr($value, --$start, $chars, 'UTF-8');
+ }
+
+ /**
+ * RIGHT.
+ *
+ * @param string $value Value
+ * @param int $chars Number of characters
+ *
+ * @return string
+ */
+ public static function RIGHT($value = '', $chars = 1)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $chars = Functions::flattenSingleValue($chars);
+
+ if ($chars < 0) {
+ return Functions::VALUE();
+ }
+
+ if (is_bool($value)) {
+ $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8');
+ }
+
+ /**
+ * STRINGLENGTH.
+ *
+ * @param string $value Value
+ *
+ * @return int
+ */
+ public static function STRINGLENGTH($value = '')
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (is_bool($value)) {
+ $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return mb_strlen($value, 'UTF-8');
+ }
+
+ /**
+ * LOWERCASE.
+ *
+ * Converts a string value to upper case.
+ *
+ * @param string $mixedCaseString
+ *
+ * @return string
+ */
+ public static function LOWERCASE($mixedCaseString)
+ {
+ $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
+
+ if (is_bool($mixedCaseString)) {
+ $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return StringHelper::strToLower($mixedCaseString);
+ }
+
+ /**
+ * UPPERCASE.
+ *
+ * Converts a string value to upper case.
+ *
+ * @param string $mixedCaseString
+ *
+ * @return string
+ */
+ public static function UPPERCASE($mixedCaseString)
+ {
+ $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
+
+ if (is_bool($mixedCaseString)) {
+ $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return StringHelper::strToUpper($mixedCaseString);
+ }
+
+ /**
+ * PROPERCASE.
+ *
+ * Converts a string value to upper case.
+ *
+ * @param string $mixedCaseString
+ *
+ * @return string
+ */
+ public static function PROPERCASE($mixedCaseString)
+ {
+ $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
+
+ if (is_bool($mixedCaseString)) {
+ $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ return StringHelper::strToTitle($mixedCaseString);
+ }
+
+ /**
+ * REPLACE.
+ *
+ * @param string $oldText String to modify
+ * @param int $start Start character
+ * @param int $chars Number of characters
+ * @param string $newText String to replace in defined position
+ *
+ * @return string
+ */
+ public static function REPLACE($oldText, $start, $chars, $newText)
+ {
+ $oldText = Functions::flattenSingleValue($oldText);
+ $start = Functions::flattenSingleValue($start);
+ $chars = Functions::flattenSingleValue($chars);
+ $newText = Functions::flattenSingleValue($newText);
+
+ $left = self::LEFT($oldText, $start - 1);
+ $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1);
+
+ return $left . $newText . $right;
+ }
+
+ /**
+ * SUBSTITUTE.
+ *
+ * @param string $text Value
+ * @param string $fromText From Value
+ * @param string $toText To Value
+ * @param int $instance Instance Number
+ *
+ * @return string
+ */
+ public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0)
+ {
+ $text = Functions::flattenSingleValue($text);
+ $fromText = Functions::flattenSingleValue($fromText);
+ $toText = Functions::flattenSingleValue($toText);
+ $instance = floor(Functions::flattenSingleValue($instance));
+
+ if ($instance == 0) {
+ return str_replace($fromText, $toText, $text);
+ }
+
+ $pos = -1;
+ while ($instance > 0) {
+ $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8');
+ if ($pos === false) {
+ break;
+ }
+ --$instance;
+ }
+
+ if ($pos !== false) {
+ return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText);
+ }
+
+ return $text;
+ }
+
+ /**
+ * RETURNSTRING.
+ *
+ * @param mixed $testValue Value to check
+ *
+ * @return null|string
+ */
+ public static function RETURNSTRING($testValue = '')
+ {
+ $testValue = Functions::flattenSingleValue($testValue);
+
+ if (is_string($testValue)) {
+ return $testValue;
+ }
+
+ return null;
+ }
+
+ /**
+ * TEXTFORMAT.
+ *
+ * @param mixed $value Value to check
+ * @param string $format Format mask to use
+ *
+ * @return string
+ */
+ public static function TEXTFORMAT($value, $format)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $format = Functions::flattenSingleValue($format);
+
+ if ((is_string($value)) && (!is_numeric($value)) && Date::isDateTimeFormatCode($format)) {
+ $value = DateTime::DATEVALUE($value);
+ }
+
+ return (string) NumberFormat::toFormattedString($value, $format);
+ }
+
+ /**
+ * VALUE.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return DateTimeInterface|float|int|string A string if arguments are invalid
+ */
+ public static function VALUE($value = '')
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (!is_numeric($value)) {
+ $numberValue = str_replace(
+ StringHelper::getThousandsSeparator(),
+ '',
+ trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode())
+ );
+ if (is_numeric($numberValue)) {
+ return (float) $numberValue;
+ }
+
+ $dateSetting = Functions::getReturnDateType();
+ Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
+
+ if (strpos($value, ':') !== false) {
+ $timeValue = DateTime::TIMEVALUE($value);
+ if ($timeValue !== Functions::VALUE()) {
+ Functions::setReturnDateType($dateSetting);
+
+ return $timeValue;
+ }
+ }
+ $dateValue = DateTime::DATEVALUE($value);
+ if ($dateValue !== Functions::VALUE()) {
+ Functions::setReturnDateType($dateSetting);
+
+ return $dateValue;
+ }
+ Functions::setReturnDateType($dateSetting);
+
+ return Functions::VALUE();
+ }
+
+ return (float) $value;
+ }
+
+ /**
+ * NUMBERVALUE.
+ *
+ * @param mixed $value Value to check
+ * @param string $decimalSeparator decimal separator, defaults to locale defined value
+ * @param string $groupSeparator group/thosands separator, defaults to locale defined value
+ *
+ * @return float|string
+ */
+ public static function NUMBERVALUE($value = '', $decimalSeparator = null, $groupSeparator = null)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $decimalSeparator = Functions::flattenSingleValue($decimalSeparator);
+ $groupSeparator = Functions::flattenSingleValue($groupSeparator);
+
+ if (!is_numeric($value)) {
+ $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator;
+ $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator;
+
+ $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE);
+ if ($decimalPositions > 1) {
+ return Functions::VALUE();
+ }
+ $decimalOffset = array_pop($matches[0])[1];
+ if (strpos($value, $groupSeparator, $decimalOffset) !== false) {
+ return Functions::VALUE();
+ }
+
+ $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value);
+
+ // Handle the special case of trailing % signs
+ $percentageString = rtrim($value, '%');
+ if (!is_numeric($percentageString)) {
+ return Functions::VALUE();
+ }
+
+ $percentageAdjustment = strlen($value) - strlen($percentageString);
+ if ($percentageAdjustment) {
+ $value = (float) $percentageString;
+ $value /= 10 ** ($percentageAdjustment * 2);
+ }
+ }
+
+ return (float) $value;
+ }
+
+ /**
+ * Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
+ * EXACT is case-sensitive but ignores formatting differences.
+ * Use EXACT to test text being entered into a document.
+ *
+ * @param $value1
+ * @param $value2
+ *
+ * @return bool
+ */
+ public static function EXACT($value1, $value2)
+ {
+ $value1 = Functions::flattenSingleValue($value1);
+ $value2 = Functions::flattenSingleValue($value2);
+
+ return (string) $value2 === (string) $value1;
+ }
+
+ /**
+ * TEXTJOIN.
+ *
+ * @param mixed $delimiter
+ * @param mixed $ignoreEmpty
+ * @param mixed $args
+ *
+ * @return string
+ */
+ public static function TEXTJOIN($delimiter, $ignoreEmpty, ...$args)
+ {
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ foreach ($aArgs as $key => &$arg) {
+ if ($ignoreEmpty && trim($arg) == '') {
+ unset($aArgs[$key]);
+ } elseif (is_bool($arg)) {
+ $arg = self::convertBooleanValue($arg);
+ }
+ }
+
+ return implode($delimiter, $aArgs);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php
new file mode 100644
index 0000000..54a4a58
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php
@@ -0,0 +1,149 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation\Token;
+
+use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
+
+class Stack
+{
+ /**
+ * The parser stack for formulae.
+ *
+ * @var mixed[]
+ */
+ private $stack = [];
+
+ /**
+ * Count of entries in the parser stack.
+ *
+ * @var int
+ */
+ private $count = 0;
+
+ /**
+ * Return the number of entries on the stack.
+ *
+ * @return int
+ */
+ public function count()
+ {
+ return $this->count;
+ }
+
+ /**
+ * Push a new entry onto the stack.
+ *
+ * @param mixed $type
+ * @param mixed $value
+ * @param mixed $reference
+ * @param null|string $storeKey will store the result under this alias
+ * @param null|string $onlyIf will only run computation if the matching
+ * store key is true
+ * @param null|string $onlyIfNot will only run computation if the matching
+ * store key is false
+ */
+ public function push(
+ $type,
+ $value,
+ $reference = null,
+ $storeKey = null,
+ $onlyIf = null,
+ $onlyIfNot = null
+ ): void {
+ $stackItem = $this->getStackItem($type, $value, $reference, $storeKey, $onlyIf, $onlyIfNot);
+
+ $this->stack[$this->count++] = $stackItem;
+
+ if ($type == 'Function') {
+ $localeFunction = Calculation::localeFunc($value);
+ if ($localeFunction != $value) {
+ $this->stack[($this->count - 1)]['localeValue'] = $localeFunction;
+ }
+ }
+ }
+
+ public function getStackItem(
+ $type,
+ $value,
+ $reference = null,
+ $storeKey = null,
+ $onlyIf = null,
+ $onlyIfNot = null
+ ) {
+ $stackItem = [
+ 'type' => $type,
+ 'value' => $value,
+ 'reference' => $reference,
+ ];
+
+ if (isset($storeKey)) {
+ $stackItem['storeKey'] = $storeKey;
+ }
+
+ if (isset($onlyIf)) {
+ $stackItem['onlyIf'] = $onlyIf;
+ }
+
+ if (isset($onlyIfNot)) {
+ $stackItem['onlyIfNot'] = $onlyIfNot;
+ }
+
+ return $stackItem;
+ }
+
+ /**
+ * Pop the last entry from the stack.
+ *
+ * @return mixed
+ */
+ public function pop()
+ {
+ if ($this->count > 0) {
+ return $this->stack[--$this->count];
+ }
+
+ return null;
+ }
+
+ /**
+ * Return an entry from the stack without removing it.
+ *
+ * @param int $n number indicating how far back in the stack we want to look
+ *
+ * @return mixed
+ */
+ public function last($n = 1)
+ {
+ if ($this->count - $n < 0) {
+ return null;
+ }
+
+ return $this->stack[$this->count - $n];
+ }
+
+ /**
+ * Clear the stack.
+ */
+ public function clear(): void
+ {
+ $this->stack = [];
+ $this->count = 0;
+ }
+
+ public function __toString()
+ {
+ $str = 'Stack: ';
+ foreach ($this->stack as $index => $item) {
+ if ($index > $this->count - 1) {
+ break;
+ }
+ $value = $item['value'] ?? 'no value';
+ while (is_array($value)) {
+ $value = array_pop($value);
+ }
+ $str .= $value . ' |> ';
+ }
+
+ return $str;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web.php
new file mode 100644
index 0000000..8aa7893
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+use PhpOffice\PhpSpreadsheet\Settings;
+use Psr\Http\Client\ClientExceptionInterface;
+
+class Web
+{
+ /**
+ * WEBSERVICE.
+ *
+ * Returns data from a web service on the Internet or Intranet.
+ *
+ * Excel Function:
+ * Webservice(url)
+ *
+ * @return string the output resulting from a call to the webservice
+ */
+ public static function WEBSERVICE(string $url)
+ {
+ $url = trim($url);
+ if (strlen($url) > 2048) {
+ return Functions::VALUE(); // Invalid URL length
+ }
+
+ if (!preg_match('/^http[s]?:\/\//', $url)) {
+ return Functions::VALUE(); // Invalid protocol
+ }
+
+ // Get results from the the webservice
+ $client = Settings::getHttpClient();
+ $requestFactory = Settings::getRequestFactory();
+ $request = $requestFactory->createRequest('GET', $url);
+
+ try {
+ $response = $client->sendRequest($request);
+ } catch (ClientExceptionInterface $e) {
+ return Functions::VALUE(); // cURL error
+ }
+
+ if ($response->getStatusCode() != 200) {
+ return Functions::VALUE(); // cURL error
+ }
+
+ $output = $response->getBody()->getContents();
+ if (strlen($output) > 32767) {
+ return Functions::VALUE(); // Output not a string or too long
+ }
+
+ return $output;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt
new file mode 100644
index 0000000..53efc93
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt
@@ -0,0 +1,395 @@
+ABS
+ACCRINT
+ACCRINTM
+ACOS
+ACOSH
+ACOT
+ACOTH
+ADDRESS
+AMORDEGRC
+AMORLINC
+AND
+ARABIC
+AREAS
+ASC
+ASIN
+ASINH
+ATAN
+ATAN2
+ATANH
+AVEDEV
+AVERAGE
+AVERAGEA
+AVERAGEIF
+AVERAGEIFS
+BAHTTEXT
+BASE
+BESSELI
+BESSELJ
+BESSELK
+BESSELY
+BETADIST
+BETAINV
+BIN2DEC
+BIN2HEX
+BIN2OCT
+BINOMDIST
+BITAND
+BITLSHIFT
+BITOR
+BITRSHIFT
+BITXOR
+CEILING
+CELL
+CHAR
+CHIDIST
+CHIINV
+CHITEST
+CHOOSE
+CLEAN
+CODE
+COLUMN
+COLUMNS
+COMBIN
+COMPLEX
+CONCAT
+CONCATENATE
+CONFIDENCE
+CONVERT
+CORREL
+COS
+COSH
+COT
+COTH
+COUNT
+COUNTA
+COUNTBLANK
+COUNTIF
+COUNTIFS
+COUPDAYBS
+COUPDAYBS
+COUPDAYSNC
+COUPNCD
+COUPNUM
+COUPPCD
+COVAR
+CRITBINOM
+CSC
+CSCH
+CUBEKPIMEMBER
+CUBEMEMBER
+CUBEMEMBERPROPERTY
+CUBERANKEDMEMBER
+CUBESET
+CUBESETCOUNT
+CUBEVALUE
+CUMIPMT
+CUMPRINC
+DATE
+DATEDIF
+DATEVALUE
+DAVERAGE
+DAY
+DAYS
+DAYS360
+DB
+DCOUNT
+DCOUNTA
+DDB
+DEC2BIN
+DEC2HEX
+DEC2OCT
+DEGREES
+DELTA
+DEVSQ
+DGET
+DISC
+DMAX
+DMIN
+DOLLAR
+DOLLARDE
+DOLLARFR
+DPRODUCT
+DSTDEV
+DSTDEVP
+DSUM
+DURATION
+DVAR
+DVARP
+EDATE
+EFFECT
+EOMONTH
+ERF
+ERF.PRECISE
+ERFC
+ERFC.PRECISE
+ERROR.TYPE
+EVEN
+EXACT
+EXP
+EXPONDIST
+FACT
+FACTDOUBLE
+FALSE
+FDIST
+FIND
+FINDB
+FINV
+FISHER
+FISHERINV
+FIXED
+FLOOR
+FLOOR.MATH
+FLOOR.PRECISE
+FORECAST
+FREQUENCY
+FTEST
+FV
+FVSCHEDULE
+GAMAMDIST
+GAMMAINV
+GAMMALN
+GCD
+GEOMEAN
+GESTEP
+GETPIVOTDATA
+GROWTH
+HARMEAN
+HEX2BIN
+HEX2OCT
+HLOOKUP
+HOUR
+HYPERLINK
+HYPGEOMDIST
+IF
+IFERROR
+IFS
+IMABS
+IMAGINARY
+IMARGUMENT
+IMCONJUGATE
+IMCOS
+IMCOSH
+IMCOT
+IMCSC
+IMCSCH
+IMEXP
+IMLN
+IMLOG10
+IMLOG2
+IMPOWER
+IMPRODUCT
+IMREAL
+IMSEC
+IMSECH
+IMSIN
+IMSINH
+IMSQRT
+IMSUB
+IMSUM
+IMTAN
+INDEX
+INDIRECT
+INFO
+INT
+INTERCEPT
+INTRATE
+IPMT
+IRR
+ISBLANK
+ISERR
+ISERROR
+ISEVEN
+ISLOGICAL
+ISNA
+ISNONTEXT
+ISNUMBER
+ISODD
+ISOWEEKNUM
+ISPMT
+ISREF
+ISTEXT
+JIS
+KURT
+LARGE
+LCM
+LEFT
+LEFTB
+LEN
+LENB
+LINEST
+LN
+LOG
+LOG10
+LOGEST
+LOGINV
+LOGNORMDIST
+LOOKUP
+LOWER
+MATCH
+MAX
+MAXA
+MAXIFS
+MDETERM
+MDURATION
+MEDIAN
+MID
+MIDB
+MIN
+MINA
+MINIFS
+MINUTE
+MINVERSE
+MIRR
+MMULT
+MOD
+MODE
+MONTH
+MROUND
+MULTINOMIAL
+N
+NA
+NEGBINOMDIST
+NETWORKDAYS
+NOMINAL
+NORMDIST
+NORMINV
+NORMSDIST
+NORMSINV
+NOT
+NOW
+NPER
+NPV
+NUMBERVALUE
+OCT2BIN
+OCT2DEC
+OCT2HEX
+ODD
+ODDFPRICE
+ODDFYIELD
+ODDLPRICE
+ODDLYIELD
+OFFSET
+OR
+PDURATION
+PEARSON
+PERCENTILE
+PERCENTRANK
+PERMUT
+PHONETIC
+PI
+PMT
+POISSON
+POWER
+PPMT
+PRICE
+PRICEDISC
+PRICEMAT
+PROB
+PRODUCT
+PROPER
+PV
+QUARTILE
+QUOTIENT
+RADIANS
+RAND
+RANDBETWEEN
+RANK
+RATE
+RECEIVED
+REPLACE
+REPLACEB
+REPT
+RIGHT
+RIGHTB
+ROMAN
+ROUND
+ROUNDDOWN
+ROUNDUP
+ROW
+ROWS
+RRI
+RSQ
+RTD
+SEARCH
+SEARCHB
+SEC
+SECH
+SECOND
+SERIESSUM
+SHEET
+SHEETS
+SIGN
+SIN
+SINH
+SKEW
+SLN
+SLOPE
+SMALL
+SQRT
+SQRTPI
+STANDARDIZE
+STDEV
+STDEV.A
+STDEV.P
+STDEVA
+STDEVP
+STDEVPA
+STEYX
+SUBSTITUTE
+SUBTOTAL
+SUM
+SUMIF
+SUMIFS
+SUMPRODUCT
+SUMSQ
+SUMX2MY2
+SUMX2PY2
+SUMXMY2
+SWITCH
+SYD
+T
+TAN
+TANH
+TBILLEQ
+TBILLPRICE
+TBILLYIELD
+TDIST
+TEXT
+TEXTJOIN
+TIME
+TIMEVALUE
+TINV
+TODAY
+TRANSPOSE
+TREND
+TRIM
+TRIMMEAN
+TRUE
+TRUNC
+TTEST
+TYPE
+UNICHAR
+UNIORD
+UPPER
+USDOLLAR
+VALUE
+VAR
+VARA
+VARP
+VARPA
+VDB
+VLOOKUP
+WEEKDAY
+WEEKNUM
+WEIBULL
+WORKDAY
+XIRR
+XNPV
+XOR
+YEAR
+YEARFRAC
+YIELD
+YIELDDISC
+YIELDMAT
+ZTEST
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config
new file mode 100644
index 0000000..a424812
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config
@@ -0,0 +1,27 @@
+##
+## PhpSpreadsheet
+##
+##
+##
+
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = лв
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #ПРАЗНО!
+DIV0 = #ДЕЛ/0!
+VALUE = #СТОЙНОСТ!
+REF = #РЕФ!
+NAME = #ИМЕ?
+NUM = #ЧИСЛО!
+NA = #Н/Д
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions
new file mode 100644
index 0000000..570c024
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions
@@ -0,0 +1,417 @@
+##
+## PhpSpreadsheet
+##
+##
+## Data in this file derived from information provided by web-junior (http://www.web-junior.net/)
+##
+##
+
+
+##
+## Add-in and Automation functions Функции надстроек и автоматизации
+##
+GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы.
+
+
+##
+## Cube functions Функции Куб
+##
+CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации.
+CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе.
+CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента.
+CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов.
+CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel.
+CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества.
+CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба.
+
+
+##
+## Database functions Функции для работы с базами данных
+##
+DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных.
+DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных.
+DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных.
+DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию.
+DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных.
+DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных.
+DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию.
+DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных.
+DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных
+DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию.
+DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных
+DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных
+
+
+##
+## Date and time functions Функции даты и времени
+##
+DATE = ДАТА ## Возвращает заданную дату в числовом формате.
+DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат.
+DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца.
+DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года.
+EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты.
+EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев.
+HOUR = ЧАС ## Преобразует дату в числовом формате в часы.
+MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты.
+MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы.
+NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами.
+NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате.
+SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды.
+TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате.
+TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат.
+TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате.
+WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели.
+WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата.
+WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней.
+YEAR = ГОД ## Преобразует дату в числовом формате в год.
+YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами.
+
+
+##
+## Engineering functions Инженерные функции
+##
+BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x).
+BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x).
+BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x).
+BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x).
+BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное.
+BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное.
+BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное.
+COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число.
+CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую.
+DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное.
+DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное.
+DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное.
+DELTA = ДЕЛЬТА ## Проверяет равенство двух значений.
+ERF = ФОШ ## Возвращает функцию ошибки.
+ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки.
+GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения.
+HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное.
+HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное.
+HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное.
+IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа.
+IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа.
+IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах.
+IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число.
+IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа.
+IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел.
+IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа.
+IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа.
+IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа.
+IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа.
+IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень.
+IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел.
+IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа.
+IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа.
+IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа.
+IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел.
+IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел.
+OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное.
+OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное.
+OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное.
+
+
+##
+## Financial functions Финансовые функции
+##
+ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов.
+ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения.
+AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации.
+AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода.
+COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения.
+COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения.
+COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона.
+COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения.
+COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу.
+COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения.
+CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами.
+CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами.
+DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка.
+DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод.
+DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг.
+DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом.
+DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби.
+DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам.
+EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки.
+FV = БС ## Возвращает будущую стоимость инвестиции.
+FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов.
+INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг.
+IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период.
+IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств.
+ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции.
+MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей.
+MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки.
+NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку.
+NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада.
+NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования.
+ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом.
+ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом.
+ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом.
+ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом.
+PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета.
+PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период.
+PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов.
+PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка.
+PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения.
+PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции.
+RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период.
+RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг.
+SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период.
+SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел.
+TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку.
+TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека.
+TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку.
+VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса.
+XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер.
+XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими.
+YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов.
+YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки).
+YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения.
+
+
+##
+## Information functions Информационные функции
+##
+CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки.
+ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки.
+INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде.
+ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку.
+ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д.
+ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки.
+ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом.
+ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение.
+ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д.
+ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом.
+ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число.
+ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом.
+ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой.
+ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом.
+N = Ч ## Возвращает значение, преобразованное в число.
+NA = НД ## Возвращает значение ошибки #Н/Д.
+TYPE = ТИП ## Возвращает число, обозначающее тип данных значения.
+
+
+##
+## Logical functions Логические функции
+##
+AND = И ## Renvoie VRAI si tous ses arguments sont VRAI.
+FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ.
+IF = ЕСЛИ ## Выполняет проверку условия.
+IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления.
+NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное.
+OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА.
+TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА.
+
+
+##
+## Lookup and reference functions Функции ссылки и поиска
+##
+ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста.
+AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке.
+CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу.
+COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка.
+COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке.
+HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки
+HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете.
+INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива.
+INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением.
+LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве.
+MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве.
+OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки.
+ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой.
+ROWS = ЧСТРОК ## Возвращает количество строк в ссылке.
+RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).).
+TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив.
+VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце.
+
+
+##
+## Math and trigonometry functions Математические и тригонометрические функции
+##
+ABS = ABS ## Возвращает модуль (абсолютную величину) числа.
+ACOS = ACOS ## Возвращает арккосинус числа.
+ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа.
+ASIN = ASIN ## Возвращает арксинус числа.
+ASINH = ASINH ## Возвращает гиперболический арксинус числа.
+ATAN = ATAN ## Возвращает арктангенс числа.
+ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y.
+ATANH = ATANH ## Возвращает гиперболический арктангенс числа.
+CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению.
+COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов.
+COS = COS ## Возвращает косинус числа.
+COSH = COSH ## Возвращает гиперболический косинус числа.
+DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы.
+EVEN = ЧЁТН ## Округляет число до ближайшего четного целого.
+EXP = EXP ## Возвращает число e, возведенное в указанную степень.
+FACT = ФАКТР ## Возвращает факториал числа.
+FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа.
+FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения.
+GCD = НОД ## Возвращает наибольший общий делитель.
+INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого.
+LCM = НОК ## Возвращает наименьшее общее кратное.
+LN = LN ## Возвращает натуральный логарифм числа.
+LOG = LOG ## Возвращает логарифм числа по заданному основанию.
+LOG10 = LOG10 ## Возвращает десятичный логарифм числа.
+MDETERM = МОПРЕД ## Возвращает определитель матрицы массива.
+MINVERSE = МОБР ## Возвращает обратную матрицу массива.
+MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов.
+MOD = ОСТАТ ## Возвращает остаток от деления.
+MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью.
+MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел.
+ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого.
+PI = ПИ ## Возвращает число пи.
+POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень.
+PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов.
+QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении.
+RADIANS = РАДИАНЫ ## Преобразует градусы в радианы.
+RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1.
+RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами.
+ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста.
+ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов.
+ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения.
+ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения.
+SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле.
+SIGN = ЗНАК ## Возвращает знак числа.
+SIN = SIN ## Возвращает синус заданного угла.
+SINH = SINH ## Возвращает гиперболический синус числа.
+SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня.
+SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ).
+SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных.
+SUM = СУММ ## Суммирует аргументы.
+SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию.
+SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям.
+SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов.
+SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов.
+SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах.
+SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов.
+SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах.
+TAN = TAN ## Возвращает тангенс числа.
+TANH = TANH ## Возвращает гиперболический тангенс числа.
+TRUNC = ОТБР ## Отбрасывает дробную часть числа.
+
+
+##
+## Statistical functions Статистические функции
+##
+AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего.
+AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов.
+AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения.
+AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию.
+AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям.
+BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения.
+BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения.
+BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения.
+CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат.
+CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат.
+CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость.
+CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности.
+CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных.
+COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов.
+COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов.
+COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне
+COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию
+COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям.
+COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений
+CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию.
+DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений.
+EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение.
+FDIST = FРАСП ## Возвращает F-распределение вероятности.
+FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности.
+FISHER = ФИШЕР ## Возвращает преобразование Фишера.
+FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера.
+FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда.
+FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива.
+FTEST = ФТЕСТ ## Возвращает результат F-теста.
+GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение.
+GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение.
+GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x).
+GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое.
+GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом.
+HARMEAN = СРГАРМ ## Возвращает среднее гармоническое.
+HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение.
+INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии.
+KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных.
+LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных.
+LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда.
+LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда.
+LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение.
+LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение.
+MAX = МАКС ## Возвращает наибольшее значение в списке аргументов.
+MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения.
+MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел.
+MIN = МИН ## Возвращает наименьшее значение в списке аргументов.
+MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения.
+MODE = МОДА ## Возвращает значение моды множества данных.
+NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение.
+NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения.
+NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение.
+NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение.
+NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения.
+PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона.
+PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона.
+PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных.
+PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов.
+POISSON = ПУАССОН ## Возвращает распределение Пуассона.
+PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов.
+QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных.
+RANK = РАНГ ## Возвращает ранг числа в списке чисел.
+RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона.
+SKEW = СКОС ## Возвращает асимметрию распределения.
+SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии.
+SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных.
+STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение.
+STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке.
+STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения.
+STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности.
+STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения.
+STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии.
+TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента.
+TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента.
+TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом.
+TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных.
+TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента.
+VAR = ДИСП ## Оценивает дисперсию по выборке.
+VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения.
+VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности.
+VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения.
+WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла.
+ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста.
+
+
+##
+## Text functions Текстовые функции
+##
+ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые).
+BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ).
+CHAR = СИМВОЛ ## Возвращает знак с заданным кодом.
+CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста.
+CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке.
+CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один.
+DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат.
+EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений.
+FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра).
+FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра).
+FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков.
+JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые).
+LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения.
+LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения.
+LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке.
+LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке.
+LOWER = СТРОЧН ## Преобразует все буквы текста в строчные.
+MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции.
+MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции.
+PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки.
+PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную.
+REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте.
+REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте.
+REPT = ПОВТОР ## Повторяет текст заданное число раз.
+RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки.
+RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки.
+SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра).
+SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра).
+SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым.
+T = Т ## Преобразует аргументы в текст.
+TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст.
+TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы.
+UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные.
+VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config
new file mode 100644
index 0000000..38c9e6b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config
@@ -0,0 +1,23 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = Kč
+
+
+##
+## Excel Error Codes (For future use)
+##
+NULL = #NULL!
+DIV0 = #DIV/0!
+VALUE = #HODNOTA!
+REF = #REF!
+NAME = #NÁZEV?
+NUM = #NUM!
+NA = #N/A
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions
new file mode 100644
index 0000000..f07cb06
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Funkce doplňků a automatizace
+##
+GETPIVOTDATA = ZÍSKATKONTDATA ## Vrátí data uložená v kontingenční tabulce. Pomocí funkce ZÍSKATKONTDATA můžete načíst souhrnná data z kontingenční tabulky, pokud jsou tato data v kontingenční sestavě zobrazena.
+
+
+##
+## Cube functions Funkce pro práci s krychlemi
+##
+CUBEKPIMEMBER = CUBEKPIMEMBER ## Vrátí název, vlastnost a velikost klíčového ukazatele výkonu (KUV) a zobrazí v buňce název a vlastnost. Klíčový ukazatel výkonu je kvantifikovatelná veličina, například hrubý měsíční zisk nebo čtvrtletní obrat na zaměstnance, která se používá pro sledování výkonnosti organizace.
+CUBEMEMBER = CUBEMEMBER ## Vrátí člen nebo n-tici v hierarchii krychle. Slouží k ověření, zda v krychli existuje člen nebo n-tice.
+CUBEMEMBERPROPERTY = CUBEMEMBERPROPERTY ## Vrátí hodnotu vlastnosti člena v krychli. Slouží k ověření, zda v krychli existuje člen s daným názvem, a k vrácení konkrétní vlastnosti tohoto člena.
+CUBERANKEDMEMBER = CUBERANKEDMEMBER ## Vrátí n-tý nebo pořadový člen sady. Použijte ji pro vrácení jednoho nebo více prvků sady, například obchodníka s nejvyšším obratem nebo deseti nejlepších studentů.
+CUBESET = CUBESET ## Definuje vypočtenou sadu členů nebo n-tic odesláním výrazu sady do krychle na serveru, který vytvoří sadu a potom ji vrátí do aplikace Microsoft Office Excel.
+CUBESETCOUNT = CUBESETCOUNT ## Vrátí počet položek v množině
+CUBEVALUE = CUBEVALUE ## Vrátí úhrnnou hodnotu z krychle.
+
+
+##
+## Database functions Funkce databáze
+##
+DAVERAGE = DPRŮMĚR ## Vrátí průměr vybraných položek databáze.
+DCOUNT = DPOČET ## Spočítá buňky databáze obsahující čísla.
+DCOUNTA = DPOČET2 ## Spočítá buňky databáze, které nejsou prázdné.
+DGET = DZÍSKAT ## Extrahuje z databáze jeden záznam splňující zadaná kritéria.
+DMAX = DMAX ## Vrátí maximální hodnotu z vybraných položek databáze.
+DMIN = DMIN ## Vrátí minimální hodnotu z vybraných položek databáze.
+DPRODUCT = DSOUČIN ## Vynásobí hodnoty určitého pole záznamů v databázi, které splňují daná kritéria.
+DSTDEV = DSMODCH.VÝBĚR ## Odhadne směrodatnou odchylku výběru vybraných položek databáze.
+DSTDEVP = DSMODCH ## Vypočte směrodatnou odchylku základního souboru vybraných položek databáze.
+DSUM = DSUMA ## Sečte čísla ve sloupcovém poli záznamů databáze, která splňují daná kritéria.
+DVAR = DVAR.VÝBĚR ## Odhadne rozptyl výběru vybraných položek databáze.
+DVARP = DVAR ## Vypočte rozptyl základního souboru vybraných položek databáze.
+
+
+##
+## Date and time functions Funkce data a času
+##
+DATE = DATUM ## Vrátí pořadové číslo určitého data.
+DATEVALUE = DATUMHODN ## Převede datum ve formě textu na pořadové číslo.
+DAY = DEN ## Převede pořadové číslo na den v měsíci.
+DAYS360 = ROK360 ## Vrátí počet dní mezi dvěma daty na základě roku s 360 dny.
+EDATE = EDATE ## Vrátí pořadové číslo data, které označuje určený počet měsíců před nebo po počátečním datu.
+EOMONTH = EOMONTH ## Vrátí pořadové číslo posledního dne měsíce před nebo po zadaném počtu měsíců.
+HOUR = HODINA ## Převede pořadové číslo na hodinu.
+MINUTE = MINUTA ## Převede pořadové číslo na minutu.
+MONTH = MĚSÍC ## Převede pořadové číslo na měsíc.
+NETWORKDAYS = NETWORKDAYS ## Vrátí počet celých pracovních dní mezi dvěma daty.
+NOW = NYNÍ ## Vrátí pořadové číslo aktuálního data a času.
+SECOND = SEKUNDA ## Převede pořadové číslo na sekundu.
+TIME = ČAS ## Vrátí pořadové číslo určitého času.
+TIMEVALUE = ČASHODN ## Převede čas ve formě textu na pořadové číslo.
+TODAY = DNES ## Vrátí pořadové číslo dnešního data.
+WEEKDAY = DENTÝDNE ## Převede pořadové číslo na den v týdnu.
+WEEKNUM = WEEKNUM ## Převede pořadové číslo na číslo představující číselnou pozici týdne v roce.
+WORKDAY = WORKDAY ## Vrátí pořadové číslo data před nebo po zadaném počtu pracovních dní.
+YEAR = ROK ## Převede pořadové číslo na rok.
+YEARFRAC = YEARFRAC ## Vrátí část roku vyjádřenou zlomkem a představující počet celých dní mezi počátečním a koncovým datem.
+
+
+##
+## Engineering functions Inženýrské funkce (Technické funkce)
+##
+BESSELI = BESSELI ## Vrátí modifikovanou Besselovu funkci In(x).
+BESSELJ = BESSELJ ## Vrátí modifikovanou Besselovu funkci Jn(x).
+BESSELK = BESSELK ## Vrátí modifikovanou Besselovu funkci Kn(x).
+BESSELY = BESSELY ## Vrátí Besselovu funkci Yn(x).
+BIN2DEC = BIN2DEC ## Převede binární číslo na desítkové.
+BIN2HEX = BIN2HEX ## Převede binární číslo na šestnáctkové.
+BIN2OCT = BIN2OCT ## Převede binární číslo na osmičkové.
+COMPLEX = COMPLEX ## Převede reálnou a imaginární část na komplexní číslo.
+CONVERT = CONVERT ## Převede číslo do jiného jednotkového měrného systému.
+DEC2BIN = DEC2BIN ## Převede desítkového čísla na dvojkové
+DEC2HEX = DEC2HEX ## Převede desítkové číslo na šestnáctkové.
+DEC2OCT = DEC2OCT ## Převede desítkové číslo na osmičkové.
+DELTA = DELTA ## Testuje rovnost dvou hodnot.
+ERF = ERF ## Vrátí chybovou funkci.
+ERFC = ERFC ## Vrátí doplňkovou chybovou funkci.
+GESTEP = GESTEP ## Testuje, zda je číslo větší než mezní hodnota.
+HEX2BIN = HEX2BIN ## Převede šestnáctkové číslo na binární.
+HEX2DEC = HEX2DEC ## Převede šestnáctkové číslo na desítkové.
+HEX2OCT = HEX2OCT ## Převede šestnáctkové číslo na osmičkové.
+IMABS = IMABS ## Vrátí absolutní hodnotu (modul) komplexního čísla.
+IMAGINARY = IMAGINARY ## Vrátí imaginární část komplexního čísla.
+IMARGUMENT = IMARGUMENT ## Vrátí argument théta, úhel vyjádřený v radiánech.
+IMCONJUGATE = IMCONJUGATE ## Vrátí komplexně sdružené číslo ke komplexnímu číslu.
+IMCOS = IMCOS ## Vrátí kosinus komplexního čísla.
+IMDIV = IMDIV ## Vrátí podíl dvou komplexních čísel.
+IMEXP = IMEXP ## Vrátí exponenciální tvar komplexního čísla.
+IMLN = IMLN ## Vrátí přirozený logaritmus komplexního čísla.
+IMLOG10 = IMLOG10 ## Vrátí dekadický logaritmus komplexního čísla.
+IMLOG2 = IMLOG2 ## Vrátí logaritmus komplexního čísla při základu 2.
+IMPOWER = IMPOWER ## Vrátí komplexní číslo umocněné na celé číslo.
+IMPRODUCT = IMPRODUCT ## Vrátí součin komplexních čísel.
+IMREAL = IMREAL ## Vrátí reálnou část komplexního čísla.
+IMSIN = IMSIN ## Vrátí sinus komplexního čísla.
+IMSQRT = IMSQRT ## Vrátí druhou odmocninu komplexního čísla.
+IMSUB = IMSUB ## Vrátí rozdíl mezi dvěma komplexními čísly.
+IMSUM = IMSUM ## Vrátí součet dvou komplexních čísel.
+OCT2BIN = OCT2BIN ## Převede osmičkové číslo na binární.
+OCT2DEC = OCT2DEC ## Převede osmičkové číslo na desítkové.
+OCT2HEX = OCT2HEX ## Převede osmičkové číslo na šestnáctkové.
+
+
+##
+## Financial functions Finanční funkce
+##
+ACCRINT = ACCRINT ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen v pravidelných termínech.
+ACCRINTM = ACCRINTM ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen k datu splatnosti.
+AMORDEGRC = AMORDEGRC ## Vrátí lineární amortizaci v každém účetním období pomocí koeficientu amortizace.
+AMORLINC = AMORLINC ## Vrátí lineární amortizaci v každém účetním období.
+COUPDAYBS = COUPDAYBS ## Vrátí počet dnů od začátku období placení kupónů do data splatnosti.
+COUPDAYS = COUPDAYS ## Vrátí počet dnů v období placení kupónů, které obsahuje den zúčtování.
+COUPDAYSNC = COUPDAYSNC ## Vrátí počet dnů od data zúčtování do následujícího data placení kupónu.
+COUPNCD = COUPNCD ## Vrátí následující datum placení kupónu po datu zúčtování.
+COUPNUM = COUPNUM ## Vrátí počet kupónů splatných mezi datem zúčtování a datem splatnosti.
+COUPPCD = COUPPCD ## Vrátí předchozí datum placení kupónu před datem zúčtování.
+CUMIPMT = CUMIPMT ## Vrátí kumulativní úrok splacený mezi dvěma obdobími.
+CUMPRINC = CUMPRINC ## Vrátí kumulativní jistinu splacenou mezi dvěma obdobími půjčky.
+DB = ODPIS.ZRYCH ## Vrátí odpis aktiva za určité období pomocí degresivní metody odpisu s pevným zůstatkem.
+DDB = ODPIS.ZRYCH2 ## Vrátí odpis aktiva za určité období pomocí dvojité degresivní metody odpisu nebo jiné metody, kterou zadáte.
+DISC = DISC ## Vrátí diskontní sazbu cenného papíru.
+DOLLARDE = DOLLARDE ## Převede částku v korunách vyjádřenou zlomkem na částku v korunách vyjádřenou desetinným číslem.
+DOLLARFR = DOLLARFR ## Převede částku v korunách vyjádřenou desetinným číslem na částku v korunách vyjádřenou zlomkem.
+DURATION = DURATION ## Vrátí roční dobu cenného papíru s pravidelnými úrokovými sazbami.
+EFFECT = EFFECT ## Vrátí efektivní roční úrokovou sazbu.
+FV = BUDHODNOTA ## Vrátí budoucí hodnotu investice.
+FVSCHEDULE = FVSCHEDULE ## Vrátí budoucí hodnotu počáteční jistiny po použití série sazeb složitého úroku.
+INTRATE = INTRATE ## Vrátí úrokovou sazbu plně investovaného cenného papíru.
+IPMT = PLATBA.ÚROK ## Vrátí výšku úroku investice za dané období.
+IRR = MÍRA.VÝNOSNOSTI ## Vrátí vnitřní výnosové procento série peněžních toků.
+ISPMT = ISPMT ## Vypočte výši úroku z investice zaplaceného během určitého období.
+MDURATION = MDURATION ## Vrátí Macauleyho modifikovanou dobu cenného papíru o nominální hodnotě 100 Kč.
+MIRR = MOD.MÍRA.VÝNOSNOSTI ## Vrátí vnitřní sazbu výnosu, přičemž kladné a záporné hodnoty peněžních prostředků jsou financovány podle různých sazeb.
+NOMINAL = NOMINAL ## Vrátí nominální roční úrokovou sazbu.
+NPER = POČET.OBDOBÍ ## Vrátí počet období pro investici.
+NPV = ČISTÁ.SOUČHODNOTA ## Vrátí čistou současnou hodnotu investice vypočítanou na základě série pravidelných peněžních toků a diskontní sazby.
+ODDFPRICE = ODDFPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným prvním obdobím.
+ODDFYIELD = ODDFYIELD ## Vrátí výnos cenného papíru s odlišným prvním obdobím.
+ODDLPRICE = ODDLPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným posledním obdobím.
+ODDLYIELD = ODDLYIELD ## Vrátí výnos cenného papíru s odlišným posledním obdobím.
+PMT = PLATBA ## Vrátí hodnotu pravidelné splátky anuity.
+PPMT = PLATBA.ZÁKLAD ## Vrátí hodnotu splátky jistiny pro zadanou investici za dané období.
+PRICE = PRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen v pravidelných termínech.
+PRICEDISC = PRICEDISC ## Vrátí cenu diskontního cenného papíru o nominální hodnotě 100 Kč.
+PRICEMAT = PRICEMAT ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen k datu splatnosti.
+PV = SOUČHODNOTA ## Vrátí současnou hodnotu investice.
+RATE = ÚROKOVÁ.MÍRA ## Vrátí úrokovou sazbu vztaženou na období anuity.
+RECEIVED = RECEIVED ## Vrátí částku obdrženou k datu splatnosti plně investovaného cenného papíru.
+SLN = ODPIS.LIN ## Vrátí přímé odpisy aktiva pro jedno období.
+SYD = ODPIS.NELIN ## Vrátí směrné číslo ročních odpisů aktiva pro zadané období.
+TBILLEQ = TBILLEQ ## Vrátí výnos směnky státní pokladny ekvivalentní výnosu obligace.
+TBILLPRICE = TBILLPRICE ## Vrátí cenu směnky státní pokladny o nominální hodnotě 100 Kč.
+TBILLYIELD = TBILLYIELD ## Vrátí výnos směnky státní pokladny.
+VDB = ODPIS.ZA.INT ## Vrátí odpis aktiva pro určité období nebo část období pomocí degresivní metody odpisu.
+XIRR = XIRR ## Vrátí vnitřní výnosnost pro harmonogram peněžních toků, který nemusí být nutně periodický.
+XNPV = XNPV ## Vrátí čistou současnou hodnotu pro harmonogram peněžních toků, který nemusí být nutně periodický.
+YIELD = YIELD ## Vrátí výnos cenného papíru, ze kterého je úrok placen v pravidelných termínech.
+YIELDDISC = YIELDDISC ## Vrátí roční výnos diskontního cenného papíru, například směnky státní pokladny.
+YIELDMAT = YIELDMAT ## Vrátí roční výnos cenného papíru, ze kterého je úrok placen k datu splatnosti.
+
+
+##
+## Information functions Informační funkce
+##
+CELL = POLÍČKO ## Vrátí informace o formátování, umístění nebo obsahu buňky.
+ERROR.TYPE = CHYBA.TYP ## Vrátí číslo odpovídající typu chyby.
+INFO = O.PROSTŘEDÍ ## Vrátí informace o aktuálním pracovním prostředí.
+ISBLANK = JE.PRÁZDNÉ ## Vrátí hodnotu PRAVDA, pokud se argument hodnota odkazuje na prázdnou buňku.
+ISERR = JE.CHYBA ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota (kromě #N/A).
+ISERROR = JE.CHYBHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota.
+ISEVEN = ISEVEN ## Vrátí hodnotu PRAVDA, pokud je číslo sudé.
+ISLOGICAL = JE.LOGHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota logická hodnota.
+ISNA = JE.NEDEF ## Vrátí hodnotu PRAVDA, pokud je argument hodnota chybová hodnota #N/A.
+ISNONTEXT = JE.NETEXT ## Vrátí hodnotu PRAVDA, pokud argument hodnota není text.
+ISNUMBER = JE.ČÍSLO ## Vrátí hodnotu PRAVDA, pokud je argument hodnota číslo.
+ISODD = ISODD ## Vrátí hodnotu PRAVDA, pokud je číslo liché.
+ISREF = JE.ODKAZ ## Vrátí hodnotu PRAVDA, pokud je argument hodnota odkaz.
+ISTEXT = JE.TEXT ## Vrátí hodnotu PRAVDA, pokud je argument hodnota text.
+N = N ## Vrátí hodnotu převedenou na číslo.
+NA = NEDEF ## Vrátí chybovou hodnotu #N/A.
+TYPE = TYP ## Vrátí číslo označující datový typ hodnoty.
+
+
+##
+## Logical functions Logické funkce
+##
+AND = A ## Vrátí hodnotu PRAVDA, mají-li všechny argumenty hodnotu PRAVDA.
+FALSE = NEPRAVDA ## Vrátí logickou hodnotu NEPRAVDA.
+IF = KDYŽ ## Určí, který logický test má proběhnout.
+IFERROR = IFERROR ## Pokud je vzorec vyhodnocen jako chyba, vrátí zadanou hodnotu. V opačném případě vrátí výsledek vzorce.
+NOT = NE ## Provede logickou negaci argumentu funkce.
+OR = NEBO ## Vrátí hodnotu PRAVDA, je-li alespoň jeden argument roven hodnotě PRAVDA.
+TRUE = PRAVDA ## Vrátí logickou hodnotu PRAVDA.
+
+
+##
+## Lookup and reference functions Vyhledávací funkce
+##
+ADDRESS = ODKAZ ## Vrátí textový odkaz na jednu buňku listu.
+AREAS = POČET.BLOKŮ ## Vrátí počet oblastí v odkazu.
+CHOOSE = ZVOLIT ## Zvolí hodnotu ze seznamu hodnot.
+COLUMN = SLOUPEC ## Vrátí číslo sloupce odkazu.
+COLUMNS = SLOUPCE ## Vrátí počet sloupců v odkazu.
+HLOOKUP = VVYHLEDAT ## Prohledá horní řádek matice a vrátí hodnotu určené buňky.
+HYPERLINK = HYPERTEXTOVÝ.ODKAZ ## Vytvoří zástupce nebo odkaz, který otevře dokument uložený na síťovém serveru, v síti intranet nebo Internet.
+INDEX = INDEX ## Pomocí rejstříku zvolí hodnotu z odkazu nebo matice.
+INDIRECT = NEPŘÍMÝ.ODKAZ ## Vrátí odkaz určený textovou hodnotou.
+LOOKUP = VYHLEDAT ## Vyhledá hodnoty ve vektoru nebo matici.
+MATCH = POZVYHLEDAT ## Vyhledá hodnoty v odkazu nebo matici.
+OFFSET = POSUN ## Vrátí posun odkazu od zadaného odkazu.
+ROW = ŘÁDEK ## Vrátí číslo řádku odkazu.
+ROWS = ŘÁDKY ## Vrátí počet řádků v odkazu.
+RTD = RTD ## Načte data reálného času z programu, který podporuje automatizaci modelu COM (Automatizace: Způsob práce s objekty určité aplikace z jiné aplikace nebo nástroje pro vývoj. Automatizace (dříve nazývaná automatizace OLE) je počítačovým standardem a je funkcí modelu COM (Component Object Model).).
+TRANSPOSE = TRANSPOZICE ## Vrátí transponovanou matici.
+VLOOKUP = SVYHLEDAT ## Prohledá první sloupec matice, přesune kurzor v řádku a vrátí hodnotu buňky.
+
+
+##
+## Math and trigonometry functions Matematické a trigonometrické funkce
+##
+ABS = ABS ## Vrátí absolutní hodnotu čísla.
+ACOS = ARCCOS ## Vrátí arkuskosinus čísla.
+ACOSH = ARCCOSH ## Vrátí hyperbolický arkuskosinus čísla.
+ASIN = ARCSIN ## Vrátí arkussinus čísla.
+ASINH = ARCSINH ## Vrátí hyperbolický arkussinus čísla.
+ATAN = ARCTG ## Vrátí arkustangens čísla.
+ATAN2 = ARCTG2 ## Vrátí arkustangens x-ové a y-ové souřadnice.
+ATANH = ARCTGH ## Vrátí hyperbolický arkustangens čísla.
+CEILING = ZAOKR.NAHORU ## Zaokrouhlí číslo na nejbližší celé číslo nebo na nejbližší násobek zadané hodnoty.
+COMBIN = KOMBINACE ## Vrátí počet kombinací pro daný počet položek.
+COS = COS ## Vrátí kosinus čísla.
+COSH = COSH ## Vrátí hyperbolický kosinus čísla.
+DEGREES = DEGREES ## Převede radiány na stupně.
+EVEN = ZAOKROUHLIT.NA.SUDÉ ## Zaokrouhlí číslo nahoru na nejbližší celé sudé číslo.
+EXP = EXP ## Vrátí základ přirozeného logaritmu e umocněný na zadané číslo.
+FACT = FAKTORIÁL ## Vrátí faktoriál čísla.
+FACTDOUBLE = FACTDOUBLE ## Vrátí dvojitý faktoriál čísla.
+FLOOR = ZAOKR.DOLŮ ## Zaokrouhlí číslo dolů, směrem k nule.
+GCD = GCD ## Vrátí největší společný dělitel.
+INT = CELÁ.ČÁST ## Zaokrouhlí číslo dolů na nejbližší celé číslo.
+LCM = LCM ## Vrátí nejmenší společný násobek.
+LN = LN ## Vrátí přirozený logaritmus čísla.
+LOG = LOGZ ## Vrátí logaritmus čísla při zadaném základu.
+LOG10 = LOG ## Vrátí dekadický logaritmus čísla.
+MDETERM = DETERMINANT ## Vrátí determinant matice.
+MINVERSE = INVERZE ## Vrátí inverzní matici.
+MMULT = SOUČIN.MATIC ## Vrátí součin dvou matic.
+MOD = MOD ## Vrátí zbytek po dělení.
+MROUND = MROUND ## Vrátí číslo zaokrouhlené na požadovaný násobek.
+MULTINOMIAL = MULTINOMIAL ## Vrátí mnohočlen z množiny čísel.
+ODD = ZAOKROUHLIT.NA.LICHÉ ## Zaokrouhlí číslo nahoru na nejbližší celé liché číslo.
+PI = PI ## Vrátí hodnotu čísla pí.
+POWER = POWER ## Umocní číslo na zadanou mocninu.
+PRODUCT = SOUČIN ## Vynásobí argumenty funkce.
+QUOTIENT = QUOTIENT ## Vrátí celou část dělení.
+RADIANS = RADIANS ## Převede stupně na radiány.
+RAND = NÁHČÍSLO ## Vrátí náhodné číslo mezi 0 a 1.
+RANDBETWEEN = RANDBETWEEN ## Vrátí náhodné číslo mezi zadanými čísly.
+ROMAN = ROMAN ## Převede arabskou číslici na římskou ve formátu textu.
+ROUND = ZAOKROUHLIT ## Zaokrouhlí číslo na zadaný počet číslic.
+ROUNDDOWN = ROUNDDOWN ## Zaokrouhlí číslo dolů, směrem k nule.
+ROUNDUP = ROUNDUP ## Zaokrouhlí číslo nahoru, směrem od nuly.
+SERIESSUM = SERIESSUM ## Vrátí součet mocninné řady určené podle vzorce.
+SIGN = SIGN ## Vrátí znaménko čísla.
+SIN = SIN ## Vrátí sinus daného úhlu.
+SINH = SINH ## Vrátí hyperbolický sinus čísla.
+SQRT = ODMOCNINA ## Vrátí kladnou druhou odmocninu.
+SQRTPI = SQRTPI ## Vrátí druhou odmocninu výrazu (číslo * pí).
+SUBTOTAL = SUBTOTAL ## Vrátí souhrn v seznamu nebo databázi.
+SUM = SUMA ## Sečte argumenty funkce.
+SUMIF = SUMIF ## Sečte buňky vybrané podle zadaných kritérií.
+SUMIFS = SUMIFS ## Sečte buňky určené více zadanými podmínkami.
+SUMPRODUCT = SOUČIN.SKALÁRNÍ ## Vrátí součet součinů odpovídajících prvků matic.
+SUMSQ = SUMA.ČTVERCŮ ## Vrátí součet čtverců argumentů.
+SUMX2MY2 = SUMX2MY2 ## Vrátí součet rozdílu čtverců odpovídajících hodnot ve dvou maticích.
+SUMX2PY2 = SUMX2PY2 ## Vrátí součet součtu čtverců odpovídajících hodnot ve dvou maticích.
+SUMXMY2 = SUMXMY2 ## Vrátí součet čtverců rozdílů odpovídajících hodnot ve dvou maticích.
+TAN = TGTG ## Vrátí tangens čísla.
+TANH = TGH ## Vrátí hyperbolický tangens čísla.
+TRUNC = USEKNOUT ## Zkrátí číslo na celé číslo.
+
+
+##
+## Statistical functions Statistické funkce
+##
+AVEDEV = PRŮMODCHYLKA ## Vrátí průměrnou hodnotu absolutních odchylek datových bodů od jejich střední hodnoty.
+AVERAGE = PRŮMĚR ## Vrátí průměrnou hodnotu argumentů.
+AVERAGEA = AVERAGEA ## Vrátí průměrnou hodnotu argumentů včetně čísel, textu a logických hodnot.
+AVERAGEIF = AVERAGEIF ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk v oblasti, které vyhovují příslušné podmínce.
+AVERAGEIFS = AVERAGEIFS ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk vyhovujících několika podmínkám.
+BETADIST = BETADIST ## Vrátí hodnotu součtového rozdělení beta.
+BETAINV = BETAINV ## Vrátí inverzní hodnotu součtového rozdělení pro zadané rozdělení beta.
+BINOMDIST = BINOMDIST ## Vrátí hodnotu binomického rozdělení pravděpodobnosti jednotlivých veličin.
+CHIDIST = CHIDIST ## Vrátí jednostrannou pravděpodobnost rozdělení chí-kvadrát.
+CHIINV = CHIINV ## Vrátí hodnotu funkce inverzní k distribuční funkci jednostranné pravděpodobnosti rozdělení chí-kvadrát.
+CHITEST = CHITEST ## Vrátí test nezávislosti.
+CONFIDENCE = CONFIDENCE ## Vrátí interval spolehlivosti pro střední hodnotu základního souboru.
+CORREL = CORREL ## Vrátí korelační koeficient mezi dvěma množinami dat.
+COUNT = POČET ## Vrátí počet čísel v seznamu argumentů.
+COUNTA = POČET2 ## Vrátí počet hodnot v seznamu argumentů.
+COUNTBLANK = COUNTBLANK ## Spočítá počet prázdných buněk v oblasti.
+COUNTIF = COUNTIF ## Spočítá buňky v oblasti, které odpovídají zadaným kritériím.
+COUNTIFS = COUNTIFS ## Spočítá buňky v oblasti, které odpovídají více kritériím.
+COVAR = COVAR ## Vrátí hodnotu kovariance, průměrnou hodnotu součinů párových odchylek
+CRITBINOM = CRITBINOM ## Vrátí nejmenší hodnotu, pro kterou má součtové binomické rozdělení hodnotu větší nebo rovnu hodnotě kritéria.
+DEVSQ = DEVSQ ## Vrátí součet čtverců odchylek.
+EXPONDIST = EXPONDIST ## Vrátí hodnotu exponenciálního rozdělení.
+FDIST = FDIST ## Vrátí hodnotu rozdělení pravděpodobnosti F.
+FINV = FINV ## Vrátí hodnotu inverzní funkce k distribuční funkci rozdělení F.
+FISHER = FISHER ## Vrátí hodnotu Fisherovy transformace.
+FISHERINV = FISHERINV ## Vrátí hodnotu inverzní funkce k Fisherově transformaci.
+FORECAST = FORECAST ## Vrátí hodnotu lineárního trendu.
+FREQUENCY = ČETNOSTI ## Vrátí četnost rozdělení jako svislou matici.
+FTEST = FTEST ## Vrátí výsledek F-testu.
+GAMMADIST = GAMMADIST ## Vrátí hodnotu rozdělení gama.
+GAMMAINV = GAMMAINV ## Vrátí hodnotu inverzní funkce k distribuční funkci součtového rozdělení gama.
+GAMMALN = GAMMALN ## Vrátí přirozený logaritmus funkce gama, Γ(x).
+GEOMEAN = GEOMEAN ## Vrátí geometrický průměr.
+GROWTH = LOGLINTREND ## Vrátí hodnoty exponenciálního trendu.
+HARMEAN = HARMEAN ## Vrátí harmonický průměr.
+HYPGEOMDIST = HYPGEOMDIST ## Vrátí hodnotu hypergeometrického rozdělení.
+INTERCEPT = INTERCEPT ## Vrátí úsek lineární regresní čáry.
+KURT = KURT ## Vrátí hodnotu excesu množiny dat.
+LARGE = LARGE ## Vrátí k-tou největší hodnotu množiny dat.
+LINEST = LINREGRESE ## Vrátí parametry lineárního trendu.
+LOGEST = LOGLINREGRESE ## Vrátí parametry exponenciálního trendu.
+LOGINV = LOGINV ## Vrátí inverzní funkci k distribuční funkci logaritmicko-normálního rozdělení.
+LOGNORMDIST = LOGNORMDIST ## Vrátí hodnotu součtového logaritmicko-normálního rozdělení.
+MAX = MAX ## Vrátí maximální hodnotu seznamu argumentů.
+MAXA = MAXA ## Vrátí maximální hodnotu seznamu argumentů včetně čísel, textu a logických hodnot.
+MEDIAN = MEDIAN ## Vrátí střední hodnotu zadaných čísel.
+MIN = MIN ## Vrátí minimální hodnotu seznamu argumentů.
+MINA = MINA ## Vrátí nejmenší hodnotu v seznamu argumentů včetně čísel, textu a logických hodnot.
+MODE = MODE ## Vrátí hodnotu, která se v množině dat vyskytuje nejčastěji.
+NEGBINOMDIST = NEGBINOMDIST ## Vrátí hodnotu negativního binomického rozdělení.
+NORMDIST = NORMDIST ## Vrátí hodnotu normálního součtového rozdělení.
+NORMINV = NORMINV ## Vrátí inverzní funkci k funkci normálního součtového rozdělení.
+NORMSDIST = NORMSDIST ## Vrátí hodnotu standardního normálního součtového rozdělení.
+NORMSINV = NORMSINV ## Vrátí inverzní funkci k funkci standardního normálního součtového rozdělení.
+PEARSON = PEARSON ## Vrátí Pearsonův výsledný momentový korelační koeficient.
+PERCENTILE = PERCENTIL ## Vrátí hodnotu k-tého percentilu hodnot v oblasti.
+PERCENTRANK = PERCENTRANK ## Vrátí pořadí hodnoty v množině dat vyjádřené procentuální částí množiny dat.
+PERMUT = PERMUTACE ## Vrátí počet permutací pro zadaný počet objektů.
+POISSON = POISSON ## Vrátí hodnotu distribuční funkce Poissonova rozdělení.
+PROB = PROB ## Vrátí pravděpodobnost výskytu hodnot v oblasti mezi dvěma mezními hodnotami.
+QUARTILE = QUARTIL ## Vrátí hodnotu kvartilu množiny dat.
+RANK = RANK ## Vrátí pořadí čísla v seznamu čísel.
+RSQ = RKQ ## Vrátí druhou mocninu Pearsonova výsledného momentového korelačního koeficientu.
+SKEW = SKEW ## Vrátí zešikmení rozdělení.
+SLOPE = SLOPE ## Vrátí směrnici lineární regresní čáry.
+SMALL = SMALL ## Vrátí k-tou nejmenší hodnotu množiny dat.
+STANDARDIZE = STANDARDIZE ## Vrátí normalizovanou hodnotu.
+STDEV = SMODCH.VÝBĚR ## Vypočte směrodatnou odchylku výběru.
+STDEVA = STDEVA ## Vypočte směrodatnou odchylku výběru včetně čísel, textu a logických hodnot.
+STDEVP = SMODCH ## Vypočte směrodatnou odchylku základního souboru.
+STDEVPA = STDEVPA ## Vypočte směrodatnou odchylku základního souboru včetně čísel, textu a logických hodnot.
+STEYX = STEYX ## Vrátí standardní chybu předpovězené hodnoty y pro každou hodnotu x v regresi.
+TDIST = TDIST ## Vrátí hodnotu Studentova t-rozdělení.
+TINV = TINV ## Vrátí inverzní funkci k distribuční funkci Studentova t-rozdělení.
+TREND = LINTREND ## Vrátí hodnoty lineárního trendu.
+TRIMMEAN = TRIMMEAN ## Vrátí střední hodnotu vnitřní části množiny dat.
+TTEST = TTEST ## Vrátí pravděpodobnost spojenou se Studentovým t-testem.
+VAR = VAR.VÝBĚR ## Vypočte rozptyl výběru.
+VARA = VARA ## Vypočte rozptyl výběru včetně čísel, textu a logických hodnot.
+VARP = VAR ## Vypočte rozptyl základního souboru.
+VARPA = VARPA ## Vypočte rozptyl základního souboru včetně čísel, textu a logických hodnot.
+WEIBULL = WEIBULL ## Vrátí hodnotu Weibullova rozdělení.
+ZTEST = ZTEST ## Vrátí jednostrannou P-hodnotu z-testu.
+
+
+##
+## Text functions Textové funkce
+##
+ASC = ASC ## Změní znaky s plnou šířkou (dvoubajtové)v řetězci znaků na znaky s poloviční šířkou (jednobajtové).
+BAHTTEXT = BAHTTEXT ## Převede číslo na text ve formátu, měny ß (baht).
+CHAR = ZNAK ## Vrátí znak určený číslem kódu.
+CLEAN = VYČISTIT ## Odebere z textu všechny netisknutelné znaky.
+CODE = KÓD ## Vrátí číselný kód prvního znaku zadaného textového řetězce.
+CONCATENATE = CONCATENATE ## Spojí několik textových položek do jedné.
+DOLLAR = KČ ## Převede číslo na text ve formátu měny Kč (česká koruna).
+EXACT = STEJNÉ ## Zkontroluje, zda jsou dvě textové hodnoty shodné.
+FIND = NAJÍT ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena).
+FINDB = FINDB ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena).
+FIXED = ZAOKROUHLIT.NA.TEXT ## Zformátuje číslo jako text s pevným počtem desetinných míst.
+JIS = JIS ## Změní znaky s poloviční šířkou (jednobajtové) v řetězci znaků na znaky s plnou šířkou (dvoubajtové).
+LEFT = ZLEVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo.
+LEFTB = LEFTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo.
+LEN = DÉLKA ## Vrátí počet znaků textového řetězce.
+LENB = LENB ## Vrátí počet znaků textového řetězce.
+LOWER = MALÁ ## Převede text na malá písmena.
+MID = ČÁST ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem.
+MIDB = MIDB ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem.
+PHONETIC = ZVUKOVÉ ## Extrahuje fonetické znaky (furigana) z textového řetězce.
+PROPER = VELKÁ2 ## Převede první písmeno každého slova textové hodnoty na velké.
+REPLACE = NAHRADIT ## Nahradí znaky uvnitř textu.
+REPLACEB = NAHRADITB ## Nahradí znaky uvnitř textu.
+REPT = OPAKOVAT ## Zopakuje text podle zadaného počtu opakování.
+RIGHT = ZPRAVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo.
+RIGHTB = RIGHTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo.
+SEARCH = HLEDAT ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována).
+SEARCHB = SEARCHB ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována).
+SUBSTITUTE = DOSADIT ## V textovém řetězci nahradí starý text novým.
+T = T ## Převede argumenty na text.
+TEXT = HODNOTA.NA.TEXT ## Zformátuje číslo a převede ho na text.
+TRIM = PROČISTIT ## Odstraní z textu mezery.
+UPPER = VELKÁ ## Převede text na velká písmena.
+VALUE = HODNOTA ## Převede textový argument na číslo.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config
new file mode 100644
index 0000000..4dd9cf6
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config
@@ -0,0 +1,25 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = kr
+
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NUL!
+DIV0 = #DIVISION/0!
+VALUE = #VÆRDI!
+REF = #REFERENCE!
+NAME = #NAVN?
+NUM = #NUM!
+NA = #I/T
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions
new file mode 100644
index 0000000..285a9eb
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Tilføjelsesprogram- og automatiseringsfunktioner
+##
+GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data, der er lagret i en pivottabelrapport
+
+
+##
+## Cube functions Kubefunktioner
+##
+CUBEKPIMEMBER = KUBE.KPI.MEDLEM ## Returnerer navn, egenskab og mål for en KPI-indikator og viser navnet og egenskaben i cellen. En KPI-indikator er en målbar størrelse, f.eks. bruttooverskud pr. måned eller personaleudskiftning pr. kvartal, der bruges til at overvåge en organisations præstationer.
+CUBEMEMBER = KUBE.MEDLEM ## Returnerer et medlem eller en tupel fra kubehierarkiet. Bruges til at validere, om et medlem eller en tupel findes i kuben.
+CUBEMEMBERPROPERTY = KUBEMEDLEM.EGENSKAB ## Returnerer værdien af en egenskab for et medlem i kuben. Bruges til at validere, om et medlemsnavn findes i kuben, og returnere den angivne egenskab for medlemmet.
+CUBERANKEDMEMBER = KUBEMEDLEM.RANG ## Returnerer det n'te eller rangordnede medlem i et sæt. Bruges til at returnere et eller flere elementer i et sæt, f.eks. topsælgere eller de 10 bedste elever.
+CUBESET = KUBESÆT ## Definerer et beregnet sæt medlemmer eller tupler ved at sende et sætudtryk til kuben på serveren, som opretter sættet og returnerer det til Microsoft Office Excel.
+CUBESETCOUNT = KUBESÆT.TÆL ## Returnerer antallet af elementer i et sæt.
+CUBEVALUE = KUBEVÆRDI ## Returnerer en sammenlagt (aggregeret) værdi fra en kube.
+
+
+##
+## Database functions Databasefunktioner
+##
+DAVERAGE = DMIDDEL ## Returnerer gennemsnittet af markerede databaseposter
+DCOUNT = DTÆL ## Tæller de celler, der indeholder tal, i en database
+DCOUNTA = DTÆLV ## Tæller udfyldte celler i en database
+DGET = DHENT ## Uddrager en enkelt post, der opfylder de angivne kriterier, fra en database
+DMAX = DMAKS ## Returnerer den største værdi blandt markerede databaseposter
+DMIN = DMIN ## Returnerer den mindste værdi blandt markerede databaseposter
+DPRODUCT = DPRODUKT ## Ganger værdierne i et bestemt felt med poster, der opfylder kriterierne i en database
+DSTDEV = DSTDAFV ## Beregner et skøn over standardafvigelsen baseret på en stikprøve af markerede databaseposter
+DSTDEVP = DSTDAFVP ## Beregner standardafvigelsen baseret på hele populationen af markerede databaseposter
+DSUM = DSUM ## Sammenlægger de tal i feltkolonnen i databasen, der opfylder kriterierne
+DVAR = DVARIANS ## Beregner varians baseret på en stikprøve af markerede databaseposter
+DVARP = DVARIANSP ## Beregner varians baseret på hele populationen af markerede databaseposter
+
+
+##
+## Date and time functions Dato- og klokkeslætsfunktioner
+##
+DATE = DATO ## Returnerer serienummeret for en bestemt dato
+DATEVALUE = DATOVÆRDI ## Konverterer en dato i form af tekst til et serienummer
+DAY = DAG ## Konverterer et serienummer til en dag i måneden
+DAYS360 = DAGE360 ## Beregner antallet af dage mellem to datoer på grundlag af et år med 360 dage
+EDATE = EDATO ## Returnerer serienummeret for den dato, der ligger det angivne antal måneder før eller efter startdatoen
+EOMONTH = SLUT.PÅ.MÅNED ## Returnerer serienummeret på den sidste dag i måneden før eller efter et angivet antal måneder
+HOUR = TIME ## Konverterer et serienummer til en time
+MINUTE = MINUT ## Konverterer et serienummer til et minut
+MONTH = MÅNED ## Konverterer et serienummer til en måned
+NETWORKDAYS = ANTAL.ARBEJDSDAGE ## Returnerer antallet af hele arbejdsdage mellem to datoer
+NOW = NU ## Returnerer serienummeret for den aktuelle dato eller det aktuelle klokkeslæt
+SECOND = SEKUND ## Konverterer et serienummer til et sekund
+TIME = KLOKKESLÆT ## Returnerer serienummeret for et bestemt klokkeslæt
+TIMEVALUE = TIDSVÆRDI ## Konverterer et klokkeslæt i form af tekst til et serienummer
+TODAY = IDAG ## Returnerer serienummeret for dags dato
+WEEKDAY = UGEDAG ## Konverterer et serienummer til en ugedag
+WEEKNUM = UGE.NR ## Konverterer et serienummer til et tal, der angiver ugenummeret i året
+WORKDAY = ARBEJDSDAG ## Returnerer serienummeret for dagen før eller efter det angivne antal arbejdsdage
+YEAR = ÅR ## Konverterer et serienummer til et år
+YEARFRAC = ÅR.BRØK ## Returnerer årsbrøken, der repræsenterer antallet af hele dage mellem startdato og slutdato
+
+
+##
+## Engineering functions Tekniske funktioner
+##
+BESSELI = BESSELI ## Returnerer den modificerede Bessel-funktion In(x)
+BESSELJ = BESSELJ ## Returnerer Bessel-funktionen Jn(x)
+BESSELK = BESSELK ## Returnerer den modificerede Bessel-funktion Kn(x)
+BESSELY = BESSELY ## Returnerer Bessel-funktionen Yn(x)
+BIN2DEC = BIN.TIL.DEC ## Konverterer et binært tal til et decimaltal
+BIN2HEX = BIN.TIL.HEX ## Konverterer et binært tal til et heksadecimalt tal
+BIN2OCT = BIN.TIL.OKT ## Konverterer et binært tal til et oktaltal.
+COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koefficienter til et komplekst tal
+CONVERT = KONVERTER ## Konverterer et tal fra én måleenhed til en anden
+DEC2BIN = DEC.TIL.BIN ## Konverterer et decimaltal til et binært tal
+DEC2HEX = DEC.TIL.HEX ## Konverterer et decimaltal til et heksadecimalt tal
+DEC2OCT = DEC.TIL.OKT ## Konverterer et decimaltal til et oktaltal
+DELTA = DELTA ## Tester, om to værdier er ens
+ERF = FEJLFUNK ## Returner fejlfunktionen
+ERFC = FEJLFUNK.KOMP ## Returnerer den komplementære fejlfunktion
+GESTEP = GETRIN ## Tester, om et tal er større end en grænseværdi
+HEX2BIN = HEX.TIL.BIN ## Konverterer et heksadecimalt tal til et binært tal
+HEX2DEC = HEX.TIL.DEC ## Konverterer et decimaltal til et heksadecimalt tal
+HEX2OCT = HEX.TIL.OKT ## Konverterer et heksadecimalt tal til et oktaltal
+IMABS = IMAGABS ## Returnerer den absolutte værdi (modulus) for et komplekst tal
+IMAGINARY = IMAGINÆR ## Returnerer den imaginære koefficient for et komplekst tal
+IMARGUMENT = IMAGARGUMENT ## Returnerer argumentet theta, en vinkel udtrykt i radianer
+IMCONJUGATE = IMAGKONJUGERE ## Returnerer den komplekse konjugation af et komplekst tal
+IMCOS = IMAGCOS ## Returnerer et komplekst tals cosinus
+IMDIV = IMAGDIV ## Returnerer kvotienten for to komplekse tal
+IMEXP = IMAGEKSP ## Returnerer et komplekst tals eksponentialfunktion
+IMLN = IMAGLN ## Returnerer et komplekst tals naturlige logaritme
+IMLOG10 = IMAGLOG10 ## Returnerer et komplekst tals sædvanlige logaritme (titalslogaritme)
+IMLOG2 = IMAGLOG2 ## Returnerer et komplekst tals sædvanlige logaritme (totalslogaritme)
+IMPOWER = IMAGPOTENS ## Returnerer et komplekst tal opløftet i en heltalspotens
+IMPRODUCT = IMAGPRODUKT ## Returnerer produktet af komplekse tal
+IMREAL = IMAGREELT ## Returnerer den reelle koefficient for et komplekst tal
+IMSIN = IMAGSIN ## Returnerer et komplekst tals sinus
+IMSQRT = IMAGKVROD ## Returnerer et komplekst tals kvadratrod
+IMSUB = IMAGSUB ## Returnerer forskellen mellem to komplekse tal
+IMSUM = IMAGSUM ## Returnerer summen af komplekse tal
+OCT2BIN = OKT.TIL.BIN ## Konverterer et oktaltal til et binært tal
+OCT2DEC = OKT.TIL.DEC ## Konverterer et oktaltal til et decimaltal
+OCT2HEX = OKT.TIL.HEX ## Konverterer et oktaltal til et heksadecimalt tal
+
+
+##
+## Financial functions Finansielle funktioner
+##
+ACCRINT = PÅLØBRENTE ## Returnerer den påløbne rente for et værdipapir med periodiske renteudbetalinger
+ACCRINTM = PÅLØBRENTE.UDLØB ## Returnerer den påløbne rente for et værdipapir, hvor renteudbetalingen finder sted ved papirets udløb
+AMORDEGRC = AMORDEGRC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode ved hjælp af en afskrivningskoefficient
+AMORLINC = AMORLINC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode
+COUPDAYBS = KUPONDAGE.SA ## Returnerer antallet af dage fra starten af kuponperioden til afregningsdatoen
+COUPDAYS = KUPONDAGE.A ## Returnerer antallet af dage fra begyndelsen af kuponperioden til afregningsdatoen
+COUPDAYSNC = KUPONDAGE.ANK ## Returnerer antallet af dage i den kuponperiode, der indeholder afregningsdatoen
+COUPNCD = KUPONDAG.NÆSTE ## Returnerer den næste kupondato efter afregningsdatoen
+COUPNUM = KUPONBETALINGER ## Returnerer antallet af kuponudbetalinger mellem afregnings- og udløbsdatoen
+COUPPCD = KUPONDAG.FORRIGE ## Returnerer den forrige kupondato før afregningsdatoen
+CUMIPMT = AKKUM.RENTE ## Returnerer den akkumulerede rente, der betales på et lån mellem to perioder
+CUMPRINC = AKKUM.HOVEDSTOL ## Returnerer den akkumulerede nedbringelse af hovedstol mellem to perioder
+DB = DB ## Returnerer afskrivningen på et aktiv i en angivet periode ved anvendelse af saldometoden
+DDB = DSA ## Returnerer afskrivningsbeløbet for et aktiv over en bestemt periode ved anvendelse af dobbeltsaldometoden eller en anden afskrivningsmetode, som du angiver
+DISC = DISKONTO ## Returnerer et værdipapirs diskonto
+DOLLARDE = KR.DECIMAL ## Konverterer en kronepris udtrykt som brøk til en kronepris udtrykt som decimaltal
+DOLLARFR = KR.BRØK ## Konverterer en kronepris udtrykt som decimaltal til en kronepris udtrykt som brøk
+DURATION = VARIGHED ## Returnerer den årlige løbetid for et værdipapir med periodiske renteudbetalinger
+EFFECT = EFFEKTIV.RENTE ## Returnerer den årlige effektive rente
+FV = FV ## Returnerer fremtidsværdien af en investering
+FVSCHEDULE = FVTABEL ## Returnerer den fremtidige værdi af en hovedstol, når der er tilskrevet rente og rentes rente efter forskellige rentesatser
+INTRATE = RENTEFOD ## Returnerer renten på et fuldt ud investeret værdipapir
+IPMT = R.YDELSE ## Returnerer renten fra en investering for en given periode
+IRR = IA ## Returnerer den interne rente for en række pengestrømme
+ISPMT = ISPMT ## Beregner den betalte rente i løbet af en bestemt investeringsperiode
+MDURATION = MVARIGHED ## Returnerer Macauleys modificerede løbetid for et værdipapir med en formodet pari på kr. 100
+MIRR = MIA ## Returnerer den interne forrentning, hvor positive og negative pengestrømme finansieres til forskellig rente
+NOMINAL = NOMINEL ## Returnerer den årlige nominelle rente
+NPER = NPER ## Returnerer antallet af perioder for en investering
+NPV = NUTIDSVÆRDI ## Returnerer nettonutidsværdien for en investering baseret på en række periodiske pengestrømme og en diskonteringssats
+ODDFPRICE = ULIGE.KURS.PÅLYDENDE ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med en ulige (kort eller lang) første periode
+ODDFYIELD = ULIGE.FØRSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige første periode
+ODDLPRICE = ULIGE.SIDSTE.KURS ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med ulige sidste periode
+ODDLYIELD = ULIGE.SIDSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige sidste periode
+PMT = YDELSE ## Returnerer renten fra en investering for en given periode
+PPMT = H.YDELSE ## Returnerer ydelsen på hovedstolen for en investering i en given periode
+PRICE = KURS ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir med periodiske renteudbetalinger
+PRICEDISC = KURS.DISKONTO ## Returnerer kursen pr. kr 100 nominel værdi for et diskonteret værdipapir
+PRICEMAT = KURS.UDLØB ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir, hvor renten udbetales ved papirets udløb
+PV = NV ## Returnerer den nuværende værdi af en investering
+RATE = RENTE ## Returnerer renten i hver periode for en annuitet
+RECEIVED = MODTAGET.VED.UDLØB ## Returnerer det beløb, der modtages ved udløbet af et fuldt ud investeret værdipapir
+SLN = LA ## Returnerer den lineære afskrivning for et aktiv i en enkelt periode
+SYD = ÅRSAFSKRIVNING ## Returnerer den årlige afskrivning på et aktiv i en bestemt periode
+TBILLEQ = STATSOBLIGATION ## Returnerer det obligationsækvivalente afkast for en statsobligation
+TBILLPRICE = STATSOBLIGATION.KURS ## Returnerer kursen pr. kr 100 nominel værdi for en statsobligation
+TBILLYIELD = STATSOBLIGATION.AFKAST ## Returnerer en afkastet på en statsobligation
+VDB = VSA ## Returnerer afskrivningen på et aktiv i en angivet periode, herunder delperioder, ved brug af dobbeltsaldometoden
+XIRR = INTERN.RENTE ## Returnerer den interne rente for en plan over pengestrømme, der ikke behøver at være periodiske
+XNPV = NETTO.NUTIDSVÆRDI ## Returnerer nutidsværdien for en plan over pengestrømme, der ikke behøver at være periodiske
+YIELD = AFKAST ## Returnerer afkastet for et værdipapir med periodiske renteudbetalinger
+YIELDDISC = AFKAST.DISKONTO ## Returnerer det årlige afkast for et diskonteret værdipapir, f.eks. en statsobligation
+YIELDMAT = AFKAST.UDLØBSDATO ## Returnerer det årlige afkast for et værdipapir, hvor renten udbetales ved papirets udløb
+
+
+##
+## Information functions Informationsfunktioner
+##
+CELL = CELLE ## Returnerer oplysninger om formatering, placering eller indhold af en celle
+ERROR.TYPE = FEJLTYPE ## Returnerer et tal, der svarer til en fejltype
+INFO = INFO ## Returnerer oplysninger om det aktuelle operativmiljø
+ISBLANK = ER.TOM ## Returnerer SAND, hvis værdien er tom
+ISERR = ER.FJL ## Returnerer SAND, hvis værdien er en fejlværdi undtagen #I/T
+ISERROR = ER.FEJL ## Returnerer SAND, hvis værdien er en fejlværdi
+ISEVEN = ER.LIGE ## Returnerer SAND, hvis tallet er lige
+ISLOGICAL = ER.LOGISK ## Returnerer SAND, hvis værdien er en logisk værdi
+ISNA = ER.IKKE.TILGÆNGELIG ## Returnerer SAND, hvis værdien er fejlværdien #I/T
+ISNONTEXT = ER.IKKE.TEKST ## Returnerer SAND, hvis værdien ikke er tekst
+ISNUMBER = ER.TAL ## Returnerer SAND, hvis værdien er et tal
+ISODD = ER.ULIGE ## Returnerer SAND, hvis tallet er ulige
+ISREF = ER.REFERENCE ## Returnerer SAND, hvis værdien er en reference
+ISTEXT = ER.TEKST ## Returnerer SAND, hvis værdien er tekst
+N = TAL ## Returnerer en værdi konverteret til et tal
+NA = IKKE.TILGÆNGELIG ## Returnerer fejlværdien #I/T
+TYPE = VÆRDITYPE ## Returnerer et tal, der angiver datatypen for en værdi
+
+
+##
+## Logical functions Logiske funktioner
+##
+AND = OG ## Returnerer SAND, hvis alle argumenterne er sande
+FALSE = FALSK ## Returnerer den logiske værdi FALSK
+IF = HVIS ## Angiver en logisk test, der skal udføres
+IFERROR = HVIS.FEJL ## Returnerer en værdi, du angiver, hvis en formel evauleres som en fejl. Returnerer i modsat fald resultatet af formlen
+NOT = IKKE ## Vender argumentets logik om
+OR = ELLER ## Returneret værdien SAND, hvis mindst ét argument er sandt
+TRUE = SAND ## Returnerer den logiske værdi SAND
+
+
+##
+## Lookup and reference functions Opslags- og referencefunktioner
+##
+ADDRESS = ADRESSE ## Returnerer en reference som tekst til en enkelt celle i et regneark
+AREAS = OMRÅDER ## Returnerer antallet af områder i en reference
+CHOOSE = VÆLG ## Vælger en værdi på en liste med værdier
+COLUMN = KOLONNE ## Returnerer kolonnenummeret i en reference
+COLUMNS = KOLONNER ## Returnerer antallet af kolonner i en reference
+HLOOKUP = VOPSLAG ## Søger i den øverste række af en matrix og returnerer værdien af den angivne celle
+HYPERLINK = HYPERLINK ## Opretter en genvej kaldet et hyperlink, der åbner et dokument, som er lagret på en netværksserver, på et intranet eller på internettet
+INDEX = INDEKS ## Anvender et indeks til at vælge en værdi fra en reference eller en matrix
+INDIRECT = INDIREKTE ## Returnerer en reference, der er angivet af en tekstværdi
+LOOKUP = SLÅ.OP ## Søger værdier i en vektor eller en matrix
+MATCH = SAMMENLIGN ## Søger værdier i en reference eller en matrix
+OFFSET = FORSKYDNING ## Returnerer en reference forskudt i forhold til en given reference
+ROW = RÆKKE ## Returnerer rækkenummeret for en reference
+ROWS = RÆKKER ## Returnerer antallet af rækker i en reference
+RTD = RTD ## Henter realtidsdata fra et program, der understøtter COM-automatisering (Automation: En metode til at arbejde med objekter fra et andet program eller udviklingsværktøj. Automation, som tidligere blev kaldt OLE Automation, er en industristandard og en funktion i COM (Component Object Model).)
+TRANSPOSE = TRANSPONER ## Returnerer en transponeret matrix
+VLOOKUP = LOPSLAG ## Søger i øverste række af en matrix og flytter på tværs af rækken for at returnere en celleværdi
+
+
+##
+## Math and trigonometry functions Matematiske og trigonometriske funktioner
+##
+ABS = ABS ## Returnerer den absolutte værdi af et tal
+ACOS = ARCCOS ## Returnerer et tals arcus cosinus
+ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus af tal
+ASIN = ARCSIN ## Returnerer et tals arcus sinus
+ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus for tal
+ATAN = ARCTAN ## Returnerer et tals arcus tangens
+ATAN2 = ARCTAN2 ## Returnerer de angivne x- og y-koordinaters arcus tangens
+ATANH = ARCTANH ## Returnerer et tals inverse hyperbolske tangens
+CEILING = AFRUND.LOFT ## Afrunder et tal til nærmeste heltal eller til nærmeste multiplum af betydning
+COMBIN = KOMBIN ## Returnerer antallet af kombinationer for et givet antal objekter
+COS = COS ## Returnerer et tals cosinus
+COSH = COSH ## Returnerer den inverse hyperbolske cosinus af et tal
+DEGREES = GRADER ## Konverterer radianer til grader
+EVEN = LIGE ## Runder et tal op til nærmeste lige heltal
+EXP = EKSP ## Returnerer e opløftet til en potens af et angivet tal
+FACT = FAKULTET ## Returnerer et tals fakultet
+FACTDOUBLE = DOBBELT.FAKULTET ## Returnerer et tals dobbelte fakultet
+FLOOR = AFRUND.GULV ## Runder et tal ned mod nul
+GCD = STØRSTE.FÆLLES.DIVISOR ## Returnerer den største fælles divisor
+INT = HELTAL ## Nedrunder et tal til det nærmeste heltal
+LCM = MINDSTE.FÆLLES.MULTIPLUM ## Returnerer det mindste fælles multiplum
+LN = LN ## Returnerer et tals naturlige logaritme
+LOG = LOG ## Returnerer logaritmen for et tal på grundlag af et angivet grundtal
+LOG10 = LOG10 ## Returnerer titalslogaritmen af et tal
+MDETERM = MDETERM ## Returnerer determinanten for en matrix
+MINVERSE = MINVERT ## Returnerer den inverse matrix for en matrix
+MMULT = MPRODUKT ## Returnerer matrixproduktet af to matrixer
+MOD = REST ## Returnerer restværdien fra division
+MROUND = MAFRUND ## Returnerer et tal afrundet til det ønskede multiplum
+MULTINOMIAL = MULTINOMIAL ## Returnerer et multinomialt talsæt
+ODD = ULIGE ## Runder et tal op til nærmeste ulige heltal
+PI = PI ## Returnerer værdien af pi
+POWER = POTENS ## Returnerer resultatet af et tal opløftet til en potens
+PRODUCT = PRODUKT ## Multiplicerer argumenterne
+QUOTIENT = KVOTIENT ## Returnerer heltalsdelen ved division
+RADIANS = RADIANER ## Konverterer grader til radianer
+RAND = SLUMP ## Returnerer et tilfældigt tal mellem 0 og 1
+RANDBETWEEN = SLUMP.MELLEM ## Returnerer et tilfældigt tal mellem de tal, der angives
+ROMAN = ROMERTAL ## Konverterer et arabertal til romertal som tekst
+ROUND = AFRUND ## Afrunder et tal til et angivet antal decimaler
+ROUNDDOWN = RUND.NED ## Runder et tal ned mod nul
+ROUNDUP = RUND.OP ## Runder et tal op, væk fra 0 (nul)
+SERIESSUM = SERIESUM ## Returnerer summen af en potensserie baseret på en formel
+SIGN = FORTEGN ## Returnerer et tals fortegn
+SIN = SIN ## Returnerer en given vinkels sinusværdi
+SINH = SINH ## Returnerer den hyperbolske sinus af et tal
+SQRT = KVROD ## Returnerer en positiv kvadratrod
+SQRTPI = KVRODPI ## Returnerer kvadratroden af (tal * pi;)
+SUBTOTAL = SUBTOTAL ## Returnerer en subtotal på en liste eller i en database
+SUM = SUM ## Lægger argumenterne sammen
+SUMIF = SUM.HVIS ## Lægger de celler sammen, der er specificeret af et givet kriterium.
+SUMIFS = SUM.HVISER ## Lægger de celler i et område sammen, der opfylder flere kriterier.
+SUMPRODUCT = SUMPRODUKT ## Returnerer summen af produkter af ens matrixkomponenter
+SUMSQ = SUMKV ## Returnerer summen af argumenternes kvadrater
+SUMX2MY2 = SUMX2MY2 ## Returnerer summen af differensen mellem kvadrater af ens værdier i to matrixer
+SUMX2PY2 = SUMX2PY2 ## Returnerer summen af summen af kvadrater af tilsvarende værdier i to matrixer
+SUMXMY2 = SUMXMY2 ## Returnerer summen af kvadrater af differenser mellem ens værdier i to matrixer
+TAN = TAN ## Returnerer et tals tangens
+TANH = TANH ## Returnerer et tals hyperbolske tangens
+TRUNC = AFKORT ## Afkorter et tal til et heltal
+
+
+##
+## Statistical functions Statistiske funktioner
+##
+AVEDEV = MAD ## Returnerer den gennemsnitlige numeriske afvigelse fra stikprøvens middelværdi
+AVERAGE = MIDDEL ## Returnerer middelværdien af argumenterne
+AVERAGEA = MIDDELV ## Returnerer middelværdien af argumenterne og medtager tal, tekst og logiske værdier
+AVERAGEIF = MIDDEL.HVIS ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder et givet kriterium, i et område
+AVERAGEIFS = MIDDEL.HVISER ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder flere kriterier.
+BETADIST = BETAFORDELING ## Returnerer den kumulative betafordelingsfunktion
+BETAINV = BETAINV ## Returnerer den inverse kumulative fordelingsfunktion for en angivet betafordeling
+BINOMDIST = BINOMIALFORDELING ## Returnerer punktsandsynligheden for binomialfordelingen
+CHIDIST = CHIFORDELING ## Returnerer fraktilsandsynligheden for en chi2-fordeling
+CHIINV = CHIINV ## Returnerer den inverse fraktilsandsynlighed for en chi2-fordeling
+CHITEST = CHITEST ## Foretager en test for uafhængighed
+CONFIDENCE = KONFIDENSINTERVAL ## Returnerer et konfidensinterval for en population
+CORREL = KORRELATION ## Returnerer korrelationskoefficienten mellem to datasæt
+COUNT = TÆL ## Tæller antallet af tal på en liste med argumenter
+COUNTA = TÆLV ## Tæller antallet af værdier på en liste med argumenter
+COUNTBLANK = ANTAL.BLANKE ## Tæller antallet af tomme celler i et område
+COUNTIF = TÆLHVIS ## Tæller antallet af celler, som opfylder de givne kriterier, i et område
+COUNTIFS = TÆL.HVISER ## Tæller antallet af de celler, som opfylder flere kriterier, i et område
+COVAR = KOVARIANS ## Beregner kovariansen mellem to stokastiske variabler
+CRITBINOM = KRITBINOM ## Returnerer den mindste værdi for x, for hvilken det gælder, at fordelingsfunktionen er mindre end eller lig med kriterieværdien.
+DEVSQ = SAK ## Returnerer summen af de kvadrerede afvigelser fra middelværdien
+EXPONDIST = EKSPFORDELING ## Returnerer eksponentialfordelingen
+FDIST = FFORDELING ## Returnerer fraktilsandsynligheden for F-fordelingen
+FINV = FINV ## Returnerer den inverse fraktilsandsynlighed for F-fordelingen
+FISHER = FISHER ## Returnerer Fisher-transformationen
+FISHERINV = FISHERINV ## Returnerer den inverse Fisher-transformation
+FORECAST = PROGNOSE ## Returnerer en prognoseværdi baseret på lineær tendens
+FREQUENCY = FREKVENS ## Returnerer en frekvensfordeling i en søjlevektor
+FTEST = FTEST ## Returnerer resultatet af en F-test til sammenligning af varians
+GAMMADIST = GAMMAFORDELING ## Returnerer fordelingsfunktionen for gammafordelingen
+GAMMAINV = GAMMAINV ## Returnerer den inverse fordelingsfunktion for gammafordelingen
+GAMMALN = GAMMALN ## Returnerer den naturlige logaritme til gammafordelingen, G(x)
+GEOMEAN = GEOMIDDELVÆRDI ## Returnerer det geometriske gennemsnit
+GROWTH = FORØGELSE ## Returnerer værdier langs en eksponentiel tendens
+HARMEAN = HARMIDDELVÆRDI ## Returnerer det harmoniske gennemsnit
+HYPGEOMDIST = HYPGEOFORDELING ## Returnerer punktsandsynligheden i en hypergeometrisk fordeling
+INTERCEPT = SKÆRING ## Returnerer afskæringsværdien på y-aksen i en lineær regression
+KURT = TOPSTEJL ## Returnerer kurtosisværdien for en stokastisk variabel
+LARGE = STOR ## Returnerer den k'te største værdi i et datasæt
+LINEST = LINREGR ## Returnerer parameterestimaterne for en lineær tendens
+LOGEST = LOGREGR ## Returnerer parameterestimaterne for en eksponentiel tendens
+LOGINV = LOGINV ## Returnerer den inverse fordelingsfunktion for lognormalfordelingen
+LOGNORMDIST = LOGNORMFORDELING ## Returnerer fordelingsfunktionen for lognormalfordelingen
+MAX = MAKS ## Returnerer den maksimale værdi på en liste med argumenter.
+MAXA = MAKSV ## Returnerer den maksimale værdi på en liste med argumenter og medtager tal, tekst og logiske værdier
+MEDIAN = MEDIAN ## Returnerer medianen for de angivne tal
+MIN = MIN ## Returnerer den mindste værdi på en liste med argumenter.
+MINA = MINV ## Returnerer den mindste værdi på en liste med argumenter og medtager tal, tekst og logiske værdier
+MODE = HYPPIGST ## Returnerer den hyppigste værdi i et datasæt
+NEGBINOMDIST = NEGBINOMFORDELING ## Returnerer den negative binomialfordeling
+NORMDIST = NORMFORDELING ## Returnerer fordelingsfunktionen for normalfordelingen
+NORMINV = NORMINV ## Returnerer den inverse fordelingsfunktion for normalfordelingen
+NORMSDIST = STANDARDNORMFORDELING ## Returnerer fordelingsfunktionen for standardnormalfordelingen
+NORMSINV = STANDARDNORMINV ## Returnerer den inverse fordelingsfunktion for standardnormalfordelingen
+PEARSON = PEARSON ## Returnerer Pearsons korrelationskoefficient
+PERCENTILE = FRAKTIL ## Returnerer den k'te fraktil for datasættet
+PERCENTRANK = PROCENTPLADS ## Returnerer den procentuelle rang for en given værdi i et datasæt
+PERMUT = PERMUT ## Returnerer antallet af permutationer for et givet sæt objekter
+POISSON = POISSON ## Returnerer fordelingsfunktionen for en Poisson-fordeling
+PROB = SANDSYNLIGHED ## Returnerer intervalsandsynligheden
+QUARTILE = KVARTIL ## Returnerer kvartilen i et givet datasæt
+RANK = PLADS ## Returnerer rangen for et tal på en liste med tal
+RSQ = FORKLARINGSGRAD ## Returnerer R2-værdien fra en simpel lineær regression
+SKEW = SKÆVHED ## Returnerer skævheden for en stokastisk variabel
+SLOPE = HÆLDNING ## Returnerer estimatet på hældningen fra en simpel lineær regression
+SMALL = MINDSTE ## Returnerer den k'te mindste værdi i datasættet
+STANDARDIZE = STANDARDISER ## Returnerer en standardiseret værdi
+STDEV = STDAFV ## Estimerer standardafvigelsen på basis af en stikprøve
+STDEVA = STDAFVV ## Beregner standardafvigelsen på basis af en prøve og medtager tal, tekst og logiske værdier
+STDEVP = STDAFVP ## Beregner standardafvigelsen på basis af en hel population
+STDEVPA = STDAFVPV ## Beregner standardafvigelsen på basis af en hel population og medtager tal, tekst og logiske værdier
+STEYX = STFYX ## Returnerer standardafvigelsen for de estimerede y-værdier i den simple lineære regression
+TDIST = TFORDELING ## Returnerer fordelingsfunktionen for Student's t-fordeling
+TINV = TINV ## Returnerer den inverse fordelingsfunktion for Student's t-fordeling
+TREND = TENDENS ## Returnerer værdi under antagelse af en lineær tendens
+TRIMMEAN = TRIMMIDDELVÆRDI ## Returnerer den trimmede middelværdi for datasættet
+TTEST = TTEST ## Returnerer den sandsynlighed, der er forbundet med Student's t-test
+VAR = VARIANS ## Beregner variansen på basis af en prøve
+VARA = VARIANSV ## Beregner variansen på basis af en prøve og medtager tal, tekst og logiske værdier
+VARP = VARIANSP ## Beregner variansen på basis af hele populationen
+VARPA = VARIANSPV ## Beregner variansen på basis af hele populationen og medtager tal, tekst og logiske værdier
+WEIBULL = WEIBULL ## Returnerer fordelingsfunktionen for Weibull-fordelingen
+ZTEST = ZTEST ## Returnerer sandsynlighedsværdien ved en en-sidet z-test
+
+
+##
+## Text functions Tekstfunktioner
+##
+ASC = ASC ## Ændrer engelske tegn i fuld bredde (dobbelt-byte) eller katakana i en tegnstreng til tegn i halv bredde (enkelt-byte)
+BAHTTEXT = BAHTTEKST ## Konverterer et tal til tekst ved hjælp af valutaformatet ß (baht)
+CHAR = TEGN ## Returnerer det tegn, der svarer til kodenummeret
+CLEAN = RENS ## Fjerner alle tegn, der ikke kan udskrives, fra tekst
+CODE = KODE ## Returnerer en numerisk kode for det første tegn i en tekststreng
+CONCATENATE = SAMMENKÆDNING ## Sammenkæder adskillige tekstelementer til ét tekstelement
+DOLLAR = KR ## Konverterer et tal til tekst ved hjælp af valutaformatet kr. (kroner)
+EXACT = EKSAKT ## Kontrollerer, om to tekstværdier er identiske
+FIND = FIND ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver)
+FINDB = FINDB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver)
+FIXED = FAST ## Formaterer et tal som tekst med et fast antal decimaler
+JIS = JIS ## Ændrer engelske tegn i halv bredde (enkelt-byte) eller katakana i en tegnstreng til tegn i fuld bredde (dobbelt-byte)
+LEFT = VENSTRE ## Returnerer tegnet længst til venstre i en tekstværdi
+LEFTB = VENSTREB ## Returnerer tegnet længst til venstre i en tekstværdi
+LEN = LÆNGDE ## Returnerer antallet af tegn i en tekststreng
+LENB = LÆNGDEB ## Returnerer antallet af tegn i en tekststreng
+LOWER = SMÅ.BOGSTAVER ## Konverterer tekst til små bogstaver
+MID = MIDT ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition
+MIDB = MIDTB ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition
+PHONETIC = FONETISK ## Uddrager de fonetiske (furigana) tegn fra en tekststreng
+PROPER = STORT.FORBOGSTAV ## Konverterer første bogstav i hvert ord i teksten til stort bogstav
+REPLACE = ERSTAT ## Erstatter tegn i tekst
+REPLACEB = ERSTATB ## Erstatter tegn i tekst
+REPT = GENTAG ## Gentager tekst et givet antal gange
+RIGHT = HØJRE ## Returnerer tegnet længste til højre i en tekstværdi
+RIGHTB = HØJREB ## Returnerer tegnet længste til højre i en tekstværdi
+SEARCH = SØG ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver)
+SEARCHB = SØGB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver)
+SUBSTITUTE = UDSKIFT ## Udskifter gammel tekst med ny tekst i en tekststreng
+T = T ## Konverterer argumenterne til tekst
+TEXT = TEKST ## Formaterer et tal og konverterer det til tekst
+TRIM = FJERN.OVERFLØDIGE.BLANKE ## Fjerner mellemrum fra tekst
+UPPER = STORE.BOGSTAVER ## Konverterer tekst til store bogstaver
+VALUE = VÆRDI ## Konverterer et tekstargument til et tal
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config
new file mode 100644
index 0000000..ade244d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NULL!
+DIV0 = #DIV/0!
+VALUE = #WERT!
+REF = #BEZUG!
+NAME = #NAME?
+NUM = #ZAHL!
+NA = #NV
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions
new file mode 100644
index 0000000..edd1bf1
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Add-In- und Automatisierungsfunktionen
+##
+GETPIVOTDATA = PIVOTDATENZUORDNEN ## In einem PivotTable-Bericht gespeicherte Daten werden zurückgegeben.
+
+
+##
+## Cube functions Cubefunktionen
+##
+CUBEKPIMEMBER = CUBEKPIELEMENT ## Gibt Name, Eigenschaft und Measure eines Key Performance Indicators (KPI) zurück und zeigt den Namen und die Eigenschaft in der Zelle an. Ein KPI ist ein quantifizierbares Maß, wie z. B. der monatliche Bruttogewinn oder die vierteljährliche Mitarbeiterfluktuation, mit dessen Hilfe das Leistungsverhalten eines Unternehmens überwacht werden kann.
+CUBEMEMBER = CUBEELEMENT ## Gibt ein Element oder ein Tuple in einer Cubehierarchie zurück. Wird verwendet, um zu überprüfen, ob das Element oder Tuple im Cube vorhanden ist.
+CUBEMEMBERPROPERTY = CUBEELEMENTEIGENSCHAFT ## Gibt den Wert einer Elementeigenschaft im Cube zurück. Wird verwendet, um zu überprüfen, ob ein Elementname im Cube vorhanden ist, und um die für dieses Element angegebene Eigenschaft zurückzugeben.
+CUBERANKEDMEMBER = CUBERANGELEMENT ## Gibt das n-te oder n-rangige Element in einer Menge zurück. Wird verwendet, um mindestens ein Element in einer Menge zurückzugeben, wie z. B. bester Vertriebsmitarbeiter oder 10 beste Kursteilnehmer.
+CUBESET = CUBEMENGE ## Definiert eine berechnete Menge Elemente oder Tuples durch Senden eines Mengenausdrucks an den Cube auf dem Server, der die Menge erstellt und an Microsoft Office Excel zurückgibt.
+CUBESETCOUNT = CUBEMENGENANZAHL ## Gibt die Anzahl der Elemente in einer Menge zurück.
+CUBEVALUE = CUBEWERT ## Gibt einen Aggregatwert aus einem Cube zurück.
+
+
+##
+## Database functions Datenbankfunktionen
+##
+DAVERAGE = DBMITTELWERT ## Gibt den Mittelwert der ausgewählten Datenbankeinträge zurück
+DCOUNT = DBANZAHL ## Zählt die Zellen mit Zahlen in einer Datenbank
+DCOUNTA = DBANZAHL2 ## Zählt nicht leere Zellen in einer Datenbank
+DGET = DBAUSZUG ## Extrahiert aus einer Datenbank einen einzelnen Datensatz, der den angegebenen Kriterien entspricht
+DMAX = DBMAX ## Gibt den größten Wert aus ausgewählten Datenbankeinträgen zurück
+DMIN = DBMIN ## Gibt den kleinsten Wert aus ausgewählten Datenbankeinträgen zurück
+DPRODUCT = DBPRODUKT ## Multipliziert die Werte in einem bestimmten Feld mit Datensätzen, die den Kriterien in einer Datenbank entsprechen
+DSTDEV = DBSTDABW ## Schätzt die Standardabweichung auf der Grundlage einer Stichprobe aus ausgewählten Datenbankeinträgen
+DSTDEVP = DBSTDABWN ## Berechnet die Standardabweichung auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge
+DSUM = DBSUMME ## Addiert die Zahlen in der Feldspalte mit Datensätzen in der Datenbank, die den Kriterien entsprechen
+DVAR = DBVARIANZ ## Schätzt die Varianz auf der Grundlage ausgewählter Datenbankeinträge
+DVARP = DBVARIANZEN ## Berechnet die Varianz auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge
+
+
+##
+## Date and time functions Datums- und Zeitfunktionen
+##
+DATE = DATUM ## Gibt die fortlaufende Zahl eines bestimmten Datums zurück
+DATEVALUE = DATWERT ## Wandelt ein Datum in Form von Text in eine fortlaufende Zahl um
+DAY = TAG ## Wandelt eine fortlaufende Zahl in den Tag des Monats um
+DAYS360 = TAGE360 ## Berechnet die Anzahl der Tage zwischen zwei Datumsangaben ausgehend von einem Jahr, das 360 Tage hat
+EDATE = EDATUM ## Gibt die fortlaufende Zahl des Datums zurück, bei dem es sich um die angegebene Anzahl von Monaten vor oder nach dem Anfangstermin handelt
+EOMONTH = MONATSENDE ## Gibt die fortlaufende Zahl des letzten Tags des Monats vor oder nach einer festgelegten Anzahl von Monaten zurück
+HOUR = STUNDE ## Wandelt eine fortlaufende Zahl in eine Stunde um
+MINUTE = MINUTE ## Wandelt eine fortlaufende Zahl in eine Minute um
+MONTH = MONAT ## Wandelt eine fortlaufende Zahl in einen Monat um
+NETWORKDAYS = NETTOARBEITSTAGE ## Gibt die Anzahl von ganzen Arbeitstagen zwischen zwei Datumswerten zurück
+NOW = JETZT ## Gibt die fortlaufende Zahl des aktuellen Datums und der aktuellen Uhrzeit zurück
+SECOND = SEKUNDE ## Wandelt eine fortlaufende Zahl in eine Sekunde um
+TIME = ZEIT ## Gibt die fortlaufende Zahl einer bestimmten Uhrzeit zurück
+TIMEVALUE = ZEITWERT ## Wandelt eine Uhrzeit in Form von Text in eine fortlaufende Zahl um
+TODAY = HEUTE ## Gibt die fortlaufende Zahl des heutigen Datums zurück
+WEEKDAY = WOCHENTAG ## Wandelt eine fortlaufende Zahl in den Wochentag um
+WEEKNUM = KALENDERWOCHE ## Wandelt eine fortlaufende Zahl in eine Zahl um, die angibt, in welche Woche eines Jahres das angegebene Datum fällt
+WORKDAY = ARBEITSTAG ## Gibt die fortlaufende Zahl des Datums vor oder nach einer bestimmten Anzahl von Arbeitstagen zurück
+YEAR = JAHR ## Wandelt eine fortlaufende Zahl in ein Jahr um
+YEARFRAC = BRTEILJAHRE ## Gibt die Anzahl der ganzen Tage zwischen Ausgangsdatum und Enddatum in Bruchteilen von Jahren zurück
+
+
+##
+## Engineering functions Konstruktionsfunktionen
+##
+BESSELI = BESSELI ## Gibt die geänderte Besselfunktion In(x) zurück
+BESSELJ = BESSELJ ## Gibt die Besselfunktion Jn(x) zurück
+BESSELK = BESSELK ## Gibt die geänderte Besselfunktion Kn(x) zurück
+BESSELY = BESSELY ## Gibt die Besselfunktion Yn(x) zurück
+BIN2DEC = BININDEZ ## Wandelt eine binäre Zahl (Dualzahl) in eine dezimale Zahl um
+BIN2HEX = BININHEX ## Wandelt eine binäre Zahl (Dualzahl) in eine hexadezimale Zahl um
+BIN2OCT = BININOKT ## Wandelt eine binäre Zahl (Dualzahl) in eine oktale Zahl um
+COMPLEX = KOMPLEXE ## Wandelt den Real- und Imaginärteil in eine komplexe Zahl um
+CONVERT = UMWANDELN ## Wandelt eine Zahl von einem Maßsystem in ein anderes um
+DEC2BIN = DEZINBIN ## Wandelt eine dezimale Zahl in eine binäre Zahl (Dualzahl) um
+DEC2HEX = DEZINHEX ## Wandelt eine dezimale Zahl in eine hexadezimale Zahl um
+DEC2OCT = DEZINOKT ## Wandelt eine dezimale Zahl in eine oktale Zahl um
+DELTA = DELTA ## Überprüft, ob zwei Werte gleich sind
+ERF = GAUSSFEHLER ## Gibt die Gauss'sche Fehlerfunktion zurück
+ERFC = GAUSSFKOMPL ## Gibt das Komplement zur Gauss'schen Fehlerfunktion zurück
+GESTEP = GGANZZAHL ## Überprüft, ob eine Zahl größer als ein gegebener Schwellenwert ist
+HEX2BIN = HEXINBIN ## Wandelt eine hexadezimale Zahl in eine Binärzahl um
+HEX2DEC = HEXINDEZ ## Wandelt eine hexadezimale Zahl in eine dezimale Zahl um
+HEX2OCT = HEXINOKT ## Wandelt eine hexadezimale Zahl in eine Oktalzahl um
+IMABS = IMABS ## Gibt den Absolutbetrag (Modulo) einer komplexen Zahl zurück
+IMAGINARY = IMAGINÄRTEIL ## Gibt den Imaginärteil einer komplexen Zahl zurück
+IMARGUMENT = IMARGUMENT ## Gibt das Argument Theta zurück, einen Winkel, der als Bogenmaß ausgedrückt wird
+IMCONJUGATE = IMKONJUGIERTE ## Gibt die konjugierte komplexe Zahl zu einer komplexen Zahl zurück
+IMCOS = IMCOS ## Gibt den Kosinus einer komplexen Zahl zurück
+IMDIV = IMDIV ## Gibt den Quotienten zweier komplexer Zahlen zurück
+IMEXP = IMEXP ## Gibt die algebraische Form einer in exponentieller Schreibweise vorliegenden komplexen Zahl zurück
+IMLN = IMLN ## Gibt den natürlichen Logarithmus einer komplexen Zahl zurück
+IMLOG10 = IMLOG10 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 10 zurück
+IMLOG2 = IMLOG2 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 2 zurück
+IMPOWER = IMAPOTENZ ## Potenziert eine komplexe Zahl mit einer ganzen Zahl
+IMPRODUCT = IMPRODUKT ## Gibt das Produkt von komplexen Zahlen zurück
+IMREAL = IMREALTEIL ## Gibt den Realteil einer komplexen Zahl zurück
+IMSIN = IMSIN ## Gibt den Sinus einer komplexen Zahl zurück
+IMSQRT = IMWURZEL ## Gibt die Quadratwurzel einer komplexen Zahl zurück
+IMSUB = IMSUB ## Gibt die Differenz zwischen zwei komplexen Zahlen zurück
+IMSUM = IMSUMME ## Gibt die Summe von komplexen Zahlen zurück
+OCT2BIN = OKTINBIN ## Wandelt eine oktale Zahl in eine binäre Zahl (Dualzahl) um
+OCT2DEC = OKTINDEZ ## Wandelt eine oktale Zahl in eine dezimale Zahl um
+OCT2HEX = OKTINHEX ## Wandelt eine oktale Zahl in eine hexadezimale Zahl um
+
+
+##
+## Financial functions Finanzmathematische Funktionen
+##
+ACCRINT = AUFGELZINS ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers mit periodischen Zinszahlungen zurück
+ACCRINTM = AUFGELZINSF ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers zurück, die bei Fälligkeit ausgezahlt werden
+AMORDEGRC = AMORDEGRK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume mithilfe eines Abschreibungskoeffizienten zurück
+AMORLINC = AMORLINEARK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume zurück
+COUPDAYBS = ZINSTERMTAGVA ## Gibt die Anzahl der Tage vom Anfang des Zinstermins bis zum Abrechnungstermin zurück
+COUPDAYS = ZINSTERMTAGE ## Gibt die Anzahl der Tage der Zinsperiode zurück, die den Abrechnungstermin einschließt
+COUPDAYSNC = ZINSTERMTAGNZ ## Gibt die Anzahl der Tage vom Abrechnungstermin bis zum nächsten Zinstermin zurück
+COUPNCD = ZINSTERMNZ ## Gibt das Datum des ersten Zinstermins nach dem Abrechnungstermin zurück
+COUPNUM = ZINSTERMZAHL ## Gibt die Anzahl der Zinstermine zwischen Abrechnungs- und Fälligkeitsdatum zurück
+COUPPCD = ZINSTERMVZ ## Gibt das Datum des letzten Zinstermins vor dem Abrechnungstermin zurück
+CUMIPMT = KUMZINSZ ## Berechnet die kumulierten Zinsen, die zwischen zwei Perioden zu zahlen sind
+CUMPRINC = KUMKAPITAL ## Berechnet die aufgelaufene Tilgung eines Darlehens, die zwischen zwei Perioden zu zahlen ist
+DB = GDA2 ## Gibt die geometrisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück
+DDB = GDA ## Gibt die Abschreibung eines Anlageguts für einen angegebenen Zeitraum unter Verwendung der degressiven Doppelraten-Abschreibung oder eines anderen von Ihnen angegebenen Abschreibungsverfahrens zurück
+DISC = DISAGIO ## Gibt den in Prozent ausgedrückten Abzinsungssatz eines Wertpapiers zurück
+DOLLARDE = NOTIERUNGDEZ ## Wandelt eine Notierung, die als Dezimalbruch ausgedrückt wurde, in eine Dezimalzahl um
+DOLLARFR = NOTIERUNGBRU ## Wandelt eine Notierung, die als Dezimalzahl ausgedrückt wurde, in einen Dezimalbruch um
+DURATION = DURATION ## Gibt die jährliche Duration eines Wertpapiers mit periodischen Zinszahlungen zurück
+EFFECT = EFFEKTIV ## Gibt die jährliche Effektivverzinsung zurück
+FV = ZW ## Gibt den zukünftigen Wert (Endwert) einer Investition zurück
+FVSCHEDULE = ZW2 ## Gibt den aufgezinsten Wert des Anfangskapitals für eine Reihe periodisch unterschiedlicher Zinssätze zurück
+INTRATE = ZINSSATZ ## Gibt den Zinssatz eines voll investierten Wertpapiers zurück
+IPMT = ZINSZ ## Gibt die Zinszahlung einer Investition für die angegebene Periode zurück
+IRR = IKV ## Gibt den internen Zinsfuß einer Investition ohne Finanzierungskosten oder Reinvestitionsgewinne zurück
+ISPMT = ISPMT ## Berechnet die während eines bestimmten Zeitraums für eine Investition gezahlten Zinsen
+MDURATION = MDURATION ## Gibt die geänderte Dauer für ein Wertpapier mit einem angenommenen Nennwert von 100 € zurück
+MIRR = QIKV ## Gibt den internen Zinsfuß zurück, wobei positive und negative Zahlungen zu unterschiedlichen Sätzen finanziert werden
+NOMINAL = NOMINAL ## Gibt die jährliche Nominalverzinsung zurück
+NPER = ZZR ## Gibt die Anzahl der Zahlungsperioden einer Investition zurück
+NPV = NBW ## Gibt den Nettobarwert einer Investition auf Basis periodisch anfallender Zahlungen und eines Abzinsungsfaktors zurück
+ODDFPRICE = UNREGER.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück
+ODDFYIELD = UNREGER.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück
+ODDLPRICE = UNREGLE.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück
+ODDLYIELD = UNREGLE.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück
+PMT = RMZ ## Gibt die periodische Zahlung für eine Annuität zurück
+PPMT = KAPZ ## Gibt die Kapitalrückzahlung einer Investition für eine angegebene Periode zurück
+PRICE = KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das periodisch Zinsen auszahlt
+PRICEDISC = KURSDISAGIO ## Gibt den Kurs pro 100 € Nennwert eines unverzinslichen Wertpapiers zurück
+PRICEMAT = KURSFÄLLIG ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt
+PV = BW ## Gibt den Barwert einer Investition zurück
+RATE = ZINS ## Gibt den Zinssatz pro Zeitraum einer Annuität zurück
+RECEIVED = AUSZAHLUNG ## Gibt den Auszahlungsbetrag eines voll investierten Wertpapiers am Fälligkeitstermin zurück
+SLN = LIA ## Gibt die lineare Abschreibung eines Wirtschaftsguts pro Periode zurück
+SYD = DIA ## Gibt die arithmetisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück
+TBILLEQ = TBILLÄQUIV ## Gibt die Rendite für ein Wertpapier zurück
+TBILLPRICE = TBILLKURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück
+TBILLYIELD = TBILLRENDITE ## Gibt die Rendite für ein Wertpapier zurück
+VDB = VDB ## Gibt die degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode oder Teilperiode zurück
+XIRR = XINTZINSFUSS ## Gibt den internen Zinsfuß einer Reihe nicht periodisch anfallender Zahlungen zurück
+XNPV = XKAPITALWERT ## Gibt den Nettobarwert (Kapitalwert) einer Reihe nicht periodisch anfallender Zahlungen zurück
+YIELD = RENDITE ## Gibt die Rendite eines Wertpapiers zurück, das periodisch Zinsen auszahlt
+YIELDDISC = RENDITEDIS ## Gibt die jährliche Rendite eines unverzinslichen Wertpapiers zurück
+YIELDMAT = RENDITEFÄLL ## Gibt die jährliche Rendite eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt
+
+
+##
+## Information functions Informationsfunktionen
+##
+CELL = ZELLE ## Gibt Informationen zu Formatierung, Position oder Inhalt einer Zelle zurück
+ERROR.TYPE = FEHLER.TYP ## Gibt eine Zahl zurück, die einem Fehlertyp entspricht
+INFO = INFO ## Gibt Informationen zur aktuellen Betriebssystemumgebung zurück
+ISBLANK = ISTLEER ## Gibt WAHR zurück, wenn der Wert leer ist
+ISERR = ISTFEHL ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert außer #N/V ist
+ISERROR = ISTFEHLER ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert ist
+ISEVEN = ISTGERADE ## Gibt WAHR zurück, wenn es sich um eine gerade Zahl handelt
+ISLOGICAL = ISTLOG ## Gibt WAHR zurück, wenn der Wert ein Wahrheitswert ist
+ISNA = ISTNV ## Gibt WAHR zurück, wenn der Wert der Fehlerwert #N/V ist
+ISNONTEXT = ISTKTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das keinen Text enthält
+ISNUMBER = ISTZAHL ## Gibt WAHR zurück, wenn der Wert eine Zahl ist
+ISODD = ISTUNGERADE ## Gibt WAHR zurück, wenn es sich um eine ungerade Zahl handelt
+ISREF = ISTBEZUG ## Gibt WAHR zurück, wenn der Wert ein Bezug ist
+ISTEXT = ISTTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das Text enthält
+N = N ## Gibt den in eine Zahl umgewandelten Wert zurück
+NA = NV ## Gibt den Fehlerwert #NV zurück
+TYPE = TYP ## Gibt eine Zahl zurück, die den Datentyp des angegebenen Werts anzeigt
+
+
+##
+## Logical functions Logische Funktionen
+##
+AND = UND ## Gibt WAHR zurück, wenn alle zugehörigen Argumente WAHR sind
+FALSE = FALSCH ## Gibt den Wahrheitswert FALSCH zurück
+IF = WENN ## Gibt einen logischen Test zum Ausführen an
+IFERROR = WENNFEHLER ## Gibt einen von Ihnen festgelegten Wert zurück, wenn die Auswertung der Formel zu einem Fehler führt; andernfalls wird das Ergebnis der Formel zurückgegeben
+NOT = NICHT ## Kehrt den Wahrheitswert der zugehörigen Argumente um
+OR = ODER ## Gibt WAHR zurück, wenn ein Argument WAHR ist
+TRUE = WAHR ## Gibt den Wahrheitswert WAHR zurück
+
+
+##
+## Lookup and reference functions Nachschlage- und Verweisfunktionen
+##
+ADDRESS = ADRESSE ## Gibt einen Bezug auf eine einzelne Zelle in einem Tabellenblatt als Text zurück
+AREAS = BEREICHE ## Gibt die Anzahl der innerhalb eines Bezugs aufgeführten Bereiche zurück
+CHOOSE = WAHL ## Wählt einen Wert aus eine Liste mit Werten aus
+COLUMN = SPALTE ## Gibt die Spaltennummer eines Bezugs zurück
+COLUMNS = SPALTEN ## Gibt die Anzahl der Spalten in einem Bezug zurück
+HLOOKUP = HVERWEIS ## Sucht in der obersten Zeile einer Matrix und gibt den Wert der angegebenen Zelle zurück
+HYPERLINK = HYPERLINK ## Erstellt eine Verknüpfung, über die ein auf einem Netzwerkserver, in einem Intranet oder im Internet gespeichertes Dokument geöffnet wird
+INDEX = INDEX ## Verwendet einen Index, um einen Wert aus einem Bezug oder einer Matrix auszuwählen
+INDIRECT = INDIREKT ## Gibt einen Bezug zurück, der von einem Textwert angegeben wird
+LOOKUP = LOOKUP ## Sucht Werte in einem Vektor oder einer Matrix
+MATCH = VERGLEICH ## Sucht Werte in einem Bezug oder einer Matrix
+OFFSET = BEREICH.VERSCHIEBEN ## Gibt einen Bezugoffset aus einem gegebenen Bezug zurück
+ROW = ZEILE ## Gibt die Zeilennummer eines Bezugs zurück
+ROWS = ZEILEN ## Gibt die Anzahl der Zeilen in einem Bezug zurück
+RTD = RTD ## Ruft Echtzeitdaten von einem Programm ab, das die COM-Automatisierung (Automatisierung: Ein Verfahren, bei dem aus einer Anwendung oder einem Entwicklungstool heraus mit den Objekten einer anderen Anwendung gearbeitet wird. Die früher als OLE-Automatisierung bezeichnete Automatisierung ist ein Industriestandard und eine Funktion von COM (Component Object Model).) unterstützt
+TRANSPOSE = MTRANS ## Gibt die transponierte Matrix einer Matrix zurück
+VLOOKUP = SVERWEIS ## Sucht in der ersten Spalte einer Matrix und arbeitet sich durch die Zeile, um den Wert einer Zelle zurückzugeben
+
+
+##
+## Math and trigonometry functions Mathematische und trigonometrische Funktionen
+##
+ABS = ABS ## Gibt den Absolutwert einer Zahl zurück
+ACOS = ARCCOS ## Gibt den Arkuskosinus einer Zahl zurück
+ACOSH = ARCCOSHYP ## Gibt den umgekehrten hyperbolischen Kosinus einer Zahl zurück
+ASIN = ARCSIN ## Gibt den Arkussinus einer Zahl zurück
+ASINH = ARCSINHYP ## Gibt den umgekehrten hyperbolischen Sinus einer Zahl zurück
+ATAN = ARCTAN ## Gibt den Arkustangens einer Zahl zurück
+ATAN2 = ARCTAN2 ## Gibt den Arkustangens einer x- und einer y-Koordinate zurück
+ATANH = ARCTANHYP ## Gibt den umgekehrten hyperbolischen Tangens einer Zahl zurück
+CEILING = OBERGRENZE ## Rundet eine Zahl auf die nächste ganze Zahl oder das nächste Vielfache von Schritt
+COMBIN = KOMBINATIONEN ## Gibt die Anzahl der Kombinationen für eine bestimmte Anzahl von Objekten zurück
+COS = COS ## Gibt den Kosinus einer Zahl zurück
+COSH = COSHYP ## Gibt den hyperbolischen Kosinus einer Zahl zurück
+DEGREES = GRAD ## Wandelt Bogenmaß (Radiant) in Grad um
+EVEN = GERADE ## Rundet eine Zahl auf die nächste gerade ganze Zahl auf
+EXP = EXP ## Potenziert die Basis e mit der als Argument angegebenen Zahl
+FACT = FAKULTÄT ## Gibt die Fakultät einer Zahl zurück
+FACTDOUBLE = ZWEIFAKULTÄT ## Gibt die Fakultät zu Zahl mit Schrittlänge 2 zurück
+FLOOR = UNTERGRENZE ## Rundet die Zahl auf Anzahl_Stellen ab
+GCD = GGT ## Gibt den größten gemeinsamen Teiler zurück
+INT = GANZZAHL ## Rundet eine Zahl auf die nächstkleinere ganze Zahl ab
+LCM = KGV ## Gibt das kleinste gemeinsame Vielfache zurück
+LN = LN ## Gibt den natürlichen Logarithmus einer Zahl zurück
+LOG = LOG ## Gibt den Logarithmus einer Zahl zu der angegebenen Basis zurück
+LOG10 = LOG10 ## Gibt den Logarithmus einer Zahl zur Basis 10 zurück
+MDETERM = MDET ## Gibt die Determinante einer Matrix zurück
+MINVERSE = MINV ## Gibt die inverse Matrix einer Matrix zurück
+MMULT = MMULT ## Gibt das Produkt zweier Matrizen zurück
+MOD = REST ## Gibt den Rest einer Division zurück
+MROUND = VRUNDEN ## Gibt eine auf das gewünschte Vielfache gerundete Zahl zurück
+MULTINOMIAL = POLYNOMIAL ## Gibt den Polynomialkoeffizienten einer Gruppe von Zahlen zurück
+ODD = UNGERADE ## Rundet eine Zahl auf die nächste ungerade ganze Zahl auf
+PI = PI ## Gibt den Wert Pi zurück
+POWER = POTENZ ## Gibt als Ergebnis eine potenzierte Zahl zurück
+PRODUCT = PRODUKT ## Multipliziert die zugehörigen Argumente
+QUOTIENT = QUOTIENT ## Gibt den ganzzahligen Anteil einer Division zurück
+RADIANS = BOGENMASS ## Wandelt Grad in Bogenmaß (Radiant) um
+RAND = ZUFALLSZAHL ## Gibt eine Zufallszahl zwischen 0 und 1 zurück
+RANDBETWEEN = ZUFALLSBEREICH ## Gibt eine Zufallszahl aus dem festgelegten Bereich zurück
+ROMAN = RÖMISCH ## Wandelt eine arabische Zahl in eine römische Zahl als Text um
+ROUND = RUNDEN ## Rundet eine Zahl auf eine bestimmte Anzahl von Dezimalstellen
+ROUNDDOWN = ABRUNDEN ## Rundet die Zahl auf Anzahl_Stellen ab
+ROUNDUP = AUFRUNDEN ## Rundet die Zahl auf Anzahl_Stellen auf
+SERIESSUM = POTENZREIHE ## Gibt die Summe von Potenzen (zur Berechnung von Potenzreihen und dichotomen Wahrscheinlichkeiten) zurück
+SIGN = VORZEICHEN ## Gibt das Vorzeichen einer Zahl zurück
+SIN = SIN ## Gibt den Sinus einer Zahl zurück
+SINH = SINHYP ## Gibt den hyperbolischen Sinus einer Zahl zurück
+SQRT = WURZEL ## Gibt die Quadratwurzel einer Zahl zurück
+SQRTPI = WURZELPI ## Gibt die Wurzel aus der mit Pi (pi) multiplizierten Zahl zurück
+SUBTOTAL = TEILERGEBNIS ## Gibt ein Teilergebnis in einer Liste oder Datenbank zurück
+SUM = SUMME ## Addiert die zugehörigen Argumente
+SUMIF = SUMMEWENN ## Addiert Zahlen, die mit den Suchkriterien übereinstimmen
+SUMIFS = SUMMEWENNS ## Die Zellen, die mehrere Kriterien erfüllen, werden in einem Bereich hinzugefügt
+SUMPRODUCT = SUMMENPRODUKT ## Gibt die Summe der Produkte zusammengehöriger Matrixkomponenten zurück
+SUMSQ = QUADRATESUMME ## Gibt die Summe der quadrierten Argumente zurück
+SUMX2MY2 = SUMMEX2MY2 ## Gibt die Summe der Differenzen der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück
+SUMX2PY2 = SUMMEX2PY2 ## Gibt die Summe der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück
+SUMXMY2 = SUMMEXMY2 ## Gibt die Summe der quadrierten Differenzen für zusammengehörige Komponenten zweier Matrizen zurück
+TAN = TAN ## Gibt den Tangens einer Zahl zurück
+TANH = TANHYP ## Gibt den hyperbolischen Tangens einer Zahl zurück
+TRUNC = KÜRZEN ## Schneidet die Kommastellen einer Zahl ab und gibt als Ergebnis eine ganze Zahl zurück
+
+
+##
+## Statistical functions Statistische Funktionen
+##
+AVEDEV = MITTELABW ## Gibt die durchschnittliche absolute Abweichung einer Reihe von Merkmalsausprägungen und ihrem Mittelwert zurück
+AVERAGE = MITTELWERT ## Gibt den Mittelwert der zugehörigen Argumente zurück
+AVERAGEA = MITTELWERTA ## Gibt den Mittelwert der zugehörigen Argumente, die Zahlen, Text und Wahrheitswerte enthalten, zurück
+AVERAGEIF = MITTELWERTWENN ## Der Durchschnittswert (arithmetisches Mittel) für alle Zellen in einem Bereich, die einem angegebenen Kriterium entsprechen, wird zurückgegeben
+AVERAGEIFS = MITTELWERTWENNS ## Gibt den Durchschnittswert (arithmetisches Mittel) aller Zellen zurück, die mehreren Kriterien entsprechen
+BETADIST = BETAVERT ## Gibt die Werte der kumulierten Betaverteilungsfunktion zurück
+BETAINV = BETAINV ## Gibt das Quantil der angegebenen Betaverteilung zurück
+BINOMDIST = BINOMVERT ## Gibt Wahrscheinlichkeiten einer binomialverteilten Zufallsvariablen zurück
+CHIDIST = CHIVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer Chi-Quadrat-verteilten Zufallsgröße zurück
+CHIINV = CHIINV ## Gibt Quantile der Verteilungsfunktion (1-Alpha) der Chi-Quadrat-Verteilung zurück
+CHITEST = CHITEST ## Gibt die Teststatistik eines Unabhängigkeitstests zurück
+CONFIDENCE = KONFIDENZ ## Ermöglicht die Berechnung des 1-Alpha Konfidenzintervalls für den Erwartungswert einer Zufallsvariablen
+CORREL = KORREL ## Gibt den Korrelationskoeffizienten zweier Reihen von Merkmalsausprägungen zurück
+COUNT = ANZAHL ## Gibt die Anzahl der Zahlen in der Liste mit Argumenten an
+COUNTA = ANZAHL2 ## Gibt die Anzahl der Werte in der Liste mit Argumenten an
+COUNTBLANK = ANZAHLLEEREZELLEN ## Gibt die Anzahl der leeren Zellen in einem Bereich an
+COUNTIF = ZÄHLENWENN ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit den Suchkriterien übereinstimmen
+COUNTIFS = ZÄHLENWENNS ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit mehreren Suchkriterien übereinstimmen
+COVAR = KOVAR ## Gibt die Kovarianz zurück, den Mittelwert der für alle Datenpunktpaare gebildeten Produkte der Abweichungen
+CRITBINOM = KRITBINOM ## Gibt den kleinsten Wert zurück, für den die kumulierten Wahrscheinlichkeiten der Binomialverteilung kleiner oder gleich einer Grenzwahrscheinlichkeit sind
+DEVSQ = SUMQUADABW ## Gibt die Summe der quadrierten Abweichungen der Datenpunkte von ihrem Stichprobenmittelwert zurück
+EXPONDIST = EXPONVERT ## Gibt Wahrscheinlichkeiten einer exponential verteilten Zufallsvariablen zurück
+FDIST = FVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer F-verteilten Zufallsvariablen zurück
+FINV = FINV ## Gibt Quantile der F-Verteilung zurück
+FISHER = FISHER ## Gibt die Fisher-Transformation zurück
+FISHERINV = FISHERINV ## Gibt die Umkehrung der Fisher-Transformation zurück
+FORECAST = PROGNOSE ## Gibt einen Wert zurück, der sich aus einem linearen Trend ergibt
+FREQUENCY = HÄUFIGKEIT ## Gibt eine Häufigkeitsverteilung als vertikale Matrix zurück
+FTEST = FTEST ## Gibt die Teststatistik eines F-Tests zurück
+GAMMADIST = GAMMAVERT ## Gibt Wahrscheinlichkeiten einer gammaverteilten Zufallsvariablen zurück
+GAMMAINV = GAMMAINV ## Gibt Quantile der Gammaverteilung zurück
+GAMMALN = GAMMALN ## Gibt den natürlichen Logarithmus der Gammafunktion zurück, Γ(x)
+GEOMEAN = GEOMITTEL ## Gibt das geometrische Mittel zurück
+GROWTH = VARIATION ## Gibt Werte zurück, die sich aus einem exponentiellen Trend ergeben
+HARMEAN = HARMITTEL ## Gibt das harmonische Mittel zurück
+HYPGEOMDIST = HYPGEOMVERT ## Gibt Wahrscheinlichkeiten einer hypergeometrisch-verteilten Zufallsvariablen zurück
+INTERCEPT = ACHSENABSCHNITT ## Gibt den Schnittpunkt der Regressionsgeraden zurück
+KURT = KURT ## Gibt die Kurtosis (Exzess) einer Datengruppe zurück
+LARGE = KGRÖSSTE ## Gibt den k-größten Wert einer Datengruppe zurück
+LINEST = RGP ## Gibt die Parameter eines linearen Trends zurück
+LOGEST = RKP ## Gibt die Parameter eines exponentiellen Trends zurück
+LOGINV = LOGINV ## Gibt Quantile der Lognormalverteilung zurück
+LOGNORMDIST = LOGNORMVERT ## Gibt Werte der Verteilungsfunktion einer lognormalverteilten Zufallsvariablen zurück
+MAX = MAX ## Gibt den Maximalwert einer Liste mit Argumenten zurück
+MAXA = MAXA ## Gibt den Maximalwert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten
+MEDIAN = MEDIAN ## Gibt den Median der angegebenen Zahlen zurück
+MIN = MIN ## Gibt den Minimalwert einer Liste mit Argumenten zurück
+MINA = MINA ## Gibt den kleinsten Wert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten
+MODE = MODALWERT ## Gibt den am häufigsten vorkommenden Wert in einer Datengruppe zurück
+NEGBINOMDIST = NEGBINOMVERT ## Gibt Wahrscheinlichkeiten einer negativen, binominal verteilten Zufallsvariablen zurück
+NORMDIST = NORMVERT ## Gibt Wahrscheinlichkeiten einer normal verteilten Zufallsvariablen zurück
+NORMINV = NORMINV ## Gibt Quantile der Normalverteilung zurück
+NORMSDIST = STANDNORMVERT ## Gibt Werte der Verteilungsfunktion einer standardnormalverteilten Zufallsvariablen zurück
+NORMSINV = STANDNORMINV ## Gibt Quantile der Standardnormalverteilung zurück
+PEARSON = PEARSON ## Gibt den Pearsonschen Korrelationskoeffizienten zurück
+PERCENTILE = QUANTIL ## Gibt das Alpha-Quantil einer Gruppe von Daten zurück
+PERCENTRANK = QUANTILSRANG ## Gibt den prozentualen Rang (Alpha) eines Werts in einer Datengruppe zurück
+PERMUT = VARIATIONEN ## Gibt die Anzahl der Möglichkeiten zurück, um k Elemente aus einer Menge von n Elementen ohne Zurücklegen zu ziehen
+POISSON = POISSON ## Gibt Wahrscheinlichkeiten einer poissonverteilten Zufallsvariablen zurück
+PROB = WAHRSCHBEREICH ## Gibt die Wahrscheinlichkeit für ein von zwei Werten eingeschlossenes Intervall zurück
+QUARTILE = QUARTILE ## Gibt die Quartile der Datengruppe zurück
+RANK = RANG ## Gibt den Rang zurück, den eine Zahl innerhalb einer Liste von Zahlen einnimmt
+RSQ = BESTIMMTHEITSMASS ## Gibt das Quadrat des Pearsonschen Korrelationskoeffizienten zurück
+SKEW = SCHIEFE ## Gibt die Schiefe einer Verteilung zurück
+SLOPE = STEIGUNG ## Gibt die Steigung der Regressionsgeraden zurück
+SMALL = KKLEINSTE ## Gibt den k-kleinsten Wert einer Datengruppe zurück
+STANDARDIZE = STANDARDISIERUNG ## Gibt den standardisierten Wert zurück
+STDEV = STABW ## Schätzt die Standardabweichung ausgehend von einer Stichprobe
+STDEVA = STABWA ## Schätzt die Standardabweichung ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält
+STDEVP = STABWN ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit
+STDEVPA = STABWNA ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält
+STEYX = STFEHLERYX ## Gibt den Standardfehler der geschätzten y-Werte für alle x-Werte der Regression zurück
+TDIST = TVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer (Student) t-verteilten Zufallsvariablen zurück
+TINV = TINV ## Gibt Quantile der t-Verteilung zurück
+TREND = TREND ## Gibt Werte zurück, die sich aus einem linearen Trend ergeben
+TRIMMEAN = GESTUTZTMITTEL ## Gibt den Mittelwert einer Datengruppe zurück, ohne die Randwerte zu berücksichtigen
+TTEST = TTEST ## Gibt die Teststatistik eines Student'schen t-Tests zurück
+VAR = VARIANZ ## Schätzt die Varianz ausgehend von einer Stichprobe
+VARA = VARIANZA ## Schätzt die Varianz ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält
+VARP = VARIANZEN ## Berechnet die Varianz ausgehend von der Grundgesamtheit
+VARPA = VARIANZENA ## Berechnet die Varianz ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält
+WEIBULL = WEIBULL ## Gibt Wahrscheinlichkeiten einer weibullverteilten Zufallsvariablen zurück
+ZTEST = GTEST ## Gibt den einseitigen Wahrscheinlichkeitswert für einen Gausstest (Normalverteilung) zurück
+
+
+##
+## Text functions Textfunktionen
+##
+ASC = ASC ## Konvertiert DB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in SB-Text
+BAHTTEXT = BAHTTEXT ## Wandelt eine Zahl in Text im Währungsformat ß (Baht) um
+CHAR = ZEICHEN ## Gibt das der Codezahl entsprechende Zeichen zurück
+CLEAN = SÄUBERN ## Löscht alle nicht druckbaren Zeichen aus einem Text
+CODE = CODE ## Gibt die Codezahl des ersten Zeichens in einem Text zurück
+CONCATENATE = VERKETTEN ## Verknüpft mehrere Textelemente zu einem Textelement
+DOLLAR = DM ## Wandelt eine Zahl in Text im Währungsformat € (Euro) um
+EXACT = IDENTISCH ## Prüft, ob zwei Textwerte identisch sind
+FIND = FINDEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden)
+FINDB = FINDENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden)
+FIXED = FEST ## Formatiert eine Zahl als Text mit einer festen Anzahl von Dezimalstellen
+JIS = JIS ## Konvertiert SB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in DB-Text
+LEFT = LINKS ## Gibt die Zeichen ganz links in einem Textwert zurück
+LEFTB = LINKSB ## Gibt die Zeichen ganz links in einem Textwert zurück
+LEN = LÄNGE ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück
+LENB = LÄNGEB ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück
+LOWER = KLEIN ## Wandelt Text in Kleinbuchstaben um
+MID = TEIL ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück
+MIDB = TEILB ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück
+PHONETIC = PHONETIC ## Extrahiert die phonetischen (Furigana-)Zeichen aus einer Textzeichenfolge
+PROPER = GROSS2 ## Wandelt den ersten Buchstaben aller Wörter eines Textwerts in Großbuchstaben um
+REPLACE = ERSETZEN ## Ersetzt Zeichen in Text
+REPLACEB = ERSETZENB ## Ersetzt Zeichen in Text
+REPT = WIEDERHOLEN ## Wiederholt einen Text so oft wie angegeben
+RIGHT = RECHTS ## Gibt die Zeichen ganz rechts in einem Textwert zurück
+RIGHTB = RECHTSB ## Gibt die Zeichen ganz rechts in einem Textwert zurück
+SEARCH = SUCHEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden)
+SEARCHB = SUCHENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden)
+SUBSTITUTE = WECHSELN ## Ersetzt in einer Zeichenfolge neuen Text gegen alten
+T = T ## Wandelt die zugehörigen Argumente in Text um
+TEXT = TEXT ## Formatiert eine Zahl und wandelt sie in Text um
+TRIM = GLÄTTEN ## Entfernt Leerzeichen aus Text
+UPPER = GROSS ## Wandelt Text in Großbuchstaben um
+VALUE = WERT ## Wandelt ein Textargument in eine Zahl um
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config
new file mode 100644
index 0000000..dcb5436
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config
@@ -0,0 +1,8 @@
+##
+## PhpSpreadsheet
+##
+
+##
+## (For future use)
+##
+currencySymbol = £
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config
new file mode 100644
index 0000000..2569fac
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #¡NULO!
+DIV0 = #¡DIV/0!
+VALUE = #¡VALOR!
+REF = #¡REF!
+NAME = #¿NOMBRE?
+NUM = #¡NÚM!
+NA = #N/A
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions
new file mode 100644
index 0000000..597e336
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Funciones de complementos y automatización
+##
+GETPIVOTDATA = IMPORTARDATOSDINAMICOS ## Devuelve los datos almacenados en un informe de tabla dinámica.
+
+
+##
+## Cube functions Funciones de cubo
+##
+CUBEKPIMEMBER = MIEMBROKPICUBO ## Devuelve un nombre, propiedad y medida de indicador de rendimiento clave (KPI) y muestra el nombre y la propiedad en la celda. Un KPI es una medida cuantificable, como los beneficios brutos mensuales o la facturación trimestral por empleado, que se usa para supervisar el rendimiento de una organización.
+CUBEMEMBER = MIEMBROCUBO ## Devuelve un miembro o tupla en una jerarquía de cubo. Se usa para validar la existencia del miembro o la tupla en el cubo.
+CUBEMEMBERPROPERTY = PROPIEDADMIEMBROCUBO ## Devuelve el valor de una propiedad de miembro del cubo Se usa para validar la existencia de un nombre de miembro en el cubo y para devolver la propiedad especificada para este miembro.
+CUBERANKEDMEMBER = MIEMBRORANGOCUBO ## Devuelve el miembro n, o clasificado, de un conjunto. Se usa para devolver uno o más elementos de un conjunto, por ejemplo, el representante con mejores ventas o los diez mejores alumnos.
+CUBESET = CONJUNTOCUBO ## Define un conjunto calculado de miembros o tuplas mediante el envío de una expresión de conjunto al cubo en el servidor, lo que crea el conjunto y, después, devuelve dicho conjunto a Microsoft Office Excel.
+CUBESETCOUNT = RECUENTOCONJUNTOCUBO ## Devuelve el número de elementos de un conjunto.
+CUBEVALUE = VALORCUBO ## Devuelve un valor agregado de un cubo.
+
+
+##
+## Database functions Funciones de base de datos
+##
+DAVERAGE = BDPROMEDIO ## Devuelve el promedio de las entradas seleccionadas en la base de datos.
+DCOUNT = BDCONTAR ## Cuenta el número de celdas que contienen números en una base de datos.
+DCOUNTA = BDCONTARA ## Cuenta el número de celdas no vacías en una base de datos.
+DGET = BDEXTRAER ## Extrae de una base de datos un único registro que cumple los criterios especificados.
+DMAX = BDMAX ## Devuelve el valor máximo de las entradas seleccionadas de la base de datos.
+DMIN = BDMIN ## Devuelve el valor mínimo de las entradas seleccionadas de la base de datos.
+DPRODUCT = BDPRODUCTO ## Multiplica los valores de un campo concreto de registros de una base de datos que cumplen los criterios especificados.
+DSTDEV = BDDESVEST ## Calcula la desviación estándar a partir de una muestra de entradas seleccionadas en la base de datos.
+DSTDEVP = BDDESVESTP ## Calcula la desviación estándar en función de la población total de las entradas seleccionadas de la base de datos.
+DSUM = BDSUMA ## Suma los números de la columna de campo de los registros de la base de datos que cumplen los criterios.
+DVAR = BDVAR ## Calcula la varianza a partir de una muestra de entradas seleccionadas de la base de datos.
+DVARP = BDVARP ## Calcula la varianza a partir de la población total de entradas seleccionadas de la base de datos.
+
+
+##
+## Date and time functions Funciones de fecha y hora
+##
+DATE = FECHA ## Devuelve el número de serie correspondiente a una fecha determinada.
+DATEVALUE = FECHANUMERO ## Convierte una fecha con formato de texto en un valor de número de serie.
+DAY = DIA ## Convierte un número de serie en un valor de día del mes.
+DAYS360 = DIAS360 ## Calcula el número de días entre dos fechas a partir de un año de 360 días.
+EDATE = FECHA.MES ## Devuelve el número de serie de la fecha equivalente al número indicado de meses anteriores o posteriores a la fecha inicial.
+EOMONTH = FIN.MES ## Devuelve el número de serie correspondiente al último día del mes anterior o posterior a un número de meses especificado.
+HOUR = HORA ## Convierte un número de serie en un valor de hora.
+MINUTE = MINUTO ## Convierte un número de serie en un valor de minuto.
+MONTH = MES ## Convierte un número de serie en un valor de mes.
+NETWORKDAYS = DIAS.LAB ## Devuelve el número de todos los días laborables existentes entre dos fechas.
+NOW = AHORA ## Devuelve el número de serie correspondiente a la fecha y hora actuales.
+SECOND = SEGUNDO ## Convierte un número de serie en un valor de segundo.
+TIME = HORA ## Devuelve el número de serie correspondiente a una hora determinada.
+TIMEVALUE = HORANUMERO ## Convierte una hora con formato de texto en un valor de número de serie.
+TODAY = HOY ## Devuelve el número de serie correspondiente al día actual.
+WEEKDAY = DIASEM ## Convierte un número de serie en un valor de día de la semana.
+WEEKNUM = NUM.DE.SEMANA ## Convierte un número de serie en un número que representa el lugar numérico correspondiente a una semana de un año.
+WORKDAY = DIA.LAB ## Devuelve el número de serie de la fecha que tiene lugar antes o después de un número determinado de días laborables.
+YEAR = AÑO ## Convierte un número de serie en un valor de año.
+YEARFRAC = FRAC.AÑO ## Devuelve la fracción de año que representa el número total de días existentes entre el valor de fecha_inicial y el de fecha_final.
+
+
+##
+## Engineering functions Funciones de ingeniería
+##
+BESSELI = BESSELI ## Devuelve la función Bessel In(x) modificada.
+BESSELJ = BESSELJ ## Devuelve la función Bessel Jn(x).
+BESSELK = BESSELK ## Devuelve la función Bessel Kn(x) modificada.
+BESSELY = BESSELY ## Devuelve la función Bessel Yn(x).
+BIN2DEC = BIN.A.DEC ## Convierte un número binario en decimal.
+BIN2HEX = BIN.A.HEX ## Convierte un número binario en hexadecimal.
+BIN2OCT = BIN.A.OCT ## Convierte un número binario en octal.
+COMPLEX = COMPLEJO ## Convierte coeficientes reales e imaginarios en un número complejo.
+CONVERT = CONVERTIR ## Convierte un número de un sistema de medida a otro.
+DEC2BIN = DEC.A.BIN ## Convierte un número decimal en binario.
+DEC2HEX = DEC.A.HEX ## Convierte un número decimal en hexadecimal.
+DEC2OCT = DEC.A.OCT ## Convierte un número decimal en octal.
+DELTA = DELTA ## Comprueba si dos valores son iguales.
+ERF = FUN.ERROR ## Devuelve la función de error.
+ERFC = FUN.ERROR.COMPL ## Devuelve la función de error complementario.
+GESTEP = MAYOR.O.IGUAL ## Comprueba si un número es mayor que un valor de umbral.
+HEX2BIN = HEX.A.BIN ## Convierte un número hexadecimal en binario.
+HEX2DEC = HEX.A.DEC ## Convierte un número hexadecimal en decimal.
+HEX2OCT = HEX.A.OCT ## Convierte un número hexadecimal en octal.
+IMABS = IM.ABS ## Devuelve el valor absoluto (módulo) de un número complejo.
+IMAGINARY = IMAGINARIO ## Devuelve el coeficiente imaginario de un número complejo.
+IMARGUMENT = IM.ANGULO ## Devuelve el argumento theta, un ángulo expresado en radianes.
+IMCONJUGATE = IM.CONJUGADA ## Devuelve la conjugada compleja de un número complejo.
+IMCOS = IM.COS ## Devuelve el coseno de un número complejo.
+IMDIV = IM.DIV ## Devuelve el cociente de dos números complejos.
+IMEXP = IM.EXP ## Devuelve el valor exponencial de un número complejo.
+IMLN = IM.LN ## Devuelve el logaritmo natural (neperiano) de un número complejo.
+IMLOG10 = IM.LOG10 ## Devuelve el logaritmo en base 10 de un número complejo.
+IMLOG2 = IM.LOG2 ## Devuelve el logaritmo en base 2 de un número complejo.
+IMPOWER = IM.POT ## Devuelve un número complejo elevado a una potencia entera.
+IMPRODUCT = IM.PRODUCT ## Devuelve el producto de números complejos.
+IMREAL = IM.REAL ## Devuelve el coeficiente real de un número complejo.
+IMSIN = IM.SENO ## Devuelve el seno de un número complejo.
+IMSQRT = IM.RAIZ2 ## Devuelve la raíz cuadrada de un número complejo.
+IMSUB = IM.SUSTR ## Devuelve la diferencia entre dos números complejos.
+IMSUM = IM.SUM ## Devuelve la suma de números complejos.
+OCT2BIN = OCT.A.BIN ## Convierte un número octal en binario.
+OCT2DEC = OCT.A.DEC ## Convierte un número octal en decimal.
+OCT2HEX = OCT.A.HEX ## Convierte un número octal en hexadecimal.
+
+
+##
+## Financial functions Funciones financieras
+##
+ACCRINT = INT.ACUM ## Devuelve el interés acumulado de un valor bursátil con pagos de interés periódicos.
+ACCRINTM = INT.ACUM.V ## Devuelve el interés acumulado de un valor bursátil con pagos de interés al vencimiento.
+AMORDEGRC = AMORTIZ.PROGRE ## Devuelve la amortización de cada período contable mediante el uso de un coeficiente de amortización.
+AMORLINC = AMORTIZ.LIN ## Devuelve la amortización de cada uno de los períodos contables.
+COUPDAYBS = CUPON.DIAS.L1 ## Devuelve el número de días desde el principio del período de un cupón hasta la fecha de liquidación.
+COUPDAYS = CUPON.DIAS ## Devuelve el número de días del período (entre dos cupones) donde se encuentra la fecha de liquidación.
+COUPDAYSNC = CUPON.DIAS.L2 ## Devuelve el número de días desde la fecha de liquidación hasta la fecha del próximo cupón.
+COUPNCD = CUPON.FECHA.L2 ## Devuelve la fecha del próximo cupón después de la fecha de liquidación.
+COUPNUM = CUPON.NUM ## Devuelve el número de pagos de cupón entre la fecha de liquidación y la fecha de vencimiento.
+COUPPCD = CUPON.FECHA.L1 ## Devuelve la fecha de cupón anterior a la fecha de liquidación.
+CUMIPMT = PAGO.INT.ENTRE ## Devuelve el interés acumulado pagado entre dos períodos.
+CUMPRINC = PAGO.PRINC.ENTRE ## Devuelve el capital acumulado pagado de un préstamo entre dos períodos.
+DB = DB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización de saldo fijo.
+DDB = DDB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización por doble disminución de saldo u otro método que se especifique.
+DISC = TASA.DESC ## Devuelve la tasa de descuento de un valor bursátil.
+DOLLARDE = MONEDA.DEC ## Convierte una cotización de un valor bursátil expresada en forma fraccionaria en una cotización de un valor bursátil expresada en forma decimal.
+DOLLARFR = MONEDA.FRAC ## Convierte una cotización de un valor bursátil expresada en forma decimal en una cotización de un valor bursátil expresada en forma fraccionaria.
+DURATION = DURACION ## Devuelve la duración anual de un valor bursátil con pagos de interés periódico.
+EFFECT = INT.EFECTIVO ## Devuelve la tasa de interés anual efectiva.
+FV = VF ## Devuelve el valor futuro de una inversión.
+FVSCHEDULE = VF.PLAN ## Devuelve el valor futuro de un capital inicial después de aplicar una serie de tasas de interés compuesto.
+INTRATE = TASA.INT ## Devuelve la tasa de interés para la inversión total de un valor bursátil.
+IPMT = PAGOINT ## Devuelve el pago de intereses de una inversión durante un período determinado.
+IRR = TIR ## Devuelve la tasa interna de retorno para una serie de flujos de efectivo periódicos.
+ISPMT = INT.PAGO.DIR ## Calcula el interés pagado durante un período específico de una inversión.
+MDURATION = DURACION.MODIF ## Devuelve la duración de Macauley modificada de un valor bursátil con un valor nominal supuesto de 100 $.
+MIRR = TIRM ## Devuelve la tasa interna de retorno donde se financian flujos de efectivo positivos y negativos a tasas diferentes.
+NOMINAL = TASA.NOMINAL ## Devuelve la tasa nominal de interés anual.
+NPER = NPER ## Devuelve el número de períodos de una inversión.
+NPV = VNA ## Devuelve el valor neto actual de una inversión en función de una serie de flujos periódicos de efectivo y una tasa de descuento.
+ODDFPRICE = PRECIO.PER.IRREGULAR.1 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un primer período impar.
+ODDFYIELD = RENDTO.PER.IRREGULAR.1 ## Devuelve el rendimiento de un valor bursátil con un primer período impar.
+ODDLPRICE = PRECIO.PER.IRREGULAR.2 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un último período impar.
+ODDLYIELD = RENDTO.PER.IRREGULAR.2 ## Devuelve el rendimiento de un valor bursátil con un último período impar.
+PMT = PAGO ## Devuelve el pago periódico de una anualidad.
+PPMT = PAGOPRIN ## Devuelve el pago de capital de una inversión durante un período determinado.
+PRICE = PRECIO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga una tasa de interés periódico.
+PRICEDISC = PRECIO.DESCUENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con descuento.
+PRICEMAT = PRECIO.VENCIMIENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga interés a su vencimiento.
+PV = VALACT ## Devuelve el valor actual de una inversión.
+RATE = TASA ## Devuelve la tasa de interés por período de una anualidad.
+RECEIVED = CANTIDAD.RECIBIDA ## Devuelve la cantidad recibida al vencimiento de un valor bursátil completamente invertido.
+SLN = SLN ## Devuelve la amortización por método directo de un bien en un período dado.
+SYD = SYD ## Devuelve la amortización por suma de dígitos de los años de un bien durante un período especificado.
+TBILLEQ = LETRA.DE.TES.EQV.A.BONO ## Devuelve el rendimiento de un bono equivalente a una letra del Tesoro (de EE.UU.)
+TBILLPRICE = LETRA.DE.TES.PRECIO ## Devuelve el precio por un valor nominal de 100 $ de una letra del Tesoro (de EE.UU.)
+TBILLYIELD = LETRA.DE.TES.RENDTO ## Devuelve el rendimiento de una letra del Tesoro (de EE.UU.)
+VDB = DVS ## Devuelve la amortización de un bien durante un período específico o parcial a través del método de cálculo del saldo en disminución.
+XIRR = TIR.NO.PER ## Devuelve la tasa interna de retorno para un flujo de efectivo que no es necesariamente periódico.
+XNPV = VNA.NO.PER ## Devuelve el valor neto actual para un flujo de efectivo que no es necesariamente periódico.
+YIELD = RENDTO ## Devuelve el rendimiento de un valor bursátil que paga intereses periódicos.
+YIELDDISC = RENDTO.DESC ## Devuelve el rendimiento anual de un valor bursátil con descuento; por ejemplo, una letra del Tesoro (de EE.UU.)
+YIELDMAT = RENDTO.VENCTO ## Devuelve el rendimiento anual de un valor bursátil que paga intereses al vencimiento.
+
+
+##
+## Information functions Funciones de información
+##
+CELL = CELDA ## Devuelve información acerca del formato, la ubicación o el contenido de una celda.
+ERROR.TYPE = TIPO.DE.ERROR ## Devuelve un número que corresponde a un tipo de error.
+INFO = INFO ## Devuelve información acerca del entorno operativo en uso.
+ISBLANK = ESBLANCO ## Devuelve VERDADERO si el valor está en blanco.
+ISERR = ESERR ## Devuelve VERDADERO si el valor es cualquier valor de error excepto #N/A.
+ISERROR = ESERROR ## Devuelve VERDADERO si el valor es cualquier valor de error.
+ISEVEN = ES.PAR ## Devuelve VERDADERO si el número es par.
+ISLOGICAL = ESLOGICO ## Devuelve VERDADERO si el valor es un valor lógico.
+ISNA = ESNOD ## Devuelve VERDADERO si el valor es el valor de error #N/A.
+ISNONTEXT = ESNOTEXTO ## Devuelve VERDADERO si el valor no es texto.
+ISNUMBER = ESNUMERO ## Devuelve VERDADERO si el valor es un número.
+ISODD = ES.IMPAR ## Devuelve VERDADERO si el número es impar.
+ISREF = ESREF ## Devuelve VERDADERO si el valor es una referencia.
+ISTEXT = ESTEXTO ## Devuelve VERDADERO si el valor es texto.
+N = N ## Devuelve un valor convertido en un número.
+NA = ND ## Devuelve el valor de error #N/A.
+TYPE = TIPO ## Devuelve un número que indica el tipo de datos de un valor.
+
+
+##
+## Logical functions Funciones lógicas
+##
+AND = Y ## Devuelve VERDADERO si todos sus argumentos son VERDADERO.
+FALSE = FALSO ## Devuelve el valor lógico FALSO.
+IF = SI ## Especifica una prueba lógica que realizar.
+IFERROR = SI.ERROR ## Devuelve un valor que se especifica si una fórmula lo evalúa como un error; de lo contrario, devuelve el resultado de la fórmula.
+NOT = NO ## Invierte el valor lógico del argumento.
+OR = O ## Devuelve VERDADERO si cualquier argumento es VERDADERO.
+TRUE = VERDADERO ## Devuelve el valor lógico VERDADERO.
+
+
+##
+## Lookup and reference functions Funciones de búsqueda y referencia
+##
+ADDRESS = DIRECCION ## Devuelve una referencia como texto a una sola celda de una hoja de cálculo.
+AREAS = AREAS ## Devuelve el número de áreas de una referencia.
+CHOOSE = ELEGIR ## Elige un valor de una lista de valores.
+COLUMN = COLUMNA ## Devuelve el número de columna de una referencia.
+COLUMNS = COLUMNAS ## Devuelve el número de columnas de una referencia.
+HLOOKUP = BUSCARH ## Busca en la fila superior de una matriz y devuelve el valor de la celda indicada.
+HYPERLINK = HIPERVINCULO ## Crea un acceso directo o un salto que abre un documento almacenado en un servidor de red, en una intranet o en Internet.
+INDEX = INDICE ## Usa un índice para elegir un valor de una referencia o matriz.
+INDIRECT = INDIRECTO ## Devuelve una referencia indicada por un valor de texto.
+LOOKUP = BUSCAR ## Busca valores de un vector o una matriz.
+MATCH = COINCIDIR ## Busca valores de una referencia o matriz.
+OFFSET = DESREF ## Devuelve un desplazamiento de referencia respecto a una referencia dada.
+ROW = FILA ## Devuelve el número de fila de una referencia.
+ROWS = FILAS ## Devuelve el número de filas de una referencia.
+RTD = RDTR ## Recupera datos en tiempo real desde un programa compatible con la automatización COM (automatización: modo de trabajar con los objetos de una aplicación desde otra aplicación o herramienta de entorno. La automatización, antes denominada automatización OLE, es un estándar de la industria y una función del Modelo de objetos componentes (COM).).
+TRANSPOSE = TRANSPONER ## Devuelve la transposición de una matriz.
+VLOOKUP = BUSCARV ## Busca en la primera columna de una matriz y se mueve en horizontal por la fila para devolver el valor de una celda.
+
+
+##
+## Math and trigonometry functions Funciones matemáticas y trigonométricas
+##
+ABS = ABS ## Devuelve el valor absoluto de un número.
+ACOS = ACOS ## Devuelve el arcocoseno de un número.
+ACOSH = ACOSH ## Devuelve el coseno hiperbólico inverso de un número.
+ASIN = ASENO ## Devuelve el arcoseno de un número.
+ASINH = ASENOH ## Devuelve el seno hiperbólico inverso de un número.
+ATAN = ATAN ## Devuelve la arcotangente de un número.
+ATAN2 = ATAN2 ## Devuelve la arcotangente de las coordenadas "x" e "y".
+ATANH = ATANH ## Devuelve la tangente hiperbólica inversa de un número.
+CEILING = MULTIPLO.SUPERIOR ## Redondea un número al entero más próximo o al múltiplo significativo más cercano.
+COMBIN = COMBINAT ## Devuelve el número de combinaciones para un número determinado de objetos.
+COS = COS ## Devuelve el coseno de un número.
+COSH = COSH ## Devuelve el coseno hiperbólico de un número.
+DEGREES = GRADOS ## Convierte radianes en grados.
+EVEN = REDONDEA.PAR ## Redondea un número hasta el entero par más próximo.
+EXP = EXP ## Devuelve e elevado a la potencia de un número dado.
+FACT = FACT ## Devuelve el factorial de un número.
+FACTDOUBLE = FACT.DOBLE ## Devuelve el factorial doble de un número.
+FLOOR = MULTIPLO.INFERIOR ## Redondea un número hacia abajo, en dirección hacia cero.
+GCD = M.C.D ## Devuelve el máximo común divisor.
+INT = ENTERO ## Redondea un número hacia abajo hasta el entero más próximo.
+LCM = M.C.M ## Devuelve el mínimo común múltiplo.
+LN = LN ## Devuelve el logaritmo natural (neperiano) de un número.
+LOG = LOG ## Devuelve el logaritmo de un número en una base especificada.
+LOG10 = LOG10 ## Devuelve el logaritmo en base 10 de un número.
+MDETERM = MDETERM ## Devuelve la determinante matricial de una matriz.
+MINVERSE = MINVERSA ## Devuelve la matriz inversa de una matriz.
+MMULT = MMULT ## Devuelve el producto de matriz de dos matrices.
+MOD = RESIDUO ## Devuelve el resto de la división.
+MROUND = REDOND.MULT ## Devuelve un número redondeado al múltiplo deseado.
+MULTINOMIAL = MULTINOMIAL ## Devuelve el polinomio de un conjunto de números.
+ODD = REDONDEA.IMPAR ## Redondea un número hacia arriba hasta el entero impar más próximo.
+PI = PI ## Devuelve el valor de pi.
+POWER = POTENCIA ## Devuelve el resultado de elevar un número a una potencia.
+PRODUCT = PRODUCTO ## Multiplica sus argumentos.
+QUOTIENT = COCIENTE ## Devuelve la parte entera de una división.
+RADIANS = RADIANES ## Convierte grados en radianes.
+RAND = ALEATORIO ## Devuelve un número aleatorio entre 0 y 1.
+RANDBETWEEN = ALEATORIO.ENTRE ## Devuelve un número aleatorio entre los números que especifique.
+ROMAN = NUMERO.ROMANO ## Convierte un número arábigo en número romano, con formato de texto.
+ROUND = REDONDEAR ## Redondea un número al número de decimales especificado.
+ROUNDDOWN = REDONDEAR.MENOS ## Redondea un número hacia abajo, en dirección hacia cero.
+ROUNDUP = REDONDEAR.MAS ## Redondea un número hacia arriba, en dirección contraria a cero.
+SERIESSUM = SUMA.SERIES ## Devuelve la suma de una serie de potencias en función de la fórmula.
+SIGN = SIGNO ## Devuelve el signo de un número.
+SIN = SENO ## Devuelve el seno de un ángulo determinado.
+SINH = SENOH ## Devuelve el seno hiperbólico de un número.
+SQRT = RAIZ ## Devuelve la raíz cuadrada positiva de un número.
+SQRTPI = RAIZ2PI ## Devuelve la raíz cuadrada de un número multiplicado por PI (número * pi).
+SUBTOTAL = SUBTOTALES ## Devuelve un subtotal en una lista o base de datos.
+SUM = SUMA ## Suma sus argumentos.
+SUMIF = SUMAR.SI ## Suma las celdas especificadas que cumplen unos criterios determinados.
+SUMIFS = SUMAR.SI.CONJUNTO ## Suma las celdas de un rango que cumplen varios criterios.
+SUMPRODUCT = SUMAPRODUCTO ## Devuelve la suma de los productos de los correspondientes componentes de matriz.
+SUMSQ = SUMA.CUADRADOS ## Devuelve la suma de los cuadrados de los argumentos.
+SUMX2MY2 = SUMAX2MENOSY2 ## Devuelve la suma de la diferencia de los cuadrados de los valores correspondientes de dos matrices.
+SUMX2PY2 = SUMAX2MASY2 ## Devuelve la suma de la suma de los cuadrados de los valores correspondientes de dos matrices.
+SUMXMY2 = SUMAXMENOSY2 ## Devuelve la suma de los cuadrados de las diferencias de los valores correspondientes de dos matrices.
+TAN = TAN ## Devuelve la tangente de un número.
+TANH = TANH ## Devuelve la tangente hiperbólica de un número.
+TRUNC = TRUNCAR ## Trunca un número a un entero.
+
+
+##
+## Statistical functions Funciones estadísticas
+##
+AVEDEV = DESVPROM ## Devuelve el promedio de las desviaciones absolutas de la media de los puntos de datos.
+AVERAGE = PROMEDIO ## Devuelve el promedio de sus argumentos.
+AVERAGEA = PROMEDIOA ## Devuelve el promedio de sus argumentos, incluidos números, texto y valores lógicos.
+AVERAGEIF = PROMEDIO.SI ## Devuelve el promedio (media aritmética) de todas las celdas de un rango que cumplen unos criterios determinados.
+AVERAGEIFS = PROMEDIO.SI.CONJUNTO ## Devuelve el promedio (media aritmética) de todas las celdas que cumplen múltiples criterios.
+BETADIST = DISTR.BETA ## Devuelve la función de distribución beta acumulativa.
+BETAINV = DISTR.BETA.INV ## Devuelve la función inversa de la función de distribución acumulativa de una distribución beta especificada.
+BINOMDIST = DISTR.BINOM ## Devuelve la probabilidad de una variable aleatoria discreta siguiendo una distribución binomial.
+CHIDIST = DISTR.CHI ## Devuelve la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola.
+CHIINV = PRUEBA.CHI.INV ## Devuelve la función inversa de la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola.
+CHITEST = PRUEBA.CHI ## Devuelve la prueba de independencia.
+CONFIDENCE = INTERVALO.CONFIANZA ## Devuelve el intervalo de confianza de la media de una población.
+CORREL = COEF.DE.CORREL ## Devuelve el coeficiente de correlación entre dos conjuntos de datos.
+COUNT = CONTAR ## Cuenta cuántos números hay en la lista de argumentos.
+COUNTA = CONTARA ## Cuenta cuántos valores hay en la lista de argumentos.
+COUNTBLANK = CONTAR.BLANCO ## Cuenta el número de celdas en blanco de un rango.
+COUNTIF = CONTAR.SI ## Cuenta el número de celdas, dentro del rango, que cumplen el criterio especificado.
+COUNTIFS = CONTAR.SI.CONJUNTO ## Cuenta el número de celdas, dentro del rango, que cumplen varios criterios.
+COVAR = COVAR ## Devuelve la covarianza, que es el promedio de los productos de las desviaciones para cada pareja de puntos de datos.
+CRITBINOM = BINOM.CRIT ## Devuelve el menor valor cuya distribución binomial acumulativa es menor o igual a un valor de criterio.
+DEVSQ = DESVIA2 ## Devuelve la suma de los cuadrados de las desviaciones.
+EXPONDIST = DISTR.EXP ## Devuelve la distribución exponencial.
+FDIST = DISTR.F ## Devuelve la distribución de probabilidad F.
+FINV = DISTR.F.INV ## Devuelve la función inversa de la distribución de probabilidad F.
+FISHER = FISHER ## Devuelve la transformación Fisher.
+FISHERINV = PRUEBA.FISHER.INV ## Devuelve la función inversa de la transformación Fisher.
+FORECAST = PRONOSTICO ## Devuelve un valor en una tendencia lineal.
+FREQUENCY = FRECUENCIA ## Devuelve una distribución de frecuencia como una matriz vertical.
+FTEST = PRUEBA.F ## Devuelve el resultado de una prueba F.
+GAMMADIST = DISTR.GAMMA ## Devuelve la distribución gamma.
+GAMMAINV = DISTR.GAMMA.INV ## Devuelve la función inversa de la distribución gamma acumulativa.
+GAMMALN = GAMMA.LN ## Devuelve el logaritmo natural de la función gamma, G(x).
+GEOMEAN = MEDIA.GEOM ## Devuelve la media geométrica.
+GROWTH = CRECIMIENTO ## Devuelve valores en una tendencia exponencial.
+HARMEAN = MEDIA.ARMO ## Devuelve la media armónica.
+HYPGEOMDIST = DISTR.HIPERGEOM ## Devuelve la distribución hipergeométrica.
+INTERCEPT = INTERSECCION.EJE ## Devuelve la intersección de la línea de regresión lineal.
+KURT = CURTOSIS ## Devuelve la curtosis de un conjunto de datos.
+LARGE = K.ESIMO.MAYOR ## Devuelve el k-ésimo mayor valor de un conjunto de datos.
+LINEST = ESTIMACION.LINEAL ## Devuelve los parámetros de una tendencia lineal.
+LOGEST = ESTIMACION.LOGARITMICA ## Devuelve los parámetros de una tendencia exponencial.
+LOGINV = DISTR.LOG.INV ## Devuelve la función inversa de la distribución logarítmico-normal.
+LOGNORMDIST = DISTR.LOG.NORM ## Devuelve la distribución logarítmico-normal acumulativa.
+MAX = MAX ## Devuelve el valor máximo de una lista de argumentos.
+MAXA = MAXA ## Devuelve el valor máximo de una lista de argumentos, incluidos números, texto y valores lógicos.
+MEDIAN = MEDIANA ## Devuelve la mediana de los números dados.
+MIN = MIN ## Devuelve el valor mínimo de una lista de argumentos.
+MINA = MINA ## Devuelve el valor mínimo de una lista de argumentos, incluidos números, texto y valores lógicos.
+MODE = MODA ## Devuelve el valor más común de un conjunto de datos.
+NEGBINOMDIST = NEGBINOMDIST ## Devuelve la distribución binomial negativa.
+NORMDIST = DISTR.NORM ## Devuelve la distribución normal acumulativa.
+NORMINV = DISTR.NORM.INV ## Devuelve la función inversa de la distribución normal acumulativa.
+NORMSDIST = DISTR.NORM.ESTAND ## Devuelve la distribución normal estándar acumulativa.
+NORMSINV = DISTR.NORM.ESTAND.INV ## Devuelve la función inversa de la distribución normal estándar acumulativa.
+PEARSON = PEARSON ## Devuelve el coeficiente de momento de correlación de producto Pearson.
+PERCENTILE = PERCENTIL ## Devuelve el k-ésimo percentil de los valores de un rango.
+PERCENTRANK = RANGO.PERCENTIL ## Devuelve el rango porcentual de un valor de un conjunto de datos.
+PERMUT = PERMUTACIONES ## Devuelve el número de permutaciones de un número determinado de objetos.
+POISSON = POISSON ## Devuelve la distribución de Poisson.
+PROB = PROBABILIDAD ## Devuelve la probabilidad de que los valores de un rango se encuentren entre dos límites.
+QUARTILE = CUARTIL ## Devuelve el cuartil de un conjunto de datos.
+RANK = JERARQUIA ## Devuelve la jerarquía de un número en una lista de números.
+RSQ = COEFICIENTE.R2 ## Devuelve el cuadrado del coeficiente de momento de correlación de producto Pearson.
+SKEW = COEFICIENTE.ASIMETRIA ## Devuelve la asimetría de una distribución.
+SLOPE = PENDIENTE ## Devuelve la pendiente de la línea de regresión lineal.
+SMALL = K.ESIMO.MENOR ## Devuelve el k-ésimo menor valor de un conjunto de datos.
+STANDARDIZE = NORMALIZACION ## Devuelve un valor normalizado.
+STDEV = DESVEST ## Calcula la desviación estándar a partir de una muestra.
+STDEVA = DESVESTA ## Calcula la desviación estándar a partir de una muestra, incluidos números, texto y valores lógicos.
+STDEVP = DESVESTP ## Calcula la desviación estándar en función de toda la población.
+STDEVPA = DESVESTPA ## Calcula la desviación estándar en función de toda la población, incluidos números, texto y valores lógicos.
+STEYX = ERROR.TIPICO.XY ## Devuelve el error estándar del valor de "y" previsto para cada "x" de la regresión.
+TDIST = DISTR.T ## Devuelve la distribución de t de Student.
+TINV = DISTR.T.INV ## Devuelve la función inversa de la distribución de t de Student.
+TREND = TENDENCIA ## Devuelve valores en una tendencia lineal.
+TRIMMEAN = MEDIA.ACOTADA ## Devuelve la media del interior de un conjunto de datos.
+TTEST = PRUEBA.T ## Devuelve la probabilidad asociada a una prueba t de Student.
+VAR = VAR ## Calcula la varianza en función de una muestra.
+VARA = VARA ## Calcula la varianza en función de una muestra, incluidos números, texto y valores lógicos.
+VARP = VARP ## Calcula la varianza en función de toda la población.
+VARPA = VARPA ## Calcula la varianza en función de toda la población, incluidos números, texto y valores lógicos.
+WEIBULL = DIST.WEIBULL ## Devuelve la distribución de Weibull.
+ZTEST = PRUEBA.Z ## Devuelve el valor de una probabilidad de una cola de una prueba z.
+
+
+##
+## Text functions Funciones de texto
+##
+ASC = ASC ## Convierte las letras inglesas o katakana de ancho completo (de dos bytes) dentro de una cadena de caracteres en caracteres de ancho medio (de un byte).
+BAHTTEXT = TEXTOBAHT ## Convierte un número en texto, con el formato de moneda ß (Baht).
+CHAR = CARACTER ## Devuelve el carácter especificado por el número de código.
+CLEAN = LIMPIAR ## Quita del texto todos los caracteres no imprimibles.
+CODE = CODIGO ## Devuelve un código numérico del primer carácter de una cadena de texto.
+CONCATENATE = CONCATENAR ## Concatena varios elementos de texto en uno solo.
+DOLLAR = MONEDA ## Convierte un número en texto, con el formato de moneda $ (dólar).
+EXACT = IGUAL ## Comprueba si dos valores de texto son idénticos.
+FIND = ENCONTRAR ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas).
+FINDB = ENCONTRARB ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas).
+FIXED = DECIMAL ## Da formato a un número como texto con un número fijo de decimales.
+JIS = JIS ## Convierte las letras inglesas o katakana de ancho medio (de un byte) dentro de una cadena de caracteres en caracteres de ancho completo (de dos bytes).
+LEFT = IZQUIERDA ## Devuelve los caracteres del lado izquierdo de un valor de texto.
+LEFTB = IZQUIERDAB ## Devuelve los caracteres del lado izquierdo de un valor de texto.
+LEN = LARGO ## Devuelve el número de caracteres de una cadena de texto.
+LENB = LARGOB ## Devuelve el número de caracteres de una cadena de texto.
+LOWER = MINUSC ## Pone el texto en minúsculas.
+MID = EXTRAE ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique.
+MIDB = EXTRAEB ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique.
+PHONETIC = FONETICO ## Extrae los caracteres fonéticos (furigana) de una cadena de texto.
+PROPER = NOMPROPIO ## Pone en mayúscula la primera letra de cada palabra de un valor de texto.
+REPLACE = REEMPLAZAR ## Reemplaza caracteres de texto.
+REPLACEB = REEMPLAZARB ## Reemplaza caracteres de texto.
+REPT = REPETIR ## Repite el texto un número determinado de veces.
+RIGHT = DERECHA ## Devuelve los caracteres del lado derecho de un valor de texto.
+RIGHTB = DERECHAB ## Devuelve los caracteres del lado derecho de un valor de texto.
+SEARCH = HALLAR ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas).
+SEARCHB = HALLARB ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas).
+SUBSTITUTE = SUSTITUIR ## Sustituye texto nuevo por texto antiguo en una cadena de texto.
+T = T ## Convierte sus argumentos a texto.
+TEXT = TEXTO ## Da formato a un número y lo convierte en texto.
+TRIM = ESPACIOS ## Quita los espacios del texto.
+UPPER = MAYUSC ## Pone el texto en mayúsculas.
+VALUE = VALOR ## Convierte un argumento de texto en un número.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config
new file mode 100644
index 0000000..aa28fd1
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = $ # Symbol not known, should it be a € (Euro)?
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #TYHJÄ!
+DIV0 = #JAKO/0!
+VALUE = #ARVO!
+REF = #VIITTAUS!
+NAME = #NIMI?
+NUM = #LUKU!
+NA = #PUUTTUU
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions
new file mode 100644
index 0000000..9f6a9b5
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Apuohjelma- ja automaatiofunktiot
+##
+GETPIVOTDATA = NOUDA.PIVOT.TIEDOT ## Palauttaa pivot-taulukkoraporttiin tallennettuja tietoja.
+
+
+##
+## Cube functions Kuutiofunktiot
+##
+CUBEKPIMEMBER = KUUTIOKPIJÄSEN ## Palauttaa suorituskykyilmaisimen (KPI) nimen, ominaisuuden sekä mitan ja näyttää nimen sekä ominaisuuden solussa. KPI on mitattavissa oleva suure, kuten kuukauden bruttotuotto tai vuosineljänneksen työntekijäkohtainen liikevaihto, joiden avulla tarkkaillaan organisaation suorituskykyä.
+CUBEMEMBER = KUUTIONJÄSEN ## Palauttaa kuutiohierarkian jäsenen tai monikon. Tällä funktiolla voit tarkistaa, että jäsen tai monikko on olemassa kuutiossa.
+CUBEMEMBERPROPERTY = KUUTIONJÄSENENOMINAISUUS ## Palauttaa kuution jäsenominaisuuden arvon. Tällä funktiolla voit tarkistaa, että nimi on olemassa kuutiossa, ja palauttaa tämän jäsenen määritetyn ominaisuuden.
+CUBERANKEDMEMBER = KUUTIONLUOKITELTUJÄSEN ## Palauttaa joukon n:nnen jäsenen. Tällä funktiolla voit palauttaa joukosta elementtejä, kuten parhaan myyjän tai 10 parasta opiskelijaa.
+CUBESET = KUUTIOJOUKKO ## Määrittää lasketun jäsen- tai monikkojoukon lähettämällä joukon lausekkeita palvelimessa olevalle kuutiolle. Palvelin luo joukon ja palauttaa sen Microsoft Office Excelille.
+CUBESETCOUNT = KUUTIOJOUKKOJENMÄÄRÄ ## Palauttaa joukon kohteiden määrän.
+CUBEVALUE = KUUTIONARVO ## Palauttaa koostetun arvon kuutiosta.
+
+
+##
+## Database functions Tietokantafunktiot
+##
+DAVERAGE = TKESKIARVO ## Palauttaa valittujen tietokantamerkintöjen keskiarvon.
+DCOUNT = TLASKE ## Laskee tietokannan lukuja sisältävien solujen määrän.
+DCOUNTA = TLASKEA ## Laskee tietokannan tietoja sisältävien solujen määrän.
+DGET = TNOUDA ## Hakee määritettyjä ehtoja vastaavan tietueen tietokannasta.
+DMAX = TMAKS ## Palauttaa suurimman arvon tietokannasta valittujen arvojen joukosta.
+DMIN = TMIN ## Palauttaa pienimmän arvon tietokannasta valittujen arvojen joukosta.
+DPRODUCT = TTULO ## Kertoo määritetyn ehdon täyttävien tietokannan tietueiden tietyssä kentässä olevat arvot.
+DSTDEV = TKESKIHAJONTA ## Laskee keskihajonnan tietokannasta valituista arvoista muodostuvan otoksen perusteella.
+DSTDEVP = TKESKIHAJONTAP ## Laskee keskihajonnan tietokannasta valittujen arvojen koko populaation perusteella.
+DSUM = TSUMMA ## Lisää luvut määritetyn ehdon täyttävien tietokannan tietueiden kenttäsarakkeeseen.
+DVAR = TVARIANSSI ## Laskee varianssin tietokannasta valittujen arvojen otoksen perusteella.
+DVARP = TVARIANSSIP ## Laskee varianssin tietokannasta valittujen arvojen koko populaation perusteella.
+
+
+##
+## Date and time functions Päivämäärä- ja aikafunktiot
+##
+DATE = PÄIVÄYS ## Palauttaa annetun päivämäärän järjestysluvun.
+DATEVALUE = PÄIVÄYSARVO ## Muuntaa tekstimuodossa olevan päivämäärän järjestysluvuksi.
+DAY = PÄIVÄ ## Muuntaa järjestysluvun kuukauden päiväksi.
+DAYS360 = PÄIVÄT360 ## Laskee kahden päivämäärän välisten päivien määrän käyttäen perustana 360-päiväistä vuotta.
+EDATE = PÄIVÄ.KUUKAUSI ## Palauttaa järjestyslukuna päivämäärän, joka poikkeaa aloituspäivän päivämäärästä annetun kuukausimäärän verran joko eteen- tai taaksepäin.
+EOMONTH = KUUKAUSI.LOPPU ## Palauttaa järjestyslukuna sen kuukauden viimeisen päivämäärän, joka poikkeaa annetun kuukausimäärän verran eteen- tai taaksepäin.
+HOUR = TUNNIT ## Muuntaa järjestysluvun tunneiksi.
+MINUTE = MINUUTIT ## Muuntaa järjestysluvun minuuteiksi.
+MONTH = KUUKAUSI ## Muuntaa järjestysluvun kuukausiksi.
+NETWORKDAYS = TYÖPÄIVÄT ## Palauttaa kahden päivämäärän välissä olevien täysien työpäivien määrän.
+NOW = NYT ## Palauttaa kuluvan päivämäärän ja ajan järjestysnumeron.
+SECOND = SEKUNNIT ## Muuntaa järjestysluvun sekunneiksi.
+TIME = AIKA ## Palauttaa annetun kellonajan järjestysluvun.
+TIMEVALUE = AIKA_ARVO ## Muuntaa tekstimuodossa olevan kellonajan järjestysluvuksi.
+TODAY = TÄMÄ.PÄIVÄ ## Palauttaa kuluvan päivän päivämäärän järjestysluvun.
+WEEKDAY = VIIKONPÄIVÄ ## Muuntaa järjestysluvun viikonpäiväksi.
+WEEKNUM = VIIKKO.NRO ## Muuntaa järjestysluvun luvuksi, joka ilmaisee viikon järjestysluvun vuoden alusta laskettuna.
+WORKDAY = TYÖPÄIVÄ ## Palauttaa järjestysluvun päivämäärälle, joka sijaitsee annettujen työpäivien verran eteen tai taaksepäin.
+YEAR = VUOSI ## Muuntaa järjestysluvun vuosiksi.
+YEARFRAC = VUOSI.OSA ## Palauttaa määritettyjen päivämäärien (aloituspäivä ja lopetuspäivä) välisen osan vuodesta.
+
+
+##
+## Engineering functions Tekniset funktiot
+##
+BESSELI = BESSELI ## Palauttaa muunnetun Bessel-funktion In(x).
+BESSELJ = BESSELJ ## Palauttaa Bessel-funktion Jn(x).
+BESSELK = BESSELK ## Palauttaa muunnetun Bessel-funktion Kn(x).
+BESSELY = BESSELY ## Palauttaa Bessel-funktion Yn(x).
+BIN2DEC = BINDES ## Muuntaa binaariluvun desimaaliluvuksi.
+BIN2HEX = BINHEKSA ## Muuntaa binaariluvun heksadesimaaliluvuksi.
+BIN2OCT = BINOKT ## Muuntaa binaariluvun oktaaliluvuksi.
+COMPLEX = KOMPLEKSI ## Muuntaa reaali- ja imaginaariosien kertoimet kompleksiluvuksi.
+CONVERT = MUUNNA ## Muuntaa luvun toisen mittajärjestelmän mukaiseksi.
+DEC2BIN = DESBIN ## Muuntaa desimaaliluvun binaariluvuksi.
+DEC2HEX = DESHEKSA ## Muuntaa kymmenjärjestelmän luvun heksadesimaaliluvuksi.
+DEC2OCT = DESOKT ## Muuntaa kymmenjärjestelmän luvun oktaaliluvuksi.
+DELTA = SAMA.ARVO ## Tarkistaa, ovatko kaksi arvoa yhtä suuria.
+ERF = VIRHEFUNKTIO ## Palauttaa virhefunktion.
+ERFC = VIRHEFUNKTIO.KOMPLEMENTTI ## Palauttaa komplementtivirhefunktion.
+GESTEP = RAJA ## Testaa, onko luku suurempi kuin kynnysarvo.
+HEX2BIN = HEKSABIN ## Muuntaa heksadesimaaliluvun binaariluvuksi.
+HEX2DEC = HEKSADES ## Muuntaa heksadesimaaliluvun desimaaliluvuksi.
+HEX2OCT = HEKSAOKT ## Muuntaa heksadesimaaliluvun oktaaliluvuksi.
+IMABS = KOMPLEKSI.ITSEISARVO ## Palauttaa kompleksiluvun itseisarvon (moduluksen).
+IMAGINARY = KOMPLEKSI.IMAG ## Palauttaa kompleksiluvun imaginaariosan kertoimen.
+IMARGUMENT = KOMPLEKSI.ARG ## Palauttaa theeta-argumentin, joka on radiaaneina annettu kulma.
+IMCONJUGATE = KOMPLEKSI.KONJ ## Palauttaa kompleksiluvun konjugaattiluvun.
+IMCOS = KOMPLEKSI.COS ## Palauttaa kompleksiluvun kosinin.
+IMDIV = KOMPLEKSI.OSAM ## Palauttaa kahden kompleksiluvun osamäärän.
+IMEXP = KOMPLEKSI.EKSP ## Palauttaa kompleksiluvun eksponentin.
+IMLN = KOMPLEKSI.LN ## Palauttaa kompleksiluvun luonnollisen logaritmin.
+IMLOG10 = KOMPLEKSI.LOG10 ## Palauttaa kompleksiluvun kymmenkantaisen logaritmin.
+IMLOG2 = KOMPLEKSI.LOG2 ## Palauttaa kompleksiluvun kaksikantaisen logaritmin.
+IMPOWER = KOMPLEKSI.POT ## Palauttaa kokonaislukupotenssiin korotetun kompleksiluvun.
+IMPRODUCT = KOMPLEKSI.TULO ## Palauttaa kompleksilukujen tulon.
+IMREAL = KOMPLEKSI.REAALI ## Palauttaa kompleksiluvun reaaliosan kertoimen.
+IMSIN = KOMPLEKSI.SIN ## Palauttaa kompleksiluvun sinin.
+IMSQRT = KOMPLEKSI.NELIÖJ ## Palauttaa kompleksiluvun neliöjuuren.
+IMSUB = KOMPLEKSI.EROTUS ## Palauttaa kahden kompleksiluvun erotuksen.
+IMSUM = KOMPLEKSI.SUM ## Palauttaa kompleksilukujen summan.
+OCT2BIN = OKTBIN ## Muuntaa oktaaliluvun binaariluvuksi.
+OCT2DEC = OKTDES ## Muuntaa oktaaliluvun desimaaliluvuksi.
+OCT2HEX = OKTHEKSA ## Muuntaa oktaaliluvun heksadesimaaliluvuksi.
+
+
+##
+## Financial functions Rahoitusfunktiot
+##
+ACCRINT = KERTYNYT.KORKO ## Laskee arvopaperille kertyneen koron, kun korko kertyy säännöllisin väliajoin.
+ACCRINTM = KERTYNYT.KORKO.LOPUSSA ## Laskee arvopaperille kertyneen koron, kun korko maksetaan eräpäivänä.
+AMORDEGRC = AMORDEGRC ## Laskee kunkin laskentakauden poiston poistokerrointa käyttämällä.
+AMORLINC = AMORLINC ## Palauttaa kunkin laskentakauden poiston.
+COUPDAYBS = KORKOPÄIVÄT.ALUSTA ## Palauttaa koronmaksukauden aloituspäivän ja tilityspäivän välisen ajanjakson päivien määrän.
+COUPDAYS = KORKOPÄIVÄT ## Palauttaa päivien määrän koronmaksukaudelta, johon tilityspäivä kuuluu.
+COUPDAYSNC = KORKOPÄIVÄT.SEURAAVA ## Palauttaa tilityspäivän ja seuraavan koronmaksupäivän välisen ajanjakson päivien määrän.
+COUPNCD = KORKOMAKSU.SEURAAVA ## Palauttaa tilityspäivän jälkeisen seuraavan koronmaksupäivän.
+COUPNUM = KORKOPÄIVÄJAKSOT ## Palauttaa arvopaperin ostopäivän ja erääntymispäivän välisten koronmaksupäivien määrän.
+COUPPCD = KORKOPÄIVÄ.EDELLINEN ## Palauttaa tilityspäivää edeltävän koronmaksupäivän.
+CUMIPMT = MAKSETTU.KORKO ## Palauttaa kahden jakson välisenä aikana kertyneen koron.
+CUMPRINC = MAKSETTU.LYHENNYS ## Palauttaa lainalle kahden jakson välisenä aikana kertyneen lyhennyksen.
+DB = DB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan.
+DDB = DDB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DDB-menetelmän (Double-Declining Balance) tai jonkin muun määrittämäsi menetelmän mukaan.
+DISC = DISKONTTOKORKO ## Palauttaa arvopaperin diskonttokoron.
+DOLLARDE = VALUUTTA.DES ## Muuntaa murtolukuna ilmoitetun valuuttamäärän desimaaliluvuksi.
+DOLLARFR = VALUUTTA.MURTO ## Muuntaa desimaalilukuna ilmaistun valuuttamäärän murtoluvuksi.
+DURATION = KESTO ## Palauttaa keston arvopaperille, jonka koronmaksu tapahtuu säännöllisesti.
+EFFECT = KORKO.EFEKT ## Palauttaa todellisen vuosikoron.
+FV = TULEVA.ARVO ## Palauttaa sijoituksen tulevan arvon.
+FVSCHEDULE = TULEVA.ARVO.ERIKORKO ## Palauttaa pääoman tulevan arvon, kun pääomalle on kertynyt korkoa vaihtelevasti.
+INTRATE = KORKO.ARVOPAPERI ## Palauttaa arvopaperin korkokannan täysin sijoitetulle arvopaperille.
+IPMT = IPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona kertyvän koron.
+IRR = SISÄINEN.KORKO ## Laskee sisäisen korkokannan kassavirrasta muodostuvalle sarjalle.
+ISPMT = ONMAKSU ## Laskee sijoituksen maksetun koron tietyllä jaksolla.
+MDURATION = KESTO.MUUNN ## Palauttaa muunnetun Macauley-keston arvopaperille, jonka oletettu nimellisarvo on 100 euroa.
+MIRR = MSISÄINEN ## Palauttaa sisäisen korkokannan, kun positiivisten ja negatiivisten kassavirtojen rahoituskorko on erilainen.
+NOMINAL = KORKO.VUOSI ## Palauttaa vuosittaisen nimelliskoron.
+NPER = NJAKSO ## Palauttaa sijoituksen jaksojen määrän.
+NPV = NNA ## Palauttaa sijoituksen nykyarvon toistuvista kassavirroista muodostuvan sarjan ja diskonttokoron perusteella.
+ODDFPRICE = PARITON.ENS.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa ensimmäinen jakso on pariton.
+ODDFYIELD = PARITON.ENS.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa ensimmäinen jakso on pariton.
+ODDLPRICE = PARITON.VIIM.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa viimeinen jakso on pariton.
+ODDLYIELD = PARITON.VIIM.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa viimeinen jakso on pariton.
+PMT = MAKSU ## Palauttaa annuiteetin kausittaisen maksuerän.
+PPMT = PPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona maksettavan lyhennyksen.
+PRICE = HINTA ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan säännöllisin väliajoin.
+PRICEDISC = HINTA.DISK ## Palauttaa diskontatun arvopaperin hinnan 100 euron nimellisarvoa kohden.
+PRICEMAT = HINTA.LUNASTUS ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan erääntymispäivänä.
+PV = NA ## Palauttaa sijoituksen nykyarvon.
+RATE = KORKO ## Palauttaa annuiteetin kausittaisen korkokannan.
+RECEIVED = SAATU.HINTA ## Palauttaa arvopaperin tuoton erääntymispäivänä kokonaan maksetulle sijoitukselle.
+SLN = STP ## Palauttaa sijoituksen tasapoiston yhdeltä jaksolta.
+SYD = VUOSIPOISTO ## Palauttaa sijoituksen vuosipoiston annettuna kautena amerikkalaisen SYD-menetelmän (Sum-of-Year's Digits) avulla.
+TBILLEQ = OBLIG.TUOTTOPROS ## Palauttaa valtion obligaation tuoton vastaavana joukkovelkakirjan tuottona.
+TBILLPRICE = OBLIG.HINTA ## Palauttaa obligaation hinnan 100 euron nimellisarvoa kohden.
+TBILLYIELD = OBLIG.TUOTTO ## Palauttaa obligaation tuoton.
+VDB = VDB ## Palauttaa annetun kauden tai kauden osan kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan.
+XIRR = SISÄINEN.KORKO.JAKSOTON ## Palauttaa sisäisen korkokannan kassavirtojen sarjoille, jotka eivät välttämättä ole säännöllisiä.
+XNPV = NNA.JAKSOTON ## Palauttaa nettonykyarvon kassavirtasarjalle, joka ei välttämättä ole kausittainen.
+YIELD = TUOTTO ## Palauttaa tuoton arvopaperille, jonka korko maksetaan säännöllisin väliajoin.
+YIELDDISC = TUOTTO.DISK ## Palauttaa diskontatun arvopaperin, kuten obligaation, vuosittaisen tuoton.
+YIELDMAT = TUOTTO.ERÄP ## Palauttaa erääntymispäivänään korkoa tuottavan arvopaperin vuosittaisen tuoton.
+
+
+##
+## Information functions Erikoisfunktiot
+##
+CELL = SOLU ## Palauttaa tietoja solun muotoilusta, sijainnista ja sisällöstä.
+ERROR.TYPE = VIRHEEN.LAJI ## Palauttaa virhetyyppiä vastaavan luvun.
+INFO = KUVAUS ## Palauttaa tietoja nykyisestä käyttöympäristöstä.
+ISBLANK = ONTYHJÄ ## Palauttaa arvon TOSI, jos arvo on tyhjä.
+ISERR = ONVIRH ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo paitsi arvo #PUUTTUU!.
+ISERROR = ONVIRHE ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo.
+ISEVEN = ONPARILLINEN ## Palauttaa arvon TOSI, jos arvo on parillinen.
+ISLOGICAL = ONTOTUUS ## Palauttaa arvon TOSI, jos arvo on mikä tahansa looginen arvo.
+ISNA = ONPUUTTUU ## Palauttaa arvon TOSI, jos virhearvo on #PUUTTUU!.
+ISNONTEXT = ONEI_TEKSTI ## Palauttaa arvon TOSI, jos arvo ei ole teksti.
+ISNUMBER = ONLUKU ## Palauttaa arvon TOSI, jos arvo on luku.
+ISODD = ONPARITON ## Palauttaa arvon TOSI, jos arvo on pariton.
+ISREF = ONVIITT ## Palauttaa arvon TOSI, jos arvo on viittaus.
+ISTEXT = ONTEKSTI ## Palauttaa arvon TOSI, jos arvo on teksti.
+N = N ## Palauttaa arvon luvuksi muunnettuna.
+NA = PUUTTUU ## Palauttaa virhearvon #PUUTTUU!.
+TYPE = TYYPPI ## Palauttaa luvun, joka ilmaisee arvon tietotyypin.
+
+
+##
+## Logical functions Loogiset funktiot
+##
+AND = JA ## Palauttaa arvon TOSI, jos kaikkien argumenttien arvo on TOSI.
+FALSE = EPÄTOSI ## Palauttaa totuusarvon EPÄTOSI.
+IF = JOS ## Määrittää suoritettavan loogisen testin.
+IFERROR = JOSVIRHE ## Palauttaa määrittämäsi arvon, jos kaavan tulos on virhe; muussa tapauksessa palauttaa kaavan tuloksen.
+NOT = EI ## Kääntää argumentin loogisen arvon.
+OR = TAI ## Palauttaa arvon TOSI, jos minkä tahansa argumentin arvo on TOSI.
+TRUE = TOSI ## Palauttaa totuusarvon TOSI.
+
+
+##
+## Lookup and reference functions Haku- ja viitefunktiot
+##
+ADDRESS = OSOITE ## Palauttaa laskentataulukon soluun osoittavan viittauksen tekstinä.
+AREAS = ALUEET ## Palauttaa viittauksessa olevien alueiden määrän.
+CHOOSE = VALITSE.INDEKSI ## Valitsee arvon arvoluettelosta.
+COLUMN = SARAKE ## Palauttaa viittauksen sarakenumeron.
+COLUMNS = SARAKKEET ## Palauttaa viittauksessa olevien sarakkeiden määrän.
+HLOOKUP = VHAKU ## Suorittaa haun matriisin ylimmältä riviltä ja palauttaa määritetyn solun arvon.
+HYPERLINK = HYPERLINKKI ## Luo pikakuvakkeen tai tekstin, joka avaa verkkopalvelimeen, intranetiin tai Internetiin tallennetun tiedoston.
+INDEX = INDEKSI ## Valitsee arvon viittauksesta tai matriisista indeksin mukaan.
+INDIRECT = EPÄSUORA ## Palauttaa tekstiarvona ilmaistun viittauksen.
+LOOKUP = HAKU ## Etsii arvoja vektorista tai matriisista.
+MATCH = VASTINE ## Etsii arvoja viittauksesta tai matriisista.
+OFFSET = SIIRTYMÄ ## Palauttaa annetun viittauksen siirtymän.
+ROW = RIVI ## Palauttaa viittauksen rivinumeron.
+ROWS = RIVIT ## Palauttaa viittauksessa olevien rivien määrän.
+RTD = RTD ## Noutaa COM-automaatiota (automaatio: Tapa käsitellä sovelluksen objekteja toisesta sovelluksesta tai kehitystyökalusta. Automaatio, jota aiemmin kutsuttiin OLE-automaatioksi, on teollisuusstandardi ja COM-mallin (Component Object Model) ominaisuus.) tukevasta ohjelmasta reaaliaikaisia tietoja.
+TRANSPOSE = TRANSPONOI ## Palauttaa matriisin käänteismatriisin.
+VLOOKUP = PHAKU ## Suorittaa haun matriisin ensimmäisestä sarakkeesta ja palauttaa rivillä olevan solun arvon.
+
+
+##
+## Math and trigonometry functions Matemaattiset ja trigonometriset funktiot
+##
+ABS = ITSEISARVO ## Palauttaa luvun itseisarvon.
+ACOS = ACOS ## Palauttaa luvun arkuskosinin.
+ACOSH = ACOSH ## Palauttaa luvun käänteisen hyperbolisen kosinin.
+ASIN = ASIN ## Palauttaa luvun arkussinin.
+ASINH = ASINH ## Palauttaa luvun käänteisen hyperbolisen sinin.
+ATAN = ATAN ## Palauttaa luvun arkustangentin.
+ATAN2 = ATAN2 ## Palauttaa arkustangentin x- ja y-koordinaatin perusteella.
+ATANH = ATANH ## Palauttaa luvun käänteisen hyperbolisen tangentin.
+CEILING = PYÖRISTÄ.KERR.YLÖS ## Pyöristää luvun lähimpään kokonaislukuun tai tarkkuusargumentin lähimpään kerrannaiseen.
+COMBIN = KOMBINAATIO ## Palauttaa mahdollisten kombinaatioiden määrän annetulle objektien määrälle.
+COS = COS ## Palauttaa luvun kosinin.
+COSH = COSH ## Palauttaa luvun hyperbolisen kosinin.
+DEGREES = ASTEET ## Muuntaa radiaanit asteiksi.
+EVEN = PARILLINEN ## Pyöristää luvun ylöspäin lähimpään parilliseen kokonaislukuun.
+EXP = EKSPONENTTI ## Palauttaa e:n korotettuna annetun luvun osoittamaan potenssiin.
+FACT = KERTOMA ## Palauttaa luvun kertoman.
+FACTDOUBLE = KERTOMA.OSA ## Palauttaa luvun osakertoman.
+FLOOR = PYÖRISTÄ.KERR.ALAS ## Pyöristää luvun alaspäin (nollaa kohti).
+GCD = SUURIN.YHT.TEKIJÄ ## Palauttaa suurimman yhteisen tekijän.
+INT = KOKONAISLUKU ## Pyöristää luvun alaspäin lähimpään kokonaislukuun.
+LCM = PIENIN.YHT.JAETTAVA ## Palauttaa pienimmän yhteisen tekijän.
+LN = LUONNLOG ## Palauttaa luvun luonnollisen logaritmin.
+LOG = LOG ## Laskee luvun logaritmin käyttämällä annettua kantalukua.
+LOG10 = LOG10 ## Palauttaa luvun kymmenkantaisen logaritmin.
+MDETERM = MDETERM ## Palauttaa matriisin matriisideterminantin.
+MINVERSE = MKÄÄNTEINEN ## Palauttaa matriisin käänteismatriisin.
+MMULT = MKERRO ## Palauttaa kahden matriisin tulon.
+MOD = JAKOJ ## Palauttaa jakolaskun jäännöksen.
+MROUND = PYÖRISTÄ.KERR ## Palauttaa luvun pyöristettynä annetun luvun kerrannaiseen.
+MULTINOMIAL = MULTINOMI ## Palauttaa lukujoukon multinomin.
+ODD = PARITON ## Pyöristää luvun ylöspäin lähimpään parittomaan kokonaislukuun.
+PI = PII ## Palauttaa piin arvon.
+POWER = POTENSSI ## Palauttaa luvun korotettuna haluttuun potenssiin.
+PRODUCT = TULO ## Kertoo annetut argumentit.
+QUOTIENT = OSAMÄÄRÄ ## Palauttaa osamäärän kokonaislukuosan.
+RADIANS = RADIAANIT ## Muuntaa asteet radiaaneiksi.
+RAND = SATUNNAISLUKU ## Palauttaa satunnaisluvun väliltä 0–1.
+RANDBETWEEN = SATUNNAISLUKU.VÄLILTÄ ## Palauttaa satunnaisluvun määritettyjen lukujen väliltä.
+ROMAN = ROMAN ## Muuntaa arabialaisen numeron tekstimuotoiseksi roomalaiseksi numeroksi.
+ROUND = PYÖRISTÄ ## Pyöristää luvun annettuun määrään desimaaleja.
+ROUNDDOWN = PYÖRISTÄ.DES.ALAS ## Pyöristää luvun alaspäin (nollaa kohti).
+ROUNDUP = PYÖRISTÄ.DES.YLÖS ## Pyöristää luvun ylöspäin (poispäin nollasta).
+SERIESSUM = SARJA.SUMMA ## Palauttaa kaavaan perustuvan potenssisarjan arvon.
+SIGN = ETUMERKKI ## Palauttaa luvun etumerkin.
+SIN = SIN ## Palauttaa annetun kulman sinin.
+SINH = SINH ## Palauttaa luvun hyperbolisen sinin.
+SQRT = NELIÖJUURI ## Palauttaa positiivisen neliöjuuren.
+SQRTPI = NELIÖJUURI.PII ## Palauttaa tulon (luku * pii) neliöjuuren.
+SUBTOTAL = VÄLISUMMA ## Palauttaa luettelon tai tietokannan välisumman.
+SUM = SUMMA ## Laskee yhteen annetut argumentit.
+SUMIF = SUMMA.JOS ## Laskee ehdot täyttävien solujen summan.
+SUMIFS = SUMMA.JOS.JOUKKO ## Laskee yhteen solualueen useita ehtoja vastaavat solut.
+SUMPRODUCT = TULOJEN.SUMMA ## Palauttaa matriisin toisiaan vastaavien osien tulojen summan.
+SUMSQ = NELIÖSUMMA ## Palauttaa argumenttien neliöiden summan.
+SUMX2MY2 = NELIÖSUMMIEN.EROTUS ## Palauttaa kahden matriisin toisiaan vastaavien arvojen laskettujen neliösummien erotuksen.
+SUMX2PY2 = NELIÖSUMMIEN.SUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen neliösummien summan.
+SUMXMY2 = EROTUSTEN.NELIÖSUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen erotusten neliösumman.
+TAN = TAN ## Palauttaa luvun tangentin.
+TANH = TANH ## Palauttaa luvun hyperbolisen tangentin.
+TRUNC = KATKAISE ## Katkaisee luvun kokonaisluvuksi.
+
+
+##
+## Statistical functions Tilastolliset funktiot
+##
+AVEDEV = KESKIPOIKKEAMA ## Palauttaa hajontojen itseisarvojen keskiarvon.
+AVERAGE = KESKIARVO ## Palauttaa argumenttien keskiarvon.
+AVERAGEA = KESKIARVOA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, keskiarvon.
+AVERAGEIF = KESKIARVO.JOS ## Palauttaa alueen niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka täyttävät annetut ehdot.
+AVERAGEIFS = KESKIARVO.JOS.JOUKKO ## Palauttaa niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka vastaavat useita ehtoja.
+BETADIST = BEETAJAKAUMA ## Palauttaa kumulatiivisen beetajakaumafunktion arvon.
+BETAINV = BEETAJAKAUMA.KÄÄNT ## Palauttaa määritetyn beetajakauman käänteisen kumulatiivisen jakaumafunktion arvon.
+BINOMDIST = BINOMIJAKAUMA ## Palauttaa yksittäisen termin binomijakaumatodennäköisyyden.
+CHIDIST = CHIJAKAUMA ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden.
+CHIINV = CHIJAKAUMA.KÄÄNT ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden käänteisarvon.
+CHITEST = CHITESTI ## Palauttaa riippumattomuustestin tuloksen.
+CONFIDENCE = LUOTTAMUSVÄLI ## Palauttaa luottamusvälin populaation keskiarvolle.
+CORREL = KORRELAATIO ## Palauttaa kahden arvojoukon korrelaatiokertoimen.
+COUNT = LASKE ## Laskee argumenttiluettelossa olevien lukujen määrän.
+COUNTA = LASKE.A ## Laskee argumenttiluettelossa olevien arvojen määrän.
+COUNTBLANK = LASKE.TYHJÄT ## Laskee alueella olevien tyhjien solujen määrän.
+COUNTIF = LASKE.JOS ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa annettuja ehtoja.
+COUNTIFS = LASKE.JOS.JOUKKO ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa useita ehtoja.
+COVAR = KOVARIANSSI ## Palauttaa kovarianssin, joka on keskiarvo havaintoaineiston kunkin pisteparin poikkeamien tuloista.
+CRITBINOM = BINOMIJAKAUMA.KRIT ## Palauttaa pienimmän arvon, jossa binomijakauman kertymäfunktion arvo on pienempi tai yhtä suuri kuin vertailuarvo.
+DEVSQ = OIKAISTU.NELIÖSUMMA ## Palauttaa keskipoikkeamien neliösumman.
+EXPONDIST = EKSPONENTIAALIJAKAUMA ## Palauttaa eksponentiaalijakauman.
+FDIST = FJAKAUMA ## Palauttaa F-todennäköisyysjakauman.
+FINV = FJAKAUMA.KÄÄNT ## Palauttaa F-todennäköisyysjakauman käänteisfunktion.
+FISHER = FISHER ## Palauttaa Fisher-muunnoksen.
+FISHERINV = FISHER.KÄÄNT ## Palauttaa käänteisen Fisher-muunnoksen.
+FORECAST = ENNUSTE ## Palauttaa lineaarisen trendin arvon.
+FREQUENCY = TAAJUUS ## Palauttaa frekvenssijakautuman pystysuuntaisena matriisina.
+FTEST = FTESTI ## Palauttaa F-testin tuloksen.
+GAMMADIST = GAMMAJAKAUMA ## Palauttaa gammajakauman.
+GAMMAINV = GAMMAJAKAUMA.KÄÄNT ## Palauttaa käänteisen gammajakauman kertymäfunktion.
+GAMMALN = GAMMALN ## Palauttaa gammafunktion luonnollisen logaritmin G(x).
+GEOMEAN = KESKIARVO.GEOM ## Palauttaa geometrisen keskiarvon.
+GROWTH = KASVU ## Palauttaa eksponentiaalisen trendin arvon.
+HARMEAN = KESKIARVO.HARM ## Palauttaa harmonisen keskiarvon.
+HYPGEOMDIST = HYPERGEOM.JAKAUMA ## Palauttaa hypergeometrisen jakauman.
+INTERCEPT = LEIKKAUSPISTE ## Palauttaa lineaarisen regressiosuoran leikkauspisteen.
+KURT = KURT ## Palauttaa tietoalueen vinous-arvon eli huipukkuuden.
+LARGE = SUURI ## Palauttaa tietojoukon k:nneksi suurimman arvon.
+LINEST = LINREGR ## Palauttaa lineaarisen trendin parametrit.
+LOGEST = LOGREGR ## Palauttaa eksponentiaalisen trendin parametrit.
+LOGINV = LOGNORM.JAKAUMA.KÄÄNT ## Palauttaa lognormeeratun jakauman käänteisfunktion.
+LOGNORMDIST = LOGNORM.JAKAUMA ## Palauttaa lognormaalisen jakauman kertymäfunktion.
+MAX = MAKS ## Palauttaa suurimman arvon argumenttiluettelosta.
+MAXA = MAKSA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, suurimman arvon.
+MEDIAN = MEDIAANI ## Palauttaa annettujen lukujen mediaanin.
+MIN = MIN ## Palauttaa pienimmän arvon argumenttiluettelosta.
+MINA = MINA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, pienimmän arvon.
+MODE = MOODI ## Palauttaa tietojoukossa useimmin esiintyvän arvon.
+NEGBINOMDIST = BINOMIJAKAUMA.NEG ## Palauttaa negatiivisen binomijakauman.
+NORMDIST = NORM.JAKAUMA ## Palauttaa normaalijakauman kertymäfunktion.
+NORMINV = NORM.JAKAUMA.KÄÄNT ## Palauttaa käänteisen normaalijakauman kertymäfunktion.
+NORMSDIST = NORM.JAKAUMA.NORMIT ## Palauttaa normitetun normaalijakauman kertymäfunktion.
+NORMSINV = NORM.JAKAUMA.NORMIT.KÄÄNT ## Palauttaa normitetun normaalijakauman kertymäfunktion käänteisarvon.
+PEARSON = PEARSON ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen.
+PERCENTILE = PROSENTTIPISTE ## Palauttaa alueen arvojen k:nnen prosenttipisteen.
+PERCENTRANK = PROSENTTIJÄRJESTYS ## Palauttaa tietojoukon arvon prosentuaalisen järjestysluvun.
+PERMUT = PERMUTAATIO ## Palauttaa mahdollisten permutaatioiden määrän annetulle objektien määrälle.
+POISSON = POISSON ## Palauttaa Poissonin todennäköisyysjakauman.
+PROB = TODENNÄKÖISYYS ## Palauttaa todennäköisyyden sille, että arvot ovat tietyltä väliltä.
+QUARTILE = NELJÄNNES ## Palauttaa tietoalueen neljänneksen.
+RANK = ARVON.MUKAAN ## Palauttaa luvun paikan lukuarvoluettelossa.
+RSQ = PEARSON.NELIÖ ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen neliön.
+SKEW = JAKAUMAN.VINOUS ## Palauttaa jakauman vinouden.
+SLOPE = KULMAKERROIN ## Palauttaa lineaarisen regressiosuoran kulmakertoimen.
+SMALL = PIENI ## Palauttaa tietojoukon k:nneksi pienimmän arvon.
+STANDARDIZE = NORMITA ## Palauttaa normitetun arvon.
+STDEV = KESKIHAJONTA ## Laskee populaation keskihajonnan otoksen perusteella.
+STDEVA = KESKIHAJONTAA ## Laskee populaation keskihajonnan otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot.
+STDEVP = KESKIHAJONTAP ## Laskee normaalijakautuman koko populaation perusteella.
+STDEVPA = KESKIHAJONTAPA ## Laskee populaation keskihajonnan koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot.
+STEYX = KESKIVIRHE ## Palauttaa regression kutakin x-arvoa vastaavan ennustetun y-arvon keskivirheen.
+TDIST = TJAKAUMA ## Palauttaa t-jakautuman.
+TINV = TJAKAUMA.KÄÄNT ## Palauttaa käänteisen t-jakauman.
+TREND = SUUNTAUS ## Palauttaa lineaarisen trendin arvoja.
+TRIMMEAN = KESKIARVO.TASATTU ## Palauttaa tietojoukon tasatun keskiarvon.
+TTEST = TTESTI ## Palauttaa t-testiin liittyvän todennäköisyyden.
+VAR = VAR ## Arvioi populaation varianssia otoksen perusteella.
+VARA = VARA ## Laskee populaation varianssin otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot.
+VARP = VARP ## Laskee varianssin koko populaation perusteella.
+VARPA = VARPA ## Laskee populaation varianssin koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot.
+WEIBULL = WEIBULL ## Palauttaa Weibullin jakauman.
+ZTEST = ZTESTI ## Palauttaa z-testin yksisuuntaisen todennäköisyysarvon.
+
+
+##
+## Text functions Tekstifunktiot
+##
+ASC = ASC ## Muuntaa merkkijonossa olevat englanninkieliset DBCS- tai katakana-merkit SBCS-merkeiksi.
+BAHTTEXT = BAHTTEKSTI ## Muuntaa luvun tekstiksi ß (baht) -valuuttamuotoa käyttämällä.
+CHAR = MERKKI ## Palauttaa koodin lukua vastaavan merkin.
+CLEAN = SIIVOA ## Poistaa tekstistä kaikki tulostumattomat merkit.
+CODE = KOODI ## Palauttaa tekstimerkkijonon ensimmäisen merkin numerokoodin.
+CONCATENATE = KETJUTA ## Yhdistää useat merkkijonot yhdeksi merkkijonoksi.
+DOLLAR = VALUUTTA ## Muuntaa luvun tekstiksi $ (dollari) -valuuttamuotoa käyttämällä.
+EXACT = VERTAA ## Tarkistaa, ovatko kaksi tekstiarvoa samanlaiset.
+FIND = ETSI ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet).
+FINDB = ETSIB ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet).
+FIXED = KIINTEÄ ## Muotoilee luvun tekstiksi, jossa on kiinteä määrä desimaaleja.
+JIS = JIS ## Muuntaa merkkijonossa olevat englanninkieliset SBCS- tai katakana-merkit DBCS-merkeiksi.
+LEFT = VASEN ## Palauttaa tekstiarvon vasemmanpuoliset merkit.
+LEFTB = VASENB ## Palauttaa tekstiarvon vasemmanpuoliset merkit.
+LEN = PITUUS ## Palauttaa tekstimerkkijonon merkkien määrän.
+LENB = PITUUSB ## Palauttaa tekstimerkkijonon merkkien määrän.
+LOWER = PIENET ## Muuntaa tekstin pieniksi kirjaimiksi.
+MID = POIMI.TEKSTI ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta.
+MIDB = POIMI.TEKSTIB ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta.
+PHONETIC = FONEETTINEN ## Hakee foneettiset (furigana) merkit merkkijonosta.
+PROPER = ERISNIMI ## Muuttaa merkkijonon kunkin sanan ensimmäisen kirjaimen isoksi.
+REPLACE = KORVAA ## Korvaa tekstissä olevat merkit.
+REPLACEB = KORVAAB ## Korvaa tekstissä olevat merkit.
+REPT = TOISTA ## Toistaa tekstin annetun määrän kertoja.
+RIGHT = OIKEA ## Palauttaa tekstiarvon oikeanpuoliset merkit.
+RIGHTB = OIKEAB ## Palauttaa tekstiarvon oikeanpuoliset merkit.
+SEARCH = KÄY.LÄPI ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi).
+SEARCHB = KÄY.LÄPIB ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi).
+SUBSTITUTE = VAIHDA ## Korvaa merkkijonossa olevan tekstin toisella.
+T = T ## Muuntaa argumentit tekstiksi.
+TEXT = TEKSTI ## Muotoilee luvun ja muuntaa sen tekstiksi.
+TRIM = POISTA.VÄLIT ## Poistaa välilyönnit tekstistä.
+UPPER = ISOT ## Muuntaa tekstin isoiksi kirjaimiksi.
+VALUE = ARVO ## Muuntaa tekstiargumentin luvuksi.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config
new file mode 100644
index 0000000..a846621
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NUL!
+DIV0 = #DIV/0!
+VALUE = #VALEUR!
+REF = #REF!
+NAME = #NOM?
+NUM = #NOMBRE!
+NA = #N/A
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions
new file mode 100644
index 0000000..ed1881c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Fonctions de complément et d’automatisation
+##
+GETPIVOTDATA = LIREDONNEESTABCROISDYNAMIQUE ## Renvoie les données stockées dans un rapport de tableau croisé dynamique.
+
+
+##
+## Cube functions Fonctions Cube
+##
+CUBEKPIMEMBER = MEMBREKPICUBE ## Renvoie un nom, une propriété et une mesure d’indicateur de performance clé et affiche le nom et la propriété dans la cellule. Un indicateur de performance clé est une mesure quantifiable, telle que la marge bénéficiaire brute mensuelle ou la rotation trimestrielle du personnel, utilisée pour évaluer les performances d’une entreprise.
+CUBEMEMBER = MEMBRECUBE ## Renvoie un membre ou un uplet dans une hiérarchie de cubes. Utilisez cette fonction pour valider l’existence du membre ou de l’uplet dans le cube.
+CUBEMEMBERPROPERTY = PROPRIETEMEMBRECUBE ## Renvoie la valeur d’une propriété de membre du cube. Utilisez cette fonction pour valider l’existence d’un nom de membre dans le cube et pour renvoyer la propriété spécifiée pour ce membre.
+CUBERANKEDMEMBER = RANGMEMBRECUBE ## Renvoie le nième membre ou le membre placé à un certain rang dans un ensemble. Utilisez cette fonction pour renvoyer un ou plusieurs éléments d’un ensemble, tels que les meilleurs vendeurs ou les 10 meilleurs étudiants.
+CUBESET = JEUCUBE ## Définit un ensemble calculé de membres ou d’uplets en envoyant une expression définie au cube sur le serveur qui crée l’ensemble et le renvoie à Microsoft Office Excel.
+CUBESETCOUNT = NBJEUCUBE ## Renvoie le nombre d’éléments dans un jeu.
+CUBEVALUE = VALEURCUBE ## Renvoie une valeur d’agrégation issue d’un cube.
+
+
+##
+## Database functions Fonctions de base de données
+##
+DAVERAGE = BDMOYENNE ## Renvoie la moyenne des entrées de base de données sélectionnées.
+DCOUNT = BCOMPTE ## Compte le nombre de cellules d’une base de données qui contiennent des nombres.
+DCOUNTA = BDNBVAL ## Compte les cellules non vides d’une base de données.
+DGET = BDLIRE ## Extrait d’une base de données un enregistrement unique répondant aux critères spécifiés.
+DMAX = BDMAX ## Renvoie la valeur maximale des entrées de base de données sélectionnées.
+DMIN = BDMIN ## Renvoie la valeur minimale des entrées de base de données sélectionnées.
+DPRODUCT = BDPRODUIT ## Multiplie les valeurs d’un champ particulier des enregistrements d’une base de données, qui répondent aux critères spécifiés.
+DSTDEV = BDECARTYPE ## Calcule l’écart type pour un échantillon d’entrées de base de données sélectionnées.
+DSTDEVP = BDECARTYPEP ## Calcule l’écart type pour l’ensemble d’une population d’entrées de base de données sélectionnées.
+DSUM = BDSOMME ## Ajoute les nombres dans la colonne de champ des enregistrements de la base de données, qui répondent aux critères.
+DVAR = BDVAR ## Calcule la variance pour un échantillon d’entrées de base de données sélectionnées.
+DVARP = BDVARP ## Calcule la variance pour l’ensemble d’une population d’entrées de base de données sélectionnées.
+
+
+##
+## Date and time functions Fonctions de date et d’heure
+##
+DATE = DATE ## Renvoie le numéro de série d’une date précise.
+DATEVALUE = DATEVAL ## Convertit une date représentée sous forme de texte en numéro de série.
+DAY = JOUR ## Convertit un numéro de série en jour du mois.
+DAYS360 = JOURS360 ## Calcule le nombre de jours qui séparent deux dates sur la base d’une année de 360 jours.
+EDATE = MOIS.DECALER ## Renvoie le numéro séquentiel de la date qui représente une date spécifiée (l’argument date_départ), corrigée en plus ou en moins du nombre de mois indiqué.
+EOMONTH = FIN.MOIS ## Renvoie le numéro séquentiel de la date du dernier jour du mois précédant ou suivant la date_départ du nombre de mois indiqué.
+HOUR = HEURE ## Convertit un numéro de série en heure.
+MINUTE = MINUTE ## Convertit un numéro de série en minute.
+MONTH = MOIS ## Convertit un numéro de série en mois.
+NETWORKDAYS = NB.JOURS.OUVRES ## Renvoie le nombre de jours ouvrés entiers compris entre deux dates.
+NOW = MAINTENANT ## Renvoie le numéro de série de la date et de l’heure du jour.
+SECOND = SECONDE ## Convertit un numéro de série en seconde.
+TIME = TEMPS ## Renvoie le numéro de série d’une heure précise.
+TIMEVALUE = TEMPSVAL ## Convertit une date représentée sous forme de texte en numéro de série.
+TODAY = AUJOURDHUI ## Renvoie le numéro de série de la date du jour.
+WEEKDAY = JOURSEM ## Convertit un numéro de série en jour de la semaine.
+WEEKNUM = NO.SEMAINE ## Convertit un numéro de série en un numéro représentant l’ordre de la semaine dans l’année.
+WORKDAY = SERIE.JOUR.OUVRE ## Renvoie le numéro de série de la date avant ou après le nombre de jours ouvrés spécifiés.
+YEAR = ANNEE ## Convertit un numéro de série en année.
+YEARFRAC = FRACTION.ANNEE ## Renvoie la fraction de l’année représentant le nombre de jours entre la date de début et la date de fin.
+
+
+##
+## Engineering functions Fonctions d’ingénierie
+##
+BESSELI = BESSELI ## Renvoie la fonction Bessel modifiée In(x).
+BESSELJ = BESSELJ ## Renvoie la fonction Bessel Jn(x).
+BESSELK = BESSELK ## Renvoie la fonction Bessel modifiée Kn(x).
+BESSELY = BESSELY ## Renvoie la fonction Bessel Yn(x).
+BIN2DEC = BINDEC ## Convertit un nombre binaire en nombre décimal.
+BIN2HEX = BINHEX ## Convertit un nombre binaire en nombre hexadécimal.
+BIN2OCT = BINOCT ## Convertit un nombre binaire en nombre octal.
+COMPLEX = COMPLEXE ## Convertit des coefficients réel et imaginaire en un nombre complexe.
+CONVERT = CONVERT ## Convertit un nombre d’une unité de mesure à une autre.
+DEC2BIN = DECBIN ## Convertit un nombre décimal en nombre binaire.
+DEC2HEX = DECHEX ## Convertit un nombre décimal en nombre hexadécimal.
+DEC2OCT = DECOCT ## Convertit un nombre décimal en nombre octal.
+DELTA = DELTA ## Teste l’égalité de deux nombres.
+ERF = ERF ## Renvoie la valeur de la fonction d’erreur.
+ERFC = ERFC ## Renvoie la valeur de la fonction d’erreur complémentaire.
+GESTEP = SUP.SEUIL ## Teste si un nombre est supérieur à une valeur de seuil.
+HEX2BIN = HEXBIN ## Convertit un nombre hexadécimal en nombre binaire.
+HEX2DEC = HEXDEC ## Convertit un nombre hexadécimal en nombre décimal.
+HEX2OCT = HEXOCT ## Convertit un nombre hexadécimal en nombre octal.
+IMABS = COMPLEXE.MODULE ## Renvoie la valeur absolue (module) d’un nombre complexe.
+IMAGINARY = COMPLEXE.IMAGINAIRE ## Renvoie le coefficient imaginaire d’un nombre complexe.
+IMARGUMENT = COMPLEXE.ARGUMENT ## Renvoie l’argument thêta, un angle exprimé en radians.
+IMCONJUGATE = COMPLEXE.CONJUGUE ## Renvoie le nombre complexe conjugué d’un nombre complexe.
+IMCOS = IMCOS ## Renvoie le cosinus d’un nombre complexe.
+IMDIV = COMPLEXE.DIV ## Renvoie le quotient de deux nombres complexes.
+IMEXP = COMPLEXE.EXP ## Renvoie la fonction exponentielle d’un nombre complexe.
+IMLN = COMPLEXE.LN ## Renvoie le logarithme népérien d’un nombre complexe.
+IMLOG10 = COMPLEXE.LOG10 ## Calcule le logarithme en base 10 d’un nombre complexe.
+IMLOG2 = COMPLEXE.LOG2 ## Calcule le logarithme en base 2 d’un nombre complexe.
+IMPOWER = COMPLEXE.PUISSANCE ## Renvoie un nombre complexe élevé à une puissance entière.
+IMPRODUCT = COMPLEXE.PRODUIT ## Renvoie le produit de plusieurs nombres complexes.
+IMREAL = COMPLEXE.REEL ## Renvoie le coefficient réel d’un nombre complexe.
+IMSIN = COMPLEXE.SIN ## Renvoie le sinus d’un nombre complexe.
+IMSQRT = COMPLEXE.RACINE ## Renvoie la racine carrée d’un nombre complexe.
+IMSUB = COMPLEXE.DIFFERENCE ## Renvoie la différence entre deux nombres complexes.
+IMSUM = COMPLEXE.SOMME ## Renvoie la somme de plusieurs nombres complexes.
+OCT2BIN = OCTBIN ## Convertit un nombre octal en nombre binaire.
+OCT2DEC = OCTDEC ## Convertit un nombre octal en nombre décimal.
+OCT2HEX = OCTHEX ## Convertit un nombre octal en nombre hexadécimal.
+
+
+##
+## Financial functions Fonctions financières
+##
+ACCRINT = INTERET.ACC ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu périodiquement.
+ACCRINTM = INTERET.ACC.MAT ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu à l’échéance.
+AMORDEGRC = AMORDEGRC ## Renvoie l’amortissement correspondant à chaque période comptable en utilisant un coefficient d’amortissement.
+AMORLINC = AMORLINC ## Renvoie l’amortissement d’un bien à la fin d’une période fiscale donnée.
+COUPDAYBS = NB.JOURS.COUPON.PREC ## Renvoie le nombre de jours entre le début de la période de coupon et la date de liquidation.
+COUPDAYS = NB.JOURS.COUPONS ## Renvoie le nombre de jours pour la période du coupon contenant la date de liquidation.
+COUPDAYSNC = NB.JOURS.COUPON.SUIV ## Renvoie le nombre de jours entre la date de liquidation et la date du coupon suivant la date de liquidation.
+COUPNCD = DATE.COUPON.SUIV ## Renvoie la première date de coupon ultérieure à la date de règlement.
+COUPNUM = NB.COUPONS ## Renvoie le nombre de coupons dus entre la date de règlement et la date d’échéance.
+COUPPCD = DATE.COUPON.PREC ## Renvoie la date de coupon précédant la date de règlement.
+CUMIPMT = CUMUL.INTER ## Renvoie l’intérêt cumulé payé sur un emprunt entre deux périodes.
+CUMPRINC = CUMUL.PRINCPER ## Renvoie le montant cumulé des remboursements du capital d’un emprunt effectués entre deux périodes.
+DB = DB ## Renvoie l’amortissement d’un bien pour une période spécifiée en utilisant la méthode de l’amortissement dégressif à taux fixe.
+DDB = DDB ## Renvoie l’amortissement d’un bien pour toute période spécifiée, en utilisant la méthode de l’amortissement dégressif à taux double ou selon un coefficient à spécifier.
+DISC = TAUX.ESCOMPTE ## Calcule le taux d’escompte d’une transaction.
+DOLLARDE = PRIX.DEC ## Convertit un prix en euros, exprimé sous forme de fraction, en un prix en euros exprimé sous forme de nombre décimal.
+DOLLARFR = PRIX.FRAC ## Convertit un prix en euros, exprimé sous forme de nombre décimal, en un prix en euros exprimé sous forme de fraction.
+DURATION = DUREE ## Renvoie la durée, en années, d’un titre dont l’intérêt est perçu périodiquement.
+EFFECT = TAUX.EFFECTIF ## Renvoie le taux d’intérêt annuel effectif.
+FV = VC ## Renvoie la valeur future d’un investissement.
+FVSCHEDULE = VC.PAIEMENTS ## Calcule la valeur future d’un investissement en appliquant une série de taux d’intérêt composites.
+INTRATE = TAUX.INTERET ## Affiche le taux d’intérêt d’un titre totalement investi.
+IPMT = INTPER ## Calcule le montant des intérêts d’un investissement pour une période donnée.
+IRR = TRI ## Calcule le taux de rentabilité interne d’un investissement pour une succession de trésoreries.
+ISPMT = ISPMT ## Calcule le montant des intérêts d’un investissement pour une période donnée.
+MDURATION = DUREE.MODIFIEE ## Renvoie la durée de Macauley modifiée pour un titre ayant une valeur nominale hypothétique de 100_euros.
+MIRR = TRIM ## Calcule le taux de rentabilité interne lorsque les paiements positifs et négatifs sont financés à des taux différents.
+NOMINAL = TAUX.NOMINAL ## Calcule le taux d’intérêt nominal annuel.
+NPER = NPM ## Renvoie le nombre de versements nécessaires pour rembourser un emprunt.
+NPV = VAN ## Calcule la valeur actuelle nette d’un investissement basé sur une série de décaissements et un taux d’escompte.
+ODDFPRICE = PRIX.PCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière.
+ODDFYIELD = REND.PCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la première période de coupon est irrégulière.
+ODDLPRICE = PRIX.DCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière.
+ODDLYIELD = REND.DCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la dernière période de coupon est irrégulière.
+PMT = VPM ## Calcule le paiement périodique d’un investissement donné.
+PPMT = PRINCPER ## Calcule, pour une période donnée, la part de remboursement du principal d’un investissement.
+PRICE = PRIX.TITRE ## Renvoie le prix d’un titre rapportant des intérêts périodiques, pour une valeur nominale de 100 euros.
+PRICEDISC = VALEUR.ENCAISSEMENT ## Renvoie la valeur d’encaissement d’un escompte commercial, pour une valeur nominale de 100 euros.
+PRICEMAT = PRIX.TITRE.ECHEANCE ## Renvoie le prix d’un titre dont la valeur nominale est 100 euros et qui rapporte des intérêts à l’échéance.
+PV = PV ## Calcule la valeur actuelle d’un investissement.
+RATE = TAUX ## Calcule le taux d’intérêt par période pour une annuité.
+RECEIVED = VALEUR.NOMINALE ## Renvoie la valeur nominale à échéance d’un effet de commerce.
+SLN = AMORLIN ## Calcule l’amortissement linéaire d’un bien pour une période donnée.
+SYD = SYD ## Calcule l’amortissement d’un bien pour une période donnée sur la base de la méthode américaine Sum-of-Years Digits (amortissement dégressif à taux décroissant appliqué à une valeur constante).
+TBILLEQ = TAUX.ESCOMPTE.R ## Renvoie le taux d’escompte rationnel d’un bon du Trésor.
+TBILLPRICE = PRIX.BON.TRESOR ## Renvoie le prix d’un bon du Trésor d’une valeur nominale de 100 euros.
+TBILLYIELD = RENDEMENT.BON.TRESOR ## Calcule le taux de rendement d’un bon du Trésor.
+VDB = VDB ## Renvoie l’amortissement d’un bien pour une période spécifiée ou partielle en utilisant une méthode de l’amortissement dégressif à taux fixe.
+XIRR = TRI.PAIEMENTS ## Calcule le taux de rentabilité interne d’un ensemble de paiements non périodiques.
+XNPV = VAN.PAIEMENTS ## Renvoie la valeur actuelle nette d’un ensemble de paiements non périodiques.
+YIELD = RENDEMENT.TITRE ## Calcule le rendement d’un titre rapportant des intérêts périodiquement.
+YIELDDISC = RENDEMENT.SIMPLE ## Calcule le taux de rendement d’un emprunt à intérêt simple (par exemple, un bon du Trésor).
+YIELDMAT = RENDEMENT.TITRE.ECHEANCE ## Renvoie le rendement annuel d’un titre qui rapporte des intérêts à l’échéance.
+
+
+##
+## Information functions Fonctions d’information
+##
+CELL = CELLULE ## Renvoie des informations sur la mise en forme, l’emplacement et le contenu d’une cellule.
+ERROR.TYPE = TYPE.ERREUR ## Renvoie un nombre correspondant à un type d’erreur.
+INFO = INFORMATIONS ## Renvoie des informations sur l’environnement d’exploitation actuel.
+ISBLANK = ESTVIDE ## Renvoie VRAI si l’argument valeur est vide.
+ISERR = ESTERR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur, sauf #N/A.
+ISERROR = ESTERREUR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur.
+ISEVEN = EST.PAIR ## Renvoie VRAI si le chiffre est pair.
+ISLOGICAL = ESTLOGIQUE ## Renvoie VRAI si l’argument valeur fait référence à une valeur logique.
+ISNA = ESTNA ## Renvoie VRAI si l’argument valeur fait référence à la valeur d’erreur #N/A.
+ISNONTEXT = ESTNONTEXTE ## Renvoie VRAI si l’argument valeur ne se présente pas sous forme de texte.
+ISNUMBER = ESTNUM ## Renvoie VRAI si l’argument valeur représente un nombre.
+ISODD = EST.IMPAIR ## Renvoie VRAI si le chiffre est impair.
+ISREF = ESTREF ## Renvoie VRAI si l’argument valeur est une référence.
+ISTEXT = ESTTEXTE ## Renvoie VRAI si l’argument valeur se présente sous forme de texte.
+N = N ## Renvoie une valeur convertie en nombre.
+NA = NA ## Renvoie la valeur d’erreur #N/A.
+TYPE = TYPE ## Renvoie un nombre indiquant le type de données d’une valeur.
+
+
+##
+## Logical functions Fonctions logiques
+##
+AND = ET ## Renvoie VRAI si tous ses arguments sont VRAI.
+FALSE = FAUX ## Renvoie la valeur logique FAUX.
+IF = SI ## Spécifie un test logique à effectuer.
+IFERROR = SIERREUR ## Renvoie une valeur que vous spécifiez si une formule génère une erreur ; sinon, elle renvoie le résultat de la formule.
+NOT = NON ## Inverse la logique de cet argument.
+OR = OU ## Renvoie VRAI si un des arguments est VRAI.
+TRUE = VRAI ## Renvoie la valeur logique VRAI.
+
+
+##
+## Lookup and reference functions Fonctions de recherche et de référence
+##
+ADDRESS = ADRESSE ## Renvoie une référence sous forme de texte à une seule cellule d’une feuille de calcul.
+AREAS = ZONES ## Renvoie le nombre de zones dans une référence.
+CHOOSE = CHOISIR ## Choisit une valeur dans une liste.
+COLUMN = COLONNE ## Renvoie le numéro de colonne d’une référence.
+COLUMNS = COLONNES ## Renvoie le nombre de colonnes dans une référence.
+HLOOKUP = RECHERCHEH ## Effectue une recherche dans la première ligne d’une matrice et renvoie la valeur de la cellule indiquée.
+HYPERLINK = LIEN_HYPERTEXTE ## Crée un raccourci ou un renvoi qui ouvre un document stocké sur un serveur réseau, sur un réseau Intranet ou sur Internet.
+INDEX = INDEX ## Utilise un index pour choisir une valeur provenant d’une référence ou d’une matrice.
+INDIRECT = INDIRECT ## Renvoie une référence indiquée par une valeur de texte.
+LOOKUP = RECHERCHE ## Recherche des valeurs dans un vecteur ou une matrice.
+MATCH = EQUIV ## Recherche des valeurs dans une référence ou une matrice.
+OFFSET = DECALER ## Renvoie une référence décalée par rapport à une référence donnée.
+ROW = LIGNE ## Renvoie le numéro de ligne d’une référence.
+ROWS = LIGNES ## Renvoie le nombre de lignes dans une référence.
+RTD = RTD ## Extrait les données en temps réel à partir d’un programme prenant en charge l’automation COM (Automation : utilisation des objets d'une application à partir d'une autre application ou d'un autre outil de développement. Autrefois appelée OLE Automation, Automation est une norme industrielle et une fonctionnalité du modèle d'objet COM (Component Object Model).).
+TRANSPOSE = TRANSPOSE ## Renvoie la transposition d’une matrice.
+VLOOKUP = RECHERCHEV ## Effectue une recherche dans la première colonne d’une matrice et se déplace sur la ligne pour renvoyer la valeur d’une cellule.
+
+
+##
+## Math and trigonometry functions Fonctions mathématiques et trigonométriques
+##
+ABS = ABS ## Renvoie la valeur absolue d’un nombre.
+ACOS = ACOS ## Renvoie l’arccosinus d’un nombre.
+ACOSH = ACOSH ## Renvoie le cosinus hyperbolique inverse d’un nombre.
+ASIN = ASIN ## Renvoie l’arcsinus d’un nombre.
+ASINH = ASINH ## Renvoie le sinus hyperbolique inverse d’un nombre.
+ATAN = ATAN ## Renvoie l’arctangente d’un nombre.
+ATAN2 = ATAN2 ## Renvoie l’arctangente des coordonnées x et y.
+ATANH = ATANH ## Renvoie la tangente hyperbolique inverse d’un nombre.
+CEILING = PLAFOND ## Arrondit un nombre au nombre entier le plus proche ou au multiple le plus proche de l’argument précision en s’éloignant de zéro.
+COMBIN = COMBIN ## Renvoie le nombre de combinaisons que l’on peut former avec un nombre donné d’objets.
+COS = COS ## Renvoie le cosinus d’un nombre.
+COSH = COSH ## Renvoie le cosinus hyperbolique d’un nombre.
+DEGREES = DEGRES ## Convertit des radians en degrés.
+EVEN = PAIR ## Arrondit un nombre au nombre entier pair le plus proche en s’éloignant de zéro.
+EXP = EXP ## Renvoie e élevé à la puissance d’un nombre donné.
+FACT = FACT ## Renvoie la factorielle d’un nombre.
+FACTDOUBLE = FACTDOUBLE ## Renvoie la factorielle double d’un nombre.
+FLOOR = PLANCHER ## Arrondit un nombre en tendant vers 0 (zéro).
+GCD = PGCD ## Renvoie le plus grand commun diviseur.
+INT = ENT ## Arrondit un nombre à l’entier immédiatement inférieur.
+LCM = PPCM ## Renvoie le plus petit commun multiple.
+LN = LN ## Renvoie le logarithme népérien d’un nombre.
+LOG = LOG ## Renvoie le logarithme d’un nombre dans la base spécifiée.
+LOG10 = LOG10 ## Calcule le logarithme en base 10 d’un nombre.
+MDETERM = DETERMAT ## Renvoie le déterminant d’une matrice.
+MINVERSE = INVERSEMAT ## Renvoie la matrice inverse d’une matrice.
+MMULT = PRODUITMAT ## Renvoie le produit de deux matrices.
+MOD = MOD ## Renvoie le reste d’une division.
+MROUND = ARRONDI.AU.MULTIPLE ## Donne l’arrondi d’un nombre au multiple spécifié.
+MULTINOMIAL = MULTINOMIALE ## Calcule la multinomiale d’un ensemble de nombres.
+ODD = IMPAIR ## Renvoie le nombre, arrondi à la valeur du nombre entier impair le plus proche en s’éloignant de zéro.
+PI = PI ## Renvoie la valeur de pi.
+POWER = PUISSANCE ## Renvoie la valeur du nombre élevé à une puissance.
+PRODUCT = PRODUIT ## Multiplie ses arguments.
+QUOTIENT = QUOTIENT ## Renvoie la partie entière du résultat d’une division.
+RADIANS = RADIANS ## Convertit des degrés en radians.
+RAND = ALEA ## Renvoie un nombre aléatoire compris entre 0 et 1.
+RANDBETWEEN = ALEA.ENTRE.BORNES ## Renvoie un nombre aléatoire entre les nombres que vous spécifiez.
+ROMAN = ROMAIN ## Convertit des chiffres arabes en chiffres romains, sous forme de texte.
+ROUND = ARRONDI ## Arrondit un nombre au nombre de chiffres indiqué.
+ROUNDDOWN = ARRONDI.INF ## Arrondit un nombre en tendant vers 0 (zéro).
+ROUNDUP = ARRONDI.SUP ## Arrondit un nombre à l’entier supérieur, en s’éloignant de zéro.
+SERIESSUM = SOMME.SERIES ## Renvoie la somme d’une série géométrique en s’appuyant sur la formule suivante :
+SIGN = SIGNE ## Renvoie le signe d’un nombre.
+SIN = SIN ## Renvoie le sinus d’un angle donné.
+SINH = SINH ## Renvoie le sinus hyperbolique d’un nombre.
+SQRT = RACINE ## Renvoie la racine carrée d’un nombre.
+SQRTPI = RACINE.PI ## Renvoie la racine carrée de (nombre * pi).
+SUBTOTAL = SOUS.TOTAL ## Renvoie un sous-total dans une liste ou une base de données.
+SUM = SOMME ## Calcule la somme de ses arguments.
+SUMIF = SOMME.SI ## Additionne les cellules spécifiées si elles répondent à un critère donné.
+SUMIFS = SOMME.SI.ENS ## Ajoute les cellules d’une plage qui répondent à plusieurs critères.
+SUMPRODUCT = SOMMEPROD ## Multiplie les valeurs correspondantes des matrices spécifiées et calcule la somme de ces produits.
+SUMSQ = SOMME.CARRES ## Renvoie la somme des carrés des arguments.
+SUMX2MY2 = SOMME.X2MY2 ## Renvoie la somme de la différence des carrés des valeurs correspondantes de deux matrices.
+SUMX2PY2 = SOMME.X2PY2 ## Renvoie la somme de la somme des carrés des valeurs correspondantes de deux matrices.
+SUMXMY2 = SOMME.XMY2 ## Renvoie la somme des carrés des différences entre les valeurs correspondantes de deux matrices.
+TAN = TAN ## Renvoie la tangente d’un nombre.
+TANH = TANH ## Renvoie la tangente hyperbolique d’un nombre.
+TRUNC = TRONQUE ## Renvoie la partie entière d’un nombre.
+
+
+##
+## Statistical functions Fonctions statistiques
+##
+AVEDEV = ECART.MOYEN ## Renvoie la moyenne des écarts absolus observés dans la moyenne des points de données.
+AVERAGE = MOYENNE ## Renvoie la moyenne de ses arguments.
+AVERAGEA = AVERAGEA ## Renvoie la moyenne de ses arguments, nombres, texte et valeurs logiques inclus.
+AVERAGEIF = MOYENNE.SI ## Renvoie la moyenne (arithmétique) de toutes les cellules d’une plage qui répondent à des critères donnés.
+AVERAGEIFS = MOYENNE.SI.ENS ## Renvoie la moyenne (arithmétique) de toutes les cellules qui répondent à plusieurs critères.
+BETADIST = LOI.BETA ## Renvoie la fonction de distribution cumulée.
+BETAINV = BETA.INVERSE ## Renvoie l’inverse de la fonction de distribution cumulée pour une distribution bêta spécifiée.
+BINOMDIST = LOI.BINOMIALE ## Renvoie la probabilité d’une variable aléatoire discrète suivant la loi binomiale.
+CHIDIST = LOI.KHIDEUX ## Renvoie la probabilité unilatérale de la distribution khi-deux.
+CHIINV = KHIDEUX.INVERSE ## Renvoie l’inverse de la probabilité unilatérale de la distribution khi-deux.
+CHITEST = TEST.KHIDEUX ## Renvoie le test d’indépendance.
+CONFIDENCE = INTERVALLE.CONFIANCE ## Renvoie l’intervalle de confiance pour une moyenne de population.
+CORREL = COEFFICIENT.CORRELATION ## Renvoie le coefficient de corrélation entre deux séries de données.
+COUNT = NB ## Détermine les nombres compris dans la liste des arguments.
+COUNTA = NBVAL ## Détermine le nombre de valeurs comprises dans la liste des arguments.
+COUNTBLANK = NB.VIDE ## Compte le nombre de cellules vides dans une plage.
+COUNTIF = NB.SI ## Compte le nombre de cellules qui répondent à un critère donné dans une plage.
+COUNTIFS = NB.SI.ENS ## Compte le nombre de cellules à l’intérieur d’une plage qui répondent à plusieurs critères.
+COVAR = COVARIANCE ## Renvoie la covariance, moyenne des produits des écarts pour chaque série d’observations.
+CRITBINOM = CRITERE.LOI.BINOMIALE ## Renvoie la plus petite valeur pour laquelle la distribution binomiale cumulée est inférieure ou égale à une valeur de critère.
+DEVSQ = SOMME.CARRES.ECARTS ## Renvoie la somme des carrés des écarts.
+EXPONDIST = LOI.EXPONENTIELLE ## Renvoie la distribution exponentielle.
+FDIST = LOI.F ## Renvoie la distribution de probabilité F.
+FINV = INVERSE.LOI.F ## Renvoie l’inverse de la distribution de probabilité F.
+FISHER = FISHER ## Renvoie la transformation de Fisher.
+FISHERINV = FISHER.INVERSE ## Renvoie l’inverse de la transformation de Fisher.
+FORECAST = PREVISION ## Calcule une valeur par rapport à une tendance linéaire.
+FREQUENCY = FREQUENCE ## Calcule la fréquence d’apparition des valeurs dans une plage de valeurs, puis renvoie des nombres sous forme de matrice verticale.
+FTEST = TEST.F ## Renvoie le résultat d’un test F.
+GAMMADIST = LOI.GAMMA ## Renvoie la probabilité d’une variable aléatoire suivant une loi Gamma.
+GAMMAINV = LOI.GAMMA.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi Gamma.
+GAMMALN = LNGAMMA ## Renvoie le logarithme népérien de la fonction Gamma, G(x)
+GEOMEAN = MOYENNE.GEOMETRIQUE ## Renvoie la moyenne géométrique.
+GROWTH = CROISSANCE ## Calcule des valeurs par rapport à une tendance exponentielle.
+HARMEAN = MOYENNE.HARMONIQUE ## Renvoie la moyenne harmonique.
+HYPGEOMDIST = LOI.HYPERGEOMETRIQUE ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi hypergéométrique.
+INTERCEPT = ORDONNEE.ORIGINE ## Renvoie l’ordonnée à l’origine d’une droite de régression linéaire.
+KURT = KURTOSIS ## Renvoie le kurtosis d’une série de données.
+LARGE = GRANDE.VALEUR ## Renvoie la k-ième plus grande valeur d’une série de données.
+LINEST = DROITEREG ## Renvoie les paramètres d’une tendance linéaire.
+LOGEST = LOGREG ## Renvoie les paramètres d’une tendance exponentielle.
+LOGINV = LOI.LOGNORMALE.INVERSE ## Renvoie l’inverse de la probabilité pour une variable aléatoire suivant la loi lognormale.
+LOGNORMDIST = LOI.LOGNORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi lognormale.
+MAX = MAX ## Renvoie la valeur maximale contenue dans une liste d’arguments.
+MAXA = MAXA ## Renvoie la valeur maximale d’une liste d’arguments, nombres, texte et valeurs logiques inclus.
+MEDIAN = MEDIANE ## Renvoie la valeur médiane des nombres donnés.
+MIN = MIN ## Renvoie la valeur minimale contenue dans une liste d’arguments.
+MINA = MINA ## Renvoie la plus petite valeur d’une liste d’arguments, nombres, texte et valeurs logiques inclus.
+MODE = MODE ## Renvoie la valeur la plus courante d’une série de données.
+NEGBINOMDIST = LOI.BINOMIALE.NEG ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi binomiale négative.
+NORMDIST = LOI.NORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale.
+NORMINV = LOI.NORMALE.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi normale standard.
+NORMSDIST = LOI.NORMALE.STANDARD ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale standard.
+NORMSINV = LOI.NORMALE.STANDARD.INVERSE ## Renvoie l’inverse de la distribution cumulée normale standard.
+PEARSON = PEARSON ## Renvoie le coefficient de corrélation d’échantillonnage de Pearson.
+PERCENTILE = CENTILE ## Renvoie le k-ième centile des valeurs d’une plage.
+PERCENTRANK = RANG.POURCENTAGE ## Renvoie le rang en pourcentage d’une valeur d’une série de données.
+PERMUT = PERMUTATION ## Renvoie le nombre de permutations pour un nombre donné d’objets.
+POISSON = LOI.POISSON ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Poisson.
+PROB = PROBABILITE ## Renvoie la probabilité que des valeurs d’une plage soient comprises entre deux limites.
+QUARTILE = QUARTILE ## Renvoie le quartile d’une série de données.
+RANK = RANG ## Renvoie le rang d’un nombre contenu dans une liste.
+RSQ = COEFFICIENT.DETERMINATION ## Renvoie la valeur du coefficient de détermination R^2 d’une régression linéaire.
+SKEW = COEFFICIENT.ASYMETRIE ## Renvoie l’asymétrie d’une distribution.
+SLOPE = PENTE ## Renvoie la pente d’une droite de régression linéaire.
+SMALL = PETITE.VALEUR ## Renvoie la k-ième plus petite valeur d’une série de données.
+STANDARDIZE = CENTREE.REDUITE ## Renvoie une valeur centrée réduite.
+STDEV = ECARTYPE ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population.
+STDEVA = STDEVA ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques inclus.
+STDEVP = ECARTYPEP ## Calcule l’écart type d’une population à partir de la population entière.
+STDEVPA = STDEVPA ## Calcule l’écart type d’une population à partir de l’ensemble de la population, nombres, texte et valeurs logiques inclus.
+STEYX = ERREUR.TYPE.XY ## Renvoie l’erreur type de la valeur y prévue pour chaque x de la régression.
+TDIST = LOI.STUDENT ## Renvoie la probabilité d’une variable aléatoire suivant une loi T de Student.
+TINV = LOI.STUDENT.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi T de Student.
+TREND = TENDANCE ## Renvoie des valeurs par rapport à une tendance linéaire.
+TRIMMEAN = MOYENNE.REDUITE ## Renvoie la moyenne de l’intérieur d’une série de données.
+TTEST = TEST.STUDENT ## Renvoie la probabilité associée à un test T de Student.
+VAR = VAR ## Calcule la variance sur la base d’un échantillon.
+VARA = VARA ## Estime la variance d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques incluses.
+VARP = VAR.P ## Calcule la variance sur la base de l’ensemble de la population.
+VARPA = VARPA ## Calcule la variance d’une population en se basant sur la population entière, nombres, texte et valeurs logiques inclus.
+WEIBULL = LOI.WEIBULL ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Weibull.
+ZTEST = TEST.Z ## Renvoie la valeur de probabilité unilatérale d’un test z.
+
+
+##
+## Text functions Fonctions de texte
+##
+ASC = ASC ## Change les caractères anglais ou katakana à pleine chasse (codés sur deux octets) à l’intérieur d’une chaîne de caractères en caractères à demi-chasse (codés sur un octet).
+BAHTTEXT = BAHTTEXT ## Convertit un nombre en texte en utilisant le format monétaire ß (baht).
+CHAR = CAR ## Renvoie le caractère spécifié par le code numérique.
+CLEAN = EPURAGE ## Supprime tous les caractères de contrôle du texte.
+CODE = CODE ## Renvoie le numéro de code du premier caractère du texte.
+CONCATENATE = CONCATENER ## Assemble plusieurs éléments textuels de façon à n’en former qu’un seul.
+DOLLAR = EURO ## Convertit un nombre en texte en utilisant le format monétaire € (euro).
+EXACT = EXACT ## Vérifie si deux valeurs de texte sont identiques.
+FIND = TROUVE ## Trouve un valeur textuelle dans une autre, en respectant la casse.
+FINDB = TROUVERB ## Trouve un valeur textuelle dans une autre, en respectant la casse.
+FIXED = CTXT ## Convertit un nombre au format texte avec un nombre de décimales spécifié.
+JIS = JIS ## Change les caractères anglais ou katakana à demi-chasse (codés sur un octet) à l’intérieur d’une chaîne de caractères en caractères à à pleine chasse (codés sur deux octets).
+LEFT = GAUCHE ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères.
+LEFTB = GAUCHEB ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères.
+LEN = NBCAR ## Renvoie le nombre de caractères contenus dans une chaîne de texte.
+LENB = LENB ## Renvoie le nombre de caractères contenus dans une chaîne de texte.
+LOWER = MINUSCULE ## Convertit le texte en minuscules.
+MID = STXT ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez.
+MIDB = STXTB ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez.
+PHONETIC = PHONETIQUE ## Extrait les caractères phonétiques (furigana) d’une chaîne de texte.
+PROPER = NOMPROPRE ## Met en majuscules la première lettre de chaque mot dans une chaîne textuelle.
+REPLACE = REMPLACER ## Remplace des caractères dans un texte.
+REPLACEB = REMPLACERB ## Remplace des caractères dans un texte.
+REPT = REPT ## Répète un texte un certain nombre de fois.
+RIGHT = DROITE ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères.
+RIGHTB = DROITEB ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères.
+SEARCH = CHERCHE ## Trouve un texte dans un autre texte (sans respecter la casse).
+SEARCHB = CHERCHERB ## Trouve un texte dans un autre texte (sans respecter la casse).
+SUBSTITUTE = SUBSTITUE ## Remplace l’ancien texte d’une chaîne de caractères par un nouveau.
+T = T ## Convertit ses arguments en texte.
+TEXT = TEXTE ## Convertit un nombre au format texte.
+TRIM = SUPPRESPACE ## Supprime les espaces du texte.
+UPPER = MAJUSCULE ## Convertit le texte en majuscules.
+VALUE = CNUM ## Convertit un argument textuel en nombre
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config
new file mode 100644
index 0000000..91c10bf
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config
@@ -0,0 +1,23 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = Ft
+
+
+##
+## Excel Error Codes (For future use)
+##
+NULL = #NULLA!
+DIV0 = #ZÉRÓOSZTÓ!
+VALUE = #ÉRTÉK!
+REF = #HIV!
+NAME = #NÉV?
+NUM = #SZÁM!
+NA = #HIÁNYZIK
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions
new file mode 100644
index 0000000..b75a8e9
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Bővítmények és automatizálási függvények
+##
+GETPIVOTDATA = KIMUTATÁSADATOT.VESZ ## A kimutatásokban tárolt adatok visszaadására használható.
+
+
+##
+## Cube functions Kockafüggvények
+##
+CUBEKPIMEMBER = KOCKA.FŐTELJMUT ## Egy fő teljesítménymutató (KPI) nevét, tulajdonságát és mértékegységét adja eredményül, a nevet és a tulajdonságot megjeleníti a cellában. A KPI-k számszerűsíthető mérési lehetőséget jelentenek – ilyen mutató például a havi bruttó nyereség vagy az egy alkalmazottra jutó negyedéves forgalom –, egy szervezet teljesítményének nyomonkövetésére használhatók.
+CUBEMEMBER = KOCKA.TAG ## Kockahierachia tagját vagy rekordját adja eredményül. Ellenőrizhető vele, hogy szerepel-e a kockában az adott tag vagy rekord.
+CUBEMEMBERPROPERTY = KOCKA.TAG.TUL ## A kocka egyik tagtulajdonságának értékét adja eredményül. Használatával ellenőrizhető, hogy szerepel-e egy tagnév a kockában, eredménye pedig az erre a tagra vonatkozó, megadott tulajdonság.
+CUBERANKEDMEMBER = KOCKA.HALM.ELEM ## Egy halmaz rangsor szerinti n-edik tagját adja eredményül. Használatával egy halmaz egy vagy több elemét kaphatja meg, például a legnagyobb teljesítményű üzletkötőt vagy a 10 legjobb tanulót.
+CUBESET = KOCKA.HALM ## Számított tagok vagy rekordok halmazát adja eredményül, ehhez egy beállított kifejezést elküld a kiszolgálón található kockának, majd ezt a halmazt adja vissza a Microsoft Office Excel alkalmazásnak.
+CUBESETCOUNT = KOCKA.HALM.DB ## Egy halmaz elemszámát adja eredményül.
+CUBEVALUE = KOCKA.ÉRTÉK ## Kockából összesített értéket ad eredményül.
+
+
+##
+## Database functions Adatbázis-kezelő függvények
+##
+DAVERAGE = AB.ÁTLAG ## A kijelölt adatbáziselemek átlagát számítja ki.
+DCOUNT = AB.DARAB ## Megszámolja, hogy az adatbázisban hány cella tartalmaz számokat.
+DCOUNTA = AB.DARAB2 ## Megszámolja az adatbázisban lévő nem üres cellákat.
+DGET = AB.MEZŐ ## Egy adatbázisból egyetlen olyan rekordot ad vissza, amely megfelel a megadott feltételeknek.
+DMAX = AB.MAX ## A kiválasztott adatbáziselemek közül a legnagyobb értéket adja eredményül.
+DMIN = AB.MIN ## A kijelölt adatbáziselemek közül a legkisebb értéket adja eredményül.
+DPRODUCT = AB.SZORZAT ## Az adatbázis megadott feltételeknek eleget tevő rekordjaira összeszorozza a megadott mezőben található számértékeket, és eredményül ezt a szorzatot adja.
+DSTDEV = AB.SZÓRÁS ## A kijelölt adatbáziselemek egy mintája alapján megbecsüli a szórást.
+DSTDEVP = AB.SZÓRÁS2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórást.
+DSUM = AB.SZUM ## Összeadja a feltételnek megfelelő adatbázisrekordok mezőoszlopában a számokat.
+DVAR = AB.VAR ## A kijelölt adatbáziselemek mintája alapján becslést ad a szórásnégyzetre.
+DVARP = AB.VAR2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórásnégyzetet.
+
+
+##
+## Date and time functions Dátumfüggvények
+##
+DATE = DÁTUM ## Adott dátum dátumértékét adja eredményül.
+DATEVALUE = DÁTUMÉRTÉK ## Szövegként megadott dátumot dátumértékké alakít át.
+DAY = NAP ## Dátumértéket a hónap egy napjává (0-31) alakít.
+DAYS360 = NAP360 ## Két dátum közé eső napok számát számítja ki a 360 napos év alapján.
+EDATE = EDATE ## Adott dátumnál adott számú hónappal korábbi vagy későbbi dátum dátumértékét adja eredményül.
+EOMONTH = EOMONTH ## Adott dátumnál adott számú hónappal korábbi vagy későbbi hónap utolsó napjának dátumértékét adja eredményül.
+HOUR = ÓRA ## Időértéket órákká alakít.
+MINUTE = PERC ## Időértéket percekké alakít.
+MONTH = HÓNAP ## Időértéket hónapokká alakít.
+NETWORKDAYS = NETWORKDAYS ## Két dátum között a teljes munkanapok számát adja meg.
+NOW = MOST ## A napi dátum dátumértékét és a pontos idő időértékét adja eredményül.
+SECOND = MPERC ## Időértéket másodpercekké alakít át.
+TIME = IDŐ ## Adott időpont időértékét adja meg.
+TIMEVALUE = IDŐÉRTÉK ## Szövegként megadott időpontot időértékké alakít át.
+TODAY = MA ## A napi dátum dátumértékét adja eredményül.
+WEEKDAY = HÉT.NAPJA ## Dátumértéket a hét napjává alakítja át.
+WEEKNUM = WEEKNUM ## Visszatérési értéke egy szám, amely azt mutatja meg, hogy a megadott dátum az év hányadik hetére esik.
+WORKDAY = WORKDAY ## Adott dátumnál adott munkanappal korábbi vagy későbbi dátum dátumértékét adja eredményül.
+YEAR = ÉV ## Sorszámot évvé alakít át.
+YEARFRAC = YEARFRAC ## Az adott dátumok közötti teljes napok számát törtévként adja meg.
+
+
+##
+## Engineering functions Mérnöki függvények
+##
+BESSELI = BESSELI ## Az In(x) módosított Bessel-függvény értékét adja eredményül.
+BESSELJ = BESSELJ ## A Jn(x) Bessel-függvény értékét adja eredményül.
+BESSELK = BESSELK ## A Kn(x) módosított Bessel-függvény értékét adja eredményül.
+BESSELY = BESSELY ## Az Yn(x) módosított Bessel-függvény értékét adja eredményül.
+BIN2DEC = BIN2DEC ## Bináris számot decimálissá alakít át.
+BIN2HEX = BIN2HEX ## Bináris számot hexadecimálissá alakít át.
+BIN2OCT = BIN2OCT ## Bináris számot oktálissá alakít át.
+COMPLEX = COMPLEX ## Valós és képzetes részből komplex számot képez.
+CONVERT = CONVERT ## Mértékegységeket vált át.
+DEC2BIN = DEC2BIN ## Decimális számot binárissá alakít át.
+DEC2HEX = DEC2HEX ## Decimális számot hexadecimálissá alakít át.
+DEC2OCT = DEC2OCT ## Decimális számot oktálissá alakít át.
+DELTA = DELTA ## Azt vizsgálja, hogy két érték egyenlő-e.
+ERF = ERF ## A hibafüggvény értékét adja eredményül.
+ERFC = ERFC ## A kiegészített hibafüggvény értékét adja eredményül.
+GESTEP = GESTEP ## Azt vizsgálja, hogy egy szám nagyobb-e adott küszöbértéknél.
+HEX2BIN = HEX2BIN ## Hexadecimális számot binárissá alakít át.
+HEX2DEC = HEX2DEC ## Hexadecimális számot decimálissá alakít át.
+HEX2OCT = HEX2OCT ## Hexadecimális számot oktálissá alakít át.
+IMABS = IMABS ## Komplex szám abszolút értékét (modulusát) adja eredményül.
+IMAGINARY = IMAGINARY ## Komplex szám képzetes részét adja eredményül.
+IMARGUMENT = IMARGUMENT ## A komplex szám radiánban kifejezett théta argumentumát adja eredményül.
+IMCONJUGATE = IMCONJUGATE ## Komplex szám komplex konjugáltját adja eredményül.
+IMCOS = IMCOS ## Komplex szám koszinuszát adja eredményül.
+IMDIV = IMDIV ## Két komplex szám hányadosát adja eredményül.
+IMEXP = IMEXP ## Az e szám komplex kitevőjű hatványát adja eredményül.
+IMLN = IMLN ## Komplex szám természetes logaritmusát adja eredményül.
+IMLOG10 = IMLOG10 ## Komplex szám tízes alapú logaritmusát adja eredményül.
+IMLOG2 = IMLOG2 ## Komplex szám kettes alapú logaritmusát adja eredményül.
+IMPOWER = IMPOWER ## Komplex szám hatványát adja eredményül.
+IMPRODUCT = IMPRODUCT ## Komplex számok szorzatát adja eredményül.
+IMREAL = IMREAL ## Komplex szám valós részét adja eredményül.
+IMSIN = IMSIN ## Komplex szám szinuszát adja eredményül.
+IMSQRT = IMSQRT ## Komplex szám négyzetgyökét adja eredményül.
+IMSUB = IMSUB ## Két komplex szám különbségét adja eredményül.
+IMSUM = IMSUM ## Komplex számok összegét adja eredményül.
+OCT2BIN = OCT2BIN ## Oktális számot binárissá alakít át.
+OCT2DEC = OCT2DEC ## Oktális számot decimálissá alakít át.
+OCT2HEX = OCT2HEX ## Oktális számot hexadecimálissá alakít át.
+
+
+##
+## Financial functions Pénzügyi függvények
+##
+ACCRINT = ACCRINT ## Periodikusan kamatozó értékpapír felszaporodott kamatát adja eredményül.
+ACCRINTM = ACCRINTM ## Lejáratkor kamatozó értékpapír felszaporodott kamatát adja eredményül.
+AMORDEGRC = AMORDEGRC ## Állóeszköz lineáris értékcsökkenését adja meg az egyes könyvelési időszakokra vonatkozóan.
+AMORLINC = AMORLINC ## Az egyes könyvelési időszakokban az értékcsökkenést adja meg.
+COUPDAYBS = COUPDAYBS ## A szelvényidőszak kezdetétől a kifizetés időpontjáig eltelt napokat adja vissza.
+COUPDAYS = COUPDAYS ## A kifizetés időpontját magában foglaló szelvényperiódus hosszát adja meg napokban.
+COUPDAYSNC = COUPDAYSNC ## A kifizetés időpontja és a legközelebbi szelvénydátum közötti napok számát adja meg.
+COUPNCD = COUPNCD ## A kifizetést követő legelső szelvénydátumot adja eredményül.
+COUPNUM = COUPNUM ## A kifizetés és a lejárat időpontja között kifizetendő szelvények számát adja eredményül.
+COUPPCD = COUPPCD ## A kifizetés előtti utolsó szelvénydátumot adja eredményül.
+CUMIPMT = CUMIPMT ## Két fizetési időszak között kifizetett kamat halmozott értékét adja eredményül.
+CUMPRINC = CUMPRINC ## Két fizetési időszak között kifizetett részletek halmozott (kamatot nem tartalmazó) értékét adja eredményül.
+DB = KCS2 ## Eszköz adott időszak alatti értékcsökkenését számítja ki a lineáris leírási modell alkalmazásával.
+DDB = KCSA ## Eszköz értékcsökkenését számítja ki adott időszakra vonatkozóan a progresszív vagy egyéb megadott leírási modell alkalmazásával.
+DISC = DISC ## Értékpapír leszámítolási kamatlábát adja eredményül.
+DOLLARDE = DOLLARDE ## Egy közönséges törtként megadott számot tizedes törtté alakít át.
+DOLLARFR = DOLLARFR ## Tizedes törtként megadott számot közönséges törtté alakít át.
+DURATION = DURATION ## Periodikus kamatfizetésű értékpapír éves kamatérzékenységét adja eredményül.
+EFFECT = EFFECT ## Az éves tényleges kamatláb értékét adja eredményül.
+FV = JBÉ ## Befektetés jövőbeli értékét számítja ki.
+FVSCHEDULE = FVSCHEDULE ## A kezdőtőke adott kamatlábak szerint megnövelt jövőbeli értékét adja eredményül.
+INTRATE = INTRATE ## A lejáratig teljesen lekötött értékpapír kamatrátáját adja eredményül.
+IPMT = RRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra.
+IRR = BMR ## A befektetés belső megtérülési rátáját számítja ki pénzáramláshoz.
+ISPMT = LRÉSZLETKAMAT ## A befektetés adott időszakára fizetett kamatot számítja ki.
+MDURATION = MDURATION ## Egy 100 Ft névértékű értékpapír Macauley-féle módosított kamatérzékenységét adja eredményül.
+MIRR = MEGTÉRÜLÉS ## A befektetés belső megtérülési rátáját számítja ki a költségek és a bevételek különböző kamatlába mellett.
+NOMINAL = NOMINAL ## Az éves névleges kamatláb értékét adja eredményül.
+NPER = PER.SZÁM ## A törlesztési időszakok számát adja meg.
+NPV = NMÉ ## Befektetéshez kapcsolódó pénzáramlás nettó jelenértékét számítja ki ismert pénzáramlás és kamatláb mellett.
+ODDFPRICE = ODDFPRICE ## Egy 100 Ft névértékű, a futamidő elején töredék-időszakos értékpapír árát adja eredményül.
+ODDFYIELD = ODDFYIELD ## A futamidő elején töredék-időszakos értékpapír hozamát adja eredményül.
+ODDLPRICE = ODDLPRICE ## Egy 100 Ft névértékű, a futamidő végén töredék-időszakos értékpapír árát adja eredményül.
+ODDLYIELD = ODDLYIELD ## A futamidő végén töredék-időszakos értékpapír hozamát adja eredményül.
+PMT = RÉSZLET ## A törlesztési időszakra vonatkozó törlesztési összeget számítja ki.
+PPMT = PRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra.
+PRICE = PRICE ## Egy 100 Ft névértékű, periodikusan kamatozó értékpapír árát adja eredményül.
+PRICEDISC = PRICEDISC ## Egy 100 Ft névértékű leszámítolt értékpapír árát adja eredményül.
+PRICEMAT = PRICEMAT ## Egy 100 Ft névértékű, a lejáratkor kamatozó értékpapír árát adja eredményül.
+PV = MÉ ## Befektetés jelenlegi értékét számítja ki.
+RATE = RÁTA ## Egy törlesztési időszakban az egy időszakra eső kamatláb nagyságát számítja ki.
+RECEIVED = RECEIVED ## A lejáratig teljesen lekötött értékpapír lejáratakor kapott összegét adja eredményül.
+SLN = LCSA ## Tárgyi eszköz egy időszakra eső amortizációját adja meg bruttó érték szerinti lineáris leírási kulcsot alkalmazva.
+SYD = SYD ## Tárgyi eszköz értékcsökkenését számítja ki adott időszakra az évek számjegyösszegével dolgozó módszer alapján.
+TBILLEQ = TBILLEQ ## Kincstárjegy kötvény-egyenértékű hozamát adja eredményül.
+TBILLPRICE = TBILLPRICE ## Egy 100 Ft névértékű kincstárjegy árát adja eredményül.
+TBILLYIELD = TBILLYIELD ## Kincstárjegy hozamát adja eredményül.
+VDB = ÉCSRI ## Tárgyi eszköz amortizációját számítja ki megadott vagy részidőszakra a csökkenő egyenleg módszerének alkalmazásával.
+XIRR = XIRR ## Ütemezett készpénzforgalom (cash flow) belső megtérülési kamatrátáját adja eredményül.
+XNPV = XNPV ## Ütemezett készpénzforgalom (cash flow) nettó jelenlegi értékét adja eredményül.
+YIELD = YIELD ## Periodikusan kamatozó értékpapír hozamát adja eredményül.
+YIELDDISC = YIELDDISC ## Leszámítolt értékpapír (például kincstárjegy) éves hozamát adja eredményül.
+YIELDMAT = YIELDMAT ## Lejáratkor kamatozó értékpapír éves hozamát adja eredményül.
+
+
+##
+## Information functions Információs függvények
+##
+CELL = CELLA ## Egy cella formátumára, elhelyezkedésére vagy tartalmára vonatkozó adatokat ad eredményül.
+ERROR.TYPE = HIBA.TÍPUS ## Egy hibatípushoz tartozó számot ad eredményül.
+INFO = INFÓ ## A rendszer- és munkakörnyezet pillanatnyi állapotáról ad felvilágosítást.
+ISBLANK = ÜRES ## Eredménye IGAZ, ha az érték üres.
+ISERR = HIBA ## Eredménye IGAZ, ha az érték valamelyik hibaérték a #HIÁNYZIK kivételével.
+ISERROR = HIBÁS ## Eredménye IGAZ, ha az érték valamelyik hibaérték.
+ISEVEN = ISEVEN ## Eredménye IGAZ, ha argumentuma páros szám.
+ISLOGICAL = LOGIKAI ## Eredménye IGAZ, ha az érték logikai érték.
+ISNA = NINCS ## Eredménye IGAZ, ha az érték a #HIÁNYZIK hibaérték.
+ISNONTEXT = NEM.SZÖVEG ## Eredménye IGAZ, ha az érték nem szöveg.
+ISNUMBER = SZÁM ## Eredménye IGAZ, ha az érték szám.
+ISODD = ISODD ## Eredménye IGAZ, ha argumentuma páratlan szám.
+ISREF = HIVATKOZÁS ## Eredménye IGAZ, ha az érték hivatkozás.
+ISTEXT = SZÖVEG.E ## Eredménye IGAZ, ha az érték szöveg.
+N = N ## Argumentumának értékét számmá alakítja.
+NA = HIÁNYZIK ## Eredménye a #HIÁNYZIK hibaérték.
+TYPE = TÍPUS ## Érték adattípusának azonosítószámát adja eredményül.
+
+
+##
+## Logical functions Logikai függvények
+##
+AND = ÉS ## Eredménye IGAZ, ha minden argumentuma IGAZ.
+FALSE = HAMIS ## A HAMIS logikai értéket adja eredményül.
+IF = HA ## Logikai vizsgálatot hajt végre.
+IFERROR = HAHIBA ## A megadott értéket adja vissza, ha egy képlet hibához vezet; más esetben a képlet értékét adja eredményül.
+NOT = NEM ## Argumentuma értékének ellentettjét adja eredményül.
+OR = VAGY ## Eredménye IGAZ, ha bármely argumentuma IGAZ.
+TRUE = IGAZ ## Az IGAZ logikai értéket adja eredményül.
+
+
+##
+## Lookup and reference functions Keresési és hivatkozási függvények
+##
+ADDRESS = CÍM ## A munkalap egy cellájára való hivatkozást adja szövegként eredményül.
+AREAS = TERÜLET ## Hivatkozásban a területek számát adja eredményül.
+CHOOSE = VÁLASZT ## Értékek listájából választ ki egy elemet.
+COLUMN = OSZLOP ## Egy hivatkozás oszlopszámát adja eredményül.
+COLUMNS = OSZLOPOK ## A hivatkozásban található oszlopok számát adja eredményül.
+HLOOKUP = VKERES ## A megadott tömb felső sorában adott értékű elemet keres, és a megtalált elem oszlopából adott sorban elhelyezkedő értékkel tér vissza.
+HYPERLINK = HIPERHIVATKOZÁS ## Hálózati kiszolgálón, intraneten vagy az interneten tárolt dokumentumot megnyitó parancsikont vagy hivatkozást hoz létre.
+INDEX = INDEX ## Tömb- vagy hivatkozás indexszel megadott értékét adja vissza.
+INDIRECT = INDIREKT ## Szöveg megadott hivatkozást ad eredményül.
+LOOKUP = KERES ## Vektorban vagy tömbben keres meg értékeket.
+MATCH = HOL.VAN ## Hivatkozásban vagy tömbben értékeket keres.
+OFFSET = OFSZET ## Hivatkozás egy másik hivatkozástól számított távolságát adja meg.
+ROW = SOR ## Egy hivatkozás sorának számát adja meg.
+ROWS = SOROK ## Egy hivatkozás sorainak számát adja meg.
+RTD = RTD ## Valós idejű adatokat keres vissza a COM automatizmust (automatizálás: Egy alkalmazás objektumaival való munka másik alkalmazásból vagy fejlesztőeszközből. A korábban OLE automatizmusnak nevezett automatizálás iparági szabvány, a Component Object Model (COM) szolgáltatása.) támogató programból.
+TRANSPOSE = TRANSZPONÁLÁS ## Egy tömb transzponáltját adja eredményül.
+VLOOKUP = FKERES ## A megadott tömb bal szélső oszlopában megkeres egy értéket, majd annak sora és a megadott oszlop metszéspontjában levő értéked adja eredményül.
+
+
+##
+## Math and trigonometry functions Matematikai és trigonometrikus függvények
+##
+ABS = ABS ## Egy szám abszolút értékét adja eredményül.
+ACOS = ARCCOS ## Egy szám arkusz koszinuszát számítja ki.
+ACOSH = ACOSH ## Egy szám inverz koszinusz hiperbolikuszát számítja ki.
+ASIN = ARCSIN ## Egy szám arkusz szinuszát számítja ki.
+ASINH = ASINH ## Egy szám inverz szinusz hiperbolikuszát számítja ki.
+ATAN = ARCTAN ## Egy szám arkusz tangensét számítja ki.
+ATAN2 = ARCTAN2 ## X és y koordináták alapján számítja ki az arkusz tangens értéket.
+ATANH = ATANH ## A szám inverz tangens hiperbolikuszát számítja ki.
+CEILING = PLAFON ## Egy számot a legközelebbi egészre vagy a pontosságként megadott érték legközelebb eső többszörösére kerekít.
+COMBIN = KOMBINÁCIÓK ## Adott számú objektum összes lehetséges kombinációinak számát számítja ki.
+COS = COS ## Egy szám koszinuszát számítja ki.
+COSH = COSH ## Egy szám koszinusz hiperbolikuszát számítja ki.
+DEGREES = FOK ## Radiánt fokká alakít át.
+EVEN = PÁROS ## Egy számot a legközelebbi páros egész számra kerekít.
+EXP = KITEVŐ ## Az e adott kitevőjű hatványát adja eredményül.
+FACT = FAKT ## Egy szám faktoriálisát számítja ki.
+FACTDOUBLE = FACTDOUBLE ## Egy szám dupla faktoriálisát adja eredményül.
+FLOOR = PADLÓ ## Egy számot lefelé, a nulla felé kerekít.
+GCD = GCD ## A legnagyobb közös osztót adja eredményül.
+INT = INT ## Egy számot lefelé kerekít a legközelebbi egészre.
+LCM = LCM ## A legkisebb közös többszöröst adja eredményül.
+LN = LN ## Egy szám természetes logaritmusát számítja ki.
+LOG = LOG ## Egy szám adott alapú logaritmusát számítja ki.
+LOG10 = LOG10 ## Egy szám 10-es alapú logaritmusát számítja ki.
+MDETERM = MDETERM ## Egy tömb mátrix-determinánsát számítja ki.
+MINVERSE = INVERZ.MÁTRIX ## Egy tömb mátrix inverzét adja eredményül.
+MMULT = MSZORZAT ## Két tömb mátrix-szorzatát adja meg.
+MOD = MARADÉK ## Egy szám osztási maradékát adja eredményül.
+MROUND = MROUND ## A kívánt többszörösére kerekített értéket ad eredményül.
+MULTINOMIAL = MULTINOMIAL ## Számhalmaz multinomiálisát adja eredményül.
+ODD = PÁRATLAN ## Egy számot a legközelebbi páratlan számra kerekít.
+PI = PI ## A pi matematikai állandót adja vissza.
+POWER = HATVÁNY ## Egy szám adott kitevőjű hatványát számítja ki.
+PRODUCT = SZORZAT ## Argumentumai szorzatát számítja ki.
+QUOTIENT = QUOTIENT ## Egy hányados egész részét adja eredményül.
+RADIANS = RADIÁN ## Fokot radiánná alakít át.
+RAND = VÉL ## Egy 0 és 1 közötti véletlen számot ad eredményül.
+RANDBETWEEN = RANDBETWEEN ## Megadott számok közé eső véletlen számot állít elő.
+ROMAN = RÓMAI ## Egy számot római számokkal kifejezve szövegként ad eredményül.
+ROUND = KEREKÍTÉS ## Egy számot adott számú számjegyre kerekít.
+ROUNDDOWN = KEREKÍTÉS.LE ## Egy számot lefelé, a nulla felé kerekít.
+ROUNDUP = KEREKÍTÉS.FEL ## Egy számot felfelé, a nullától távolabbra kerekít.
+SERIESSUM = SERIESSUM ## Hatványsor összegét adja eredményül.
+SIGN = ELŐJEL ## Egy szám előjelét adja meg.
+SIN = SIN ## Egy szög szinuszát számítja ki.
+SINH = SINH ## Egy szám szinusz hiperbolikuszát számítja ki.
+SQRT = GYÖK ## Egy szám pozitív négyzetgyökét számítja ki.
+SQRTPI = SQRTPI ## A (szám*pi) négyzetgyökét adja eredményül.
+SUBTOTAL = RÉSZÖSSZEG ## Lista vagy adatbázis részösszegét adja eredményül.
+SUM = SZUM ## Összeadja az argumentumlistájában lévő számokat.
+SUMIF = SZUMHA ## A megadott feltételeknek eleget tevő cellákban található értékeket adja össze.
+SUMIFS = SZUMHATÖBB ## Több megadott feltételnek eleget tévő tartománycellák összegét adja eredményül.
+SUMPRODUCT = SZORZATÖSSZEG ## A megfelelő tömbelemek szorzatának összegét számítja ki.
+SUMSQ = NÉGYZETÖSSZEG ## Argumentumai négyzetének összegét számítja ki.
+SUMX2MY2 = SZUMX2BŐLY2 ## Két tömb megfelelő elemei négyzetének különbségét összegzi.
+SUMX2PY2 = SZUMX2MEGY2 ## Két tömb megfelelő elemei négyzetének összegét összegzi.
+SUMXMY2 = SZUMXBŐLY2 ## Két tömb megfelelő elemei különbségének négyzetösszegét számítja ki.
+TAN = TAN ## Egy szám tangensét számítja ki.
+TANH = TANH ## Egy szám tangens hiperbolikuszát számítja ki.
+TRUNC = CSONK ## Egy számot egésszé csonkít.
+
+
+##
+## Statistical functions Statisztikai függvények
+##
+AVEDEV = ÁTL.ELTÉRÉS ## Az adatpontoknak átlaguktól való átlagos abszolút eltérését számítja ki.
+AVERAGE = ÁTLAG ## Argumentumai átlagát számítja ki.
+AVERAGEA = ÁTLAGA ## Argumentumai átlagát számítja ki (beleértve a számokat, szöveget és logikai értékeket).
+AVERAGEIF = ÁTLAGHA ## A megadott feltételnek eleget tévő tartomány celláinak átlagát (számtani közepét) adja eredményül.
+AVERAGEIFS = ÁTLAGHATÖBB ## A megadott feltételeknek eleget tévő cellák átlagát (számtani közepét) adja eredményül.
+BETADIST = BÉTA.ELOSZLÁS ## A béta-eloszlás függvényt számítja ki.
+BETAINV = INVERZ.BÉTA ## Adott béta-eloszláshoz kiszámítja a béta eloszlásfüggvény inverzét.
+BINOMDIST = BINOM.ELOSZLÁS ## A diszkrét binomiális eloszlás valószínűségértékét számítja ki.
+CHIDIST = KHI.ELOSZLÁS ## A khi-négyzet-eloszlás egyszélű valószínűségértékét számítja ki.
+CHIINV = INVERZ.KHI ## A khi-négyzet-eloszlás egyszélű valószínűségértékének inverzét számítja ki.
+CHITEST = KHI.PRÓBA ## Függetlenségvizsgálatot hajt végre.
+CONFIDENCE = MEGBÍZHATÓSÁG ## Egy statisztikai sokaság várható értékének megbízhatósági intervallumát adja eredményül.
+CORREL = KORREL ## Két adathalmaz korrelációs együtthatóját számítja ki.
+COUNT = DARAB ## Megszámolja, hogy argumentumlistájában hány szám található.
+COUNTA = DARAB2 ## Megszámolja, hogy argumentumlistájában hány érték található.
+COUNTBLANK = DARABÜRES ## Egy tartományban összeszámolja az üres cellákat.
+COUNTIF = DARABTELI ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek a megadott feltételnek.
+COUNTIFS = DARABHATÖBB ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek több feltételnek.
+COVAR = KOVAR ## A kovarianciát, azaz a páronkénti eltérések szorzatának átlagát számítja ki.
+CRITBINOM = KRITBINOM ## Azt a legkisebb számot adja eredményül, amelyre a binomiális eloszlásfüggvény értéke nem kisebb egy adott határértéknél.
+DEVSQ = SQ ## Az átlagtól való eltérések négyzetének összegét számítja ki.
+EXPONDIST = EXP.ELOSZLÁS ## Az exponenciális eloszlás értékét számítja ki.
+FDIST = F.ELOSZLÁS ## Az F-eloszlás értékét számítja ki.
+FINV = INVERZ.F ## Az F-eloszlás inverzének értékét számítja ki.
+FISHER = FISHER ## Fisher-transzformációt hajt végre.
+FISHERINV = INVERZ.FISHER ## A Fisher-transzformáció inverzét hajtja végre.
+FORECAST = ELŐREJELZÉS ## Az ismert értékek alapján lineáris regresszióval becsült értéket ad eredményül.
+FREQUENCY = GYAKORISÁG ## A gyakorisági vagy empirikus eloszlás értékét függőleges tömbként adja eredményül.
+FTEST = F.PRÓBA ## Az F-próba értékét adja eredményül.
+GAMMADIST = GAMMA.ELOSZLÁS ## A gamma-eloszlás értékét számítja ki.
+GAMMAINV = INVERZ.GAMMA ## A gamma-eloszlás eloszlásfüggvénye inverzének értékét számítja ki.
+GAMMALN = GAMMALN ## A gamma-függvény természetes logaritmusát számítja ki.
+GEOMEAN = MÉRTANI.KÖZÉP ## Argumentumai mértani középértékét számítja ki.
+GROWTH = NÖV ## Exponenciális regresszió alapján ad becslést.
+HARMEAN = HARM.KÖZÉP ## Argumentumai harmonikus átlagát számítja ki.
+HYPGEOMDIST = HIPERGEOM.ELOSZLÁS ## A hipergeometriai eloszlás értékét számítja ki.
+INTERCEPT = METSZ ## A regressziós egyenes y tengellyel való metszéspontját határozza meg.
+KURT = CSÚCSOSSÁG ## Egy adathalmaz csúcsosságát számítja ki.
+LARGE = NAGY ## Egy adathalmaz k-adik legnagyobb elemét adja eredményül.
+LINEST = LIN.ILL ## A legkisebb négyzetek módszerével az adatokra illesztett egyenes paramétereit határozza meg.
+LOGEST = LOG.ILL ## Az adatokra illesztett exponenciális görbe paramétereit határozza meg.
+LOGINV = INVERZ.LOG.ELOSZLÁS ## A lognormális eloszlás inverzét számítja ki.
+LOGNORMDIST = LOG.ELOSZLÁS ## A lognormális eloszlásfüggvény értékét számítja ki.
+MAX = MAX ## Az argumentumai között szereplő legnagyobb számot adja meg.
+MAXA = MAX2 ## Az argumentumai között szereplő legnagyobb számot adja meg (beleértve a számokat, szöveget és logikai értékeket).
+MEDIAN = MEDIÁN ## Adott számhalmaz mediánját számítja ki.
+MIN = MIN ## Az argumentumai között szereplő legkisebb számot adja meg.
+MINA = MIN2 ## Az argumentumai között szereplő legkisebb számot adja meg, beleértve a számokat, szöveget és logikai értékeket.
+MODE = MÓDUSZ ## Egy adathalmazból kiválasztja a leggyakrabban előforduló számot.
+NEGBINOMDIST = NEGBINOM.ELOSZL ## A negatív binomiális eloszlás értékét számítja ki.
+NORMDIST = NORM.ELOSZL ## A normális eloszlás értékét számítja ki.
+NORMINV = INVERZ.NORM ## A normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki.
+NORMSDIST = STNORMELOSZL ## A standard normális eloszlás eloszlásfüggvényének értékét számítja ki.
+NORMSINV = INVERZ.STNORM ## A standard normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki.
+PEARSON = PEARSON ## A Pearson-féle korrelációs együtthatót számítja ki.
+PERCENTILE = PERCENTILIS ## Egy tartományban található értékek k-adik percentilisét, azaz százalékosztályát adja eredményül.
+PERCENTRANK = SZÁZALÉKRANG ## Egy értéknek egy adathalmazon belül vett százalékos rangját (elhelyezkedését) számítja ki.
+PERMUT = VARIÁCIÓK ## Adott számú objektum k-ad osztályú ismétlés nélküli variációinak számát számítja ki.
+POISSON = POISSON ## A Poisson-eloszlás értékét számítja ki.
+PROB = VALÓSZÍNŰSÉG ## Annak valószínűségét számítja ki, hogy adott értékek két határérték közé esnek.
+QUARTILE = KVARTILIS ## Egy adathalmaz kvartilisét (negyedszintjét) számítja ki.
+RANK = SORSZÁM ## Kiszámítja, hogy egy szám hányadik egy számsorozatban.
+RSQ = RNÉGYZET ## Kiszámítja a Pearson-féle szorzatmomentum korrelációs együtthatójának négyzetét.
+SKEW = FERDESÉG ## Egy eloszlás ferdeségét határozza meg.
+SLOPE = MEREDEKSÉG ## Egy lineáris regressziós egyenes meredekségét számítja ki.
+SMALL = KICSI ## Egy adathalmaz k-adik legkisebb elemét adja meg.
+STANDARDIZE = NORMALIZÁLÁS ## Normalizált értéket ad eredményül.
+STDEV = SZÓRÁS ## Egy statisztikai sokaság mintájából kiszámítja annak szórását.
+STDEVA = SZÓRÁSA ## Egy statisztikai sokaság mintájából kiszámítja annak szórását (beleértve a számokat, szöveget és logikai értékeket).
+STDEVP = SZÓRÁSP ## Egy statisztikai sokaság egészéből kiszámítja annak szórását.
+STDEVPA = SZÓRÁSPA ## Egy statisztikai sokaság egészéből kiszámítja annak szórását (beleértve számokat, szöveget és logikai értékeket).
+STEYX = STHIBAYX ## Egy regresszió esetén az egyes x-értékek alapján meghatározott y-értékek standard hibáját számítja ki.
+TDIST = T.ELOSZLÁS ## A Student-féle t-eloszlás értékét számítja ki.
+TINV = INVERZ.T ## A Student-féle t-eloszlás inverzét számítja ki.
+TREND = TREND ## Lineáris trend értékeit számítja ki.
+TRIMMEAN = RÉSZÁTLAG ## Egy adathalmaz középső részének átlagát számítja ki.
+TTEST = T.PRÓBA ## A Student-féle t-próbához tartozó valószínűséget számítja ki.
+VAR = VAR ## Minta alapján becslést ad a varianciára.
+VARA = VARA ## Minta alapján becslést ad a varianciára (beleértve számokat, szöveget és logikai értékeket).
+VARP = VARP ## Egy statisztikai sokaság varianciáját számítja ki.
+VARPA = VARPA ## Egy statisztikai sokaság varianciáját számítja ki (beleértve számokat, szöveget és logikai értékeket).
+WEIBULL = WEIBULL ## A Weibull-féle eloszlás értékét számítja ki.
+ZTEST = Z.PRÓBA ## Az egyszélű z-próbával kapott valószínűségértéket számítja ki.
+
+
+##
+## Text functions Szövegműveletekhez használható függvények
+##
+ASC = ASC ## Szöveg teljes szélességű (kétbájtos) latin és katakana karaktereit félszélességű (egybájtos) karakterekké alakítja.
+BAHTTEXT = BAHTSZÖVEG ## Számot szöveggé alakít a ß (baht) pénznemformátum használatával.
+CHAR = KARAKTER ## A kódszámmal meghatározott karaktert adja eredményül.
+CLEAN = TISZTÍT ## A szövegből eltávolítja az összes nem nyomtatható karaktert.
+CODE = KÓD ## Karaktersorozat első karakterének numerikus kódját adja eredményül.
+CONCATENATE = ÖSSZEFŰZ ## Több szövegelemet egyetlen szöveges elemmé fűz össze.
+DOLLAR = FORINT ## Számot pénznem formátumú szöveggé alakít át.
+EXACT = AZONOS ## Megvizsgálja, hogy két érték azonos-e.
+FIND = SZÖVEG.TALÁL ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével).
+FINDB = SZÖVEG.TALÁL2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével).
+FIXED = FIX ## Számot szöveges formátumúra alakít adott számú tizedesjegyre kerekítve.
+JIS = JIS ## A félszélességű (egybájtos) latin és a katakana karaktereket teljes szélességű (kétbájtos) karakterekké alakítja.
+LEFT = BAL ## Szöveg bal szélső karaktereit adja eredményül.
+LEFTB = BAL2 ## Szöveg bal szélső karaktereit adja eredményül.
+LEN = HOSSZ ## Szöveg karakterekben mért hosszát adja eredményül.
+LENB = HOSSZ2 ## Szöveg karakterekben mért hosszát adja eredményül.
+LOWER = KISBETŰ ## Szöveget kisbetűssé alakít át.
+MID = KÖZÉP ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként.
+MIDB = KÖZÉP2 ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként.
+PHONETIC = PHONETIC ## Szöveg furigana (fonetikus) karaktereit adja vissza.
+PROPER = TNÉV ## Szöveg minden szavának kezdőbetűjét nagybetűsre cseréli.
+REPLACE = CSERE ## A szövegen belül karaktereket cserél.
+REPLACEB = CSERE2 ## A szövegen belül karaktereket cserél.
+REPT = SOKSZOR ## Megadott számú alkalommal megismétel egy szövegrészt.
+RIGHT = JOBB ## Szövegrész jobb szélső karaktereit adja eredményül.
+RIGHTB = JOBB2 ## Szövegrész jobb szélső karaktereit adja eredményül.
+SEARCH = SZÖVEG.KERES ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget).
+SEARCHB = SZÖVEG.KERES2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget).
+SUBSTITUTE = HELYETTE ## Szövegben adott karaktereket másikra cserél.
+T = T ## Argumentumát szöveggé alakítja át.
+TEXT = SZÖVEG ## Számértéket alakít át adott számformátumú szöveggé.
+TRIM = TRIM ## A szövegből eltávolítja a szóközöket.
+UPPER = NAGYBETŰS ## Szöveget nagybetűssé alakít át.
+VALUE = ÉRTÉK ## Szöveget számmá alakít át.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config
new file mode 100644
index 0000000..28d5a82
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NULLO!
+DIV0 = #DIV/0!
+VALUE = #VALORE!
+REF = #RIF!
+NAME = #NOME?
+NUM = #NUM!
+NA = #N/D
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions
new file mode 100644
index 0000000..9e9b866
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Funzioni di automazione e dei componenti aggiuntivi
+##
+GETPIVOTDATA = INFO.DATI.TAB.PIVOT ## Restituisce i dati memorizzati in un rapporto di tabella pivot
+
+
+##
+## Cube functions Funzioni cubo
+##
+CUBEKPIMEMBER = MEMBRO.KPI.CUBO ## Restituisce il nome, la proprietà e la misura di un indicatore di prestazioni chiave (KPI) e visualizza il nome e la proprietà nella cella. Un KPI è una misura quantificabile, ad esempio l'utile lordo mensile o il fatturato trimestrale dei dipendenti, utilizzata per il monitoraggio delle prestazioni di un'organizzazione.
+CUBEMEMBER = MEMBRO.CUBO ## Restituisce un membro o una tupla in una gerarchia di cubi. Consente di verificare l'esistenza del membro o della tupla nel cubo.
+CUBEMEMBERPROPERTY = PROPRIETÀ.MEMBRO.CUBO ## Restituisce il valore di una proprietà di un membro del cubo. Consente di verificare l'esistenza di un nome di membro all'interno del cubo e di restituire la proprietà specificata per tale membro.
+CUBERANKEDMEMBER = MEMBRO.CUBO.CON.RANGO ## Restituisce l'n-esimo membro o il membro ordinato di un insieme. Consente di restituire uno o più elementi in un insieme, ad esempio l'agente di vendita migliore o i primi 10 studenti.
+CUBESET = SET.CUBO ## Definisce un insieme di tuple o membri calcolati mediante l'invio di un'espressione di insieme al cubo sul server. In questo modo l'insieme viene creato e restituito a Microsoft Office Excel.
+CUBESETCOUNT = CONTA.SET.CUBO ## Restituisce il numero di elementi di un insieme.
+CUBEVALUE = VALORE.CUBO ## Restituisce un valore aggregato da un cubo.
+
+
+##
+## Database functions Funzioni di database
+##
+DAVERAGE = DB.MEDIA ## Restituisce la media di voci del database selezionate
+DCOUNT = DB.CONTA.NUMERI ## Conta le celle di un database contenenti numeri
+DCOUNTA = DB.CONTA.VALORI ## Conta le celle non vuote in un database
+DGET = DB.VALORI ## Estrae da un database un singolo record che soddisfa i criteri specificati
+DMAX = DB.MAX ## Restituisce il valore massimo dalle voci selezionate in un database
+DMIN = DB.MIN ## Restituisce il valore minimo dalle voci di un database selezionate
+DPRODUCT = DB.PRODOTTO ## Moltiplica i valori in un determinato campo di record che soddisfano i criteri del database
+DSTDEV = DB.DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione di voci di un database selezionate
+DSTDEVP = DB.DEV.ST.POP ## Calcola la deviazione standard sulla base di tutte le voci di un database selezionate
+DSUM = DB.SOMMA ## Aggiunge i numeri nel campo colonna di record del database che soddisfa determinati criteri
+DVAR = DB.VAR ## Restituisce una stima della varianza sulla base di un campione da voci di un database selezionate
+DVARP = DB.VAR.POP ## Calcola la varianza sulla base di tutte le voci di un database selezionate
+
+
+##
+## Date and time functions Funzioni data e ora
+##
+DATE = DATA ## Restituisce il numero seriale di una determinata data
+DATEVALUE = DATA.VALORE ## Converte una data sotto forma di testo in un numero seriale
+DAY = GIORNO ## Converte un numero seriale in un giorno del mese
+DAYS360 = GIORNO360 ## Calcola il numero di giorni compreso tra due date basandosi su un anno di 360 giorni
+EDATE = DATA.MESE ## Restituisce il numero seriale della data che rappresenta il numero di mesi prima o dopo la data di inizio
+EOMONTH = FINE.MESE ## Restituisce il numero seriale dell'ultimo giorno del mese, prima o dopo un determinato numero di mesi
+HOUR = ORA ## Converte un numero seriale in un'ora
+MINUTE = MINUTO ## Converte un numero seriale in un minuto
+MONTH = MESE ## Converte un numero seriale in un mese
+NETWORKDAYS = GIORNI.LAVORATIVI.TOT ## Restituisce il numero di tutti i giorni lavorativi compresi fra due date
+NOW = ADESSO ## Restituisce il numero seriale della data e dell'ora corrente
+SECOND = SECONDO ## Converte un numero seriale in un secondo
+TIME = ORARIO ## Restituisce il numero seriale di una determinata ora
+TIMEVALUE = ORARIO.VALORE ## Converte un orario in forma di testo in un numero seriale
+TODAY = OGGI ## Restituisce il numero seriale relativo alla data odierna
+WEEKDAY = GIORNO.SETTIMANA ## Converte un numero seriale in un giorno della settimana
+WEEKNUM = NUM.SETTIMANA ## Converte un numero seriale in un numero che rappresenta la posizione numerica di una settimana nell'anno
+WORKDAY = GIORNO.LAVORATIVO ## Restituisce il numero della data prima o dopo un determinato numero di giorni lavorativi
+YEAR = ANNO ## Converte un numero seriale in un anno
+YEARFRAC = FRAZIONE.ANNO ## Restituisce la frazione dell'anno che rappresenta il numero dei giorni compresi tra una data_ iniziale e una data_finale
+
+
+##
+## Engineering functions Funzioni ingegneristiche
+##
+BESSELI = BESSEL.I ## Restituisce la funzione di Bessel modificata In(x)
+BESSELJ = BESSEL.J ## Restituisce la funzione di Bessel Jn(x)
+BESSELK = BESSEL.K ## Restituisce la funzione di Bessel modificata Kn(x)
+BESSELY = BESSEL.Y ## Restituisce la funzione di Bessel Yn(x)
+BIN2DEC = BINARIO.DECIMALE ## Converte un numero binario in decimale
+BIN2HEX = BINARIO.HEX ## Converte un numero binario in esadecimale
+BIN2OCT = BINARIO.OCT ## Converte un numero binario in ottale
+COMPLEX = COMPLESSO ## Converte i coefficienti reali e immaginari in numeri complessi
+CONVERT = CONVERTI ## Converte un numero da un sistema di misura in un altro
+DEC2BIN = DECIMALE.BINARIO ## Converte un numero decimale in binario
+DEC2HEX = DECIMALE.HEX ## Converte un numero decimale in esadecimale
+DEC2OCT = DECIMALE.OCT ## Converte un numero decimale in ottale
+DELTA = DELTA ## Verifica se due valori sono uguali
+ERF = FUNZ.ERRORE ## Restituisce la funzione di errore
+ERFC = FUNZ.ERRORE.COMP ## Restituisce la funzione di errore complementare
+GESTEP = SOGLIA ## Verifica se un numero è maggiore del valore di soglia
+HEX2BIN = HEX.BINARIO ## Converte un numero esadecimale in binario
+HEX2DEC = HEX.DECIMALE ## Converte un numero esadecimale in decimale
+HEX2OCT = HEX.OCT ## Converte un numero esadecimale in ottale
+IMABS = COMP.MODULO ## Restituisce il valore assoluto (modulo) di un numero complesso
+IMAGINARY = COMP.IMMAGINARIO ## Restituisce il coefficiente immaginario di un numero complesso
+IMARGUMENT = COMP.ARGOMENTO ## Restituisce l'argomento theta, un angolo espresso in radianti
+IMCONJUGATE = COMP.CONIUGATO ## Restituisce il complesso coniugato del numero complesso
+IMCOS = COMP.COS ## Restituisce il coseno di un numero complesso
+IMDIV = COMP.DIV ## Restituisce il quoziente di due numeri complessi
+IMEXP = COMP.EXP ## Restituisce il valore esponenziale di un numero complesso
+IMLN = COMP.LN ## Restituisce il logaritmo naturale di un numero complesso
+IMLOG10 = COMP.LOG10 ## Restituisce il logaritmo in base 10 di un numero complesso
+IMLOG2 = COMP.LOG2 ## Restituisce un logaritmo in base 2 di un numero complesso
+IMPOWER = COMP.POTENZA ## Restituisce il numero complesso elevato a una potenza intera
+IMPRODUCT = COMP.PRODOTTO ## Restituisce il prodotto di numeri complessi compresi tra 2 e 29
+IMREAL = COMP.PARTE.REALE ## Restituisce il coefficiente reale di un numero complesso
+IMSIN = COMP.SEN ## Restituisce il seno di un numero complesso
+IMSQRT = COMP.RADQ ## Restituisce la radice quadrata di un numero complesso
+IMSUB = COMP.DIFF ## Restituisce la differenza fra due numeri complessi
+IMSUM = COMP.SOMMA ## Restituisce la somma di numeri complessi
+OCT2BIN = OCT.BINARIO ## Converte un numero ottale in binario
+OCT2DEC = OCT.DECIMALE ## Converte un numero ottale in decimale
+OCT2HEX = OCT.HEX ## Converte un numero ottale in esadecimale
+
+
+##
+## Financial functions Funzioni finanziarie
+##
+ACCRINT = INT.MATURATO.PER ## Restituisce l'interesse maturato di un titolo che paga interessi periodici
+ACCRINTM = INT.MATURATO.SCAD ## Restituisce l'interesse maturato di un titolo che paga interessi alla scadenza
+AMORDEGRC = AMMORT.DEGR ## Restituisce l'ammortamento per ogni periodo contabile utilizzando un coefficiente di ammortamento
+AMORLINC = AMMORT.PER ## Restituisce l'ammortamento per ogni periodo contabile
+COUPDAYBS = GIORNI.CED.INIZ.LIQ ## Restituisce il numero dei giorni che vanno dall'inizio del periodo di durata della cedola alla data di liquidazione
+COUPDAYS = GIORNI.CED ## Restituisce il numero dei giorni relativi al periodo della cedola che contiene la data di liquidazione
+COUPDAYSNC = GIORNI.CED.NUOVA ## Restituisce il numero di giorni che vanno dalla data di liquidazione alla data della cedola successiva
+COUPNCD = DATA.CED.SUCC ## Restituisce un numero che rappresenta la data della cedola successiva alla data di liquidazione
+COUPNUM = NUM.CED ## Restituisce il numero di cedole pagabili fra la data di liquidazione e la data di scadenza
+COUPPCD = DATA.CED.PREC ## Restituisce un numero che rappresenta la data della cedola precedente alla data di liquidazione
+CUMIPMT = INT.CUMUL ## Restituisce l'interesse cumulativo pagato fra due periodi
+CUMPRINC = CAP.CUM ## Restituisce il capitale cumulativo pagato per estinguere un debito fra due periodi
+DB = DB ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a quote fisse decrescenti
+DDB = AMMORT ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a doppie quote decrescenti o altri metodi specificati
+DISC = TASSO.SCONTO ## Restituisce il tasso di sconto per un titolo
+DOLLARDE = VALUTA.DEC ## Converte un prezzo valuta, espresso come frazione, in prezzo valuta, espresso come numero decimale
+DOLLARFR = VALUTA.FRAZ ## Converte un prezzo valuta, espresso come numero decimale, in prezzo valuta, espresso come frazione
+DURATION = DURATA ## Restituisce la durata annuale di un titolo con i pagamenti di interesse periodico
+EFFECT = EFFETTIVO ## Restituisce l'effettivo tasso di interesse annuo
+FV = VAL.FUT ## Restituisce il valore futuro di un investimento
+FVSCHEDULE = VAL.FUT.CAPITALE ## Restituisce il valore futuro di un capitale iniziale dopo aver applicato una serie di tassi di interesse composti
+INTRATE = TASSO.INT ## Restituisce il tasso di interesse per un titolo interamente investito
+IPMT = INTERESSI ## Restituisce il valore degli interessi per un investimento relativo a un periodo specifico
+IRR = TIR.COST ## Restituisce il tasso di rendimento interno per una serie di flussi di cassa
+ISPMT = INTERESSE.RATA ## Calcola l'interesse di un investimento pagato durante un periodo specifico
+MDURATION = DURATA.M ## Restituisce la durata Macauley modificata per un titolo con un valore presunto di € 100
+MIRR = TIR.VAR ## Restituisce il tasso di rendimento interno in cui i flussi di cassa positivi e negativi sono finanziati a tassi differenti
+NOMINAL = NOMINALE ## Restituisce il tasso di interesse nominale annuale
+NPER = NUM.RATE ## Restituisce un numero di periodi relativi a un investimento
+NPV = VAN ## Restituisce il valore attuale netto di un investimento basato su una serie di flussi di cassa periodici e sul tasso di sconto
+ODDFPRICE = PREZZO.PRIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente il primo periodo di durata irregolare
+ODDFYIELD = REND.PRIMO.IRR ## Restituisce il rendimento di un titolo avente il primo periodo di durata irregolare
+ODDLPRICE = PREZZO.ULTIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente l'ultimo periodo di durata irregolare
+ODDLYIELD = REND.ULTIMO.IRR ## Restituisce il rendimento di un titolo avente l'ultimo periodo di durata irregolare
+PMT = RATA ## Restituisce il pagamento periodico di una rendita annua
+PPMT = P.RATA ## Restituisce il pagamento sul capitale di un investimento per un dato periodo
+PRICE = PREZZO ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga interessi periodici
+PRICEDISC = PREZZO.SCONT ## Restituisce il prezzo di un titolo scontato dal valore nominale di € 100
+PRICEMAT = PREZZO.SCAD ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga gli interessi alla scadenza
+PV = VA ## Restituisce il valore attuale di un investimento
+RATE = TASSO ## Restituisce il tasso di interesse per un periodo di un'annualità
+RECEIVED = RICEV.SCAD ## Restituisce l'ammontare ricevuto alla scadenza di un titolo interamente investito
+SLN = AMMORT.COST ## Restituisce l'ammortamento a quote costanti di un bene per un singolo periodo
+SYD = AMMORT.ANNUO ## Restituisce l'ammortamento a somma degli anni di un bene per un periodo specificato
+TBILLEQ = BOT.EQUIV ## Restituisce il rendimento equivalente ad un'obbligazione per un Buono ordinario del Tesoro
+TBILLPRICE = BOT.PREZZO ## Restituisce il prezzo di un Buono del Tesoro dal valore nominale di € 100
+TBILLYIELD = BOT.REND ## Restituisce il rendimento di un Buono del Tesoro
+VDB = AMMORT.VAR ## Restituisce l'ammortamento di un bene per un periodo specificato o parziale utilizzando il metodo a doppie quote proporzionali ai valori residui
+XIRR = TIR.X ## Restituisce il tasso di rendimento interno di un impiego di flussi di cassa
+XNPV = VAN.X ## Restituisce il valore attuale netto di un impiego di flussi di cassa non necessariamente periodici
+YIELD = REND ## Restituisce il rendimento di un titolo che frutta interessi periodici
+YIELDDISC = REND.TITOLI.SCONT ## Restituisce il rendimento annuale di un titolo scontato, ad esempio un Buono del Tesoro
+YIELDMAT = REND.SCAD ## Restituisce il rendimento annuo di un titolo che paga interessi alla scadenza
+
+
+##
+## Information functions Funzioni relative alle informazioni
+##
+CELL = CELLA ## Restituisce le informazioni sulla formattazione, la posizione o i contenuti di una cella
+ERROR.TYPE = ERRORE.TIPO ## Restituisce un numero che corrisponde a un tipo di errore
+INFO = INFO ## Restituisce le informazioni sull'ambiente operativo corrente
+ISBLANK = VAL.VUOTO ## Restituisce VERO se il valore è vuoto
+ISERR = VAL.ERR ## Restituisce VERO se il valore è un valore di errore qualsiasi tranne #N/D
+ISERROR = VAL.ERRORE ## Restituisce VERO se il valore è un valore di errore qualsiasi
+ISEVEN = VAL.PARI ## Restituisce VERO se il numero è pari
+ISLOGICAL = VAL.LOGICO ## Restituisce VERO se il valore è un valore logico
+ISNA = VAL.NON.DISP ## Restituisce VERO se il valore è un valore di errore #N/D
+ISNONTEXT = VAL.NON.TESTO ## Restituisce VERO se il valore non è in formato testo
+ISNUMBER = VAL.NUMERO ## Restituisce VERO se il valore è un numero
+ISODD = VAL.DISPARI ## Restituisce VERO se il numero è dispari
+ISREF = VAL.RIF ## Restituisce VERO se il valore è un riferimento
+ISTEXT = VAL.TESTO ## Restituisce VERO se il valore è in formato testo
+N = NUM ## Restituisce un valore convertito in numero
+NA = NON.DISP ## Restituisce il valore di errore #N/D
+TYPE = TIPO ## Restituisce un numero che indica il tipo di dati relativi a un valore
+
+
+##
+## Logical functions Funzioni logiche
+##
+AND = E ## Restituisce VERO se tutti gli argomenti sono VERO
+FALSE = FALSO ## Restituisce il valore logico FALSO
+IF = SE ## Specifica un test logico da eseguire
+IFERROR = SE.ERRORE ## Restituisce un valore specificato se una formula fornisce un errore come risultato; in caso contrario, restituisce il risultato della formula
+NOT = NON ## Inverte la logica degli argomenti
+OR = O ## Restituisce VERO se un argomento qualsiasi è VERO
+TRUE = VERO ## Restituisce il valore logico VERO
+
+
+##
+## Lookup and reference functions Funzioni di ricerca e di riferimento
+##
+ADDRESS = INDIRIZZO ## Restituisce un riferimento come testo in una singola cella di un foglio di lavoro
+AREAS = AREE ## Restituisce il numero di aree in un riferimento
+CHOOSE = SCEGLI ## Sceglie un valore da un elenco di valori
+COLUMN = RIF.COLONNA ## Restituisce il numero di colonna di un riferimento
+COLUMNS = COLONNE ## Restituisce il numero di colonne in un riferimento
+HLOOKUP = CERCA.ORIZZ ## Effettua una ricerca nella riga superiore di una matrice e restituisce il valore della cella specificata
+HYPERLINK = COLLEG.IPERTESTUALE ## Crea un collegamento che apre un documento memorizzato in un server di rete, una rete Intranet o Internet
+INDEX = INDICE ## Utilizza un indice per scegliere un valore da un riferimento o da una matrice
+INDIRECT = INDIRETTO ## Restituisce un riferimento specificato da un valore testo
+LOOKUP = CERCA ## Ricerca i valori in un vettore o in una matrice
+MATCH = CONFRONTA ## Ricerca i valori in un riferimento o in una matrice
+OFFSET = SCARTO ## Restituisce uno scarto di riferimento da un riferimento dato
+ROW = RIF.RIGA ## Restituisce il numero di riga di un riferimento
+ROWS = RIGHE ## Restituisce il numero delle righe in un riferimento
+RTD = DATITEMPOREALE ## Recupera dati in tempo reale da un programma che supporta l'automazione COM (automazione: Metodo per utilizzare gli oggetti di un'applicazione da un'altra applicazione o da un altro strumento di sviluppo. Precedentemente nota come automazione OLE, l'automazione è uno standard del settore e una caratteristica del modello COM (Component Object Model).)
+TRANSPOSE = MATR.TRASPOSTA ## Restituisce la trasposizione di una matrice
+VLOOKUP = CERCA.VERT ## Effettua una ricerca nella prima colonna di una matrice e si sposta attraverso la riga per restituire il valore di una cella
+
+
+##
+## Math and trigonometry functions Funzioni matematiche e trigonometriche
+##
+ABS = ASS ## Restituisce il valore assoluto di un numero.
+ACOS = ARCCOS ## Restituisce l'arcocoseno di un numero
+ACOSH = ARCCOSH ## Restituisce l'inverso del coseno iperbolico di un numero
+ASIN = ARCSEN ## Restituisce l'arcoseno di un numero
+ASINH = ARCSENH ## Restituisce l'inverso del seno iperbolico di un numero
+ATAN = ARCTAN ## Restituisce l'arcotangente di un numero
+ATAN2 = ARCTAN.2 ## Restituisce l'arcotangente delle coordinate x e y specificate
+ATANH = ARCTANH ## Restituisce l'inverso della tangente iperbolica di un numero
+CEILING = ARROTONDA.ECCESSO ## Arrotonda un numero per eccesso all'intero più vicino o al multiplo più vicino a peso
+COMBIN = COMBINAZIONE ## Restituisce il numero di combinazioni possibili per un numero assegnato di elementi
+COS = COS ## Restituisce il coseno dell'angolo specificato
+COSH = COSH ## Restituisce il coseno iperbolico di un numero
+DEGREES = GRADI ## Converte i radianti in gradi
+EVEN = PARI ## Arrotonda il valore assoluto di un numero per eccesso al più vicino intero pari
+EXP = ESP ## Restituisce il numero e elevato alla potenza di num
+FACT = FATTORIALE ## Restituisce il fattoriale di un numero
+FACTDOUBLE = FATT.DOPPIO ## Restituisce il fattoriale doppio di un numero
+FLOOR = ARROTONDA.DIFETTO ## Arrotonda un numero per difetto al multiplo più vicino a zero
+GCD = MCD ## Restituisce il massimo comune divisore
+INT = INT ## Arrotonda un numero per difetto al numero intero più vicino
+LCM = MCM ## Restituisce il minimo comune multiplo
+LN = LN ## Restituisce il logaritmo naturale di un numero
+LOG = LOG ## Restituisce il logaritmo di un numero in una specificata base
+LOG10 = LOG10 ## Restituisce il logaritmo in base 10 di un numero
+MDETERM = MATR.DETERM ## Restituisce il determinante di una matrice
+MINVERSE = MATR.INVERSA ## Restituisce l'inverso di una matrice
+MMULT = MATR.PRODOTTO ## Restituisce il prodotto di due matrici
+MOD = RESTO ## Restituisce il resto della divisione
+MROUND = ARROTONDA.MULTIPLO ## Restituisce un numero arrotondato al multiplo desiderato
+MULTINOMIAL = MULTINOMIALE ## Restituisce il multinomiale di un insieme di numeri
+ODD = DISPARI ## Arrotonda un numero per eccesso al più vicino intero dispari
+PI = PI.GRECO ## Restituisce il valore di pi greco
+POWER = POTENZA ## Restituisce il risultato di un numero elevato a potenza
+PRODUCT = PRODOTTO ## Moltiplica i suoi argomenti
+QUOTIENT = QUOZIENTE ## Restituisce la parte intera di una divisione
+RADIANS = RADIANTI ## Converte i gradi in radianti
+RAND = CASUALE ## Restituisce un numero casuale compreso tra 0 e 1
+RANDBETWEEN = CASUALE.TRA ## Restituisce un numero casuale compreso tra i numeri specificati
+ROMAN = ROMANO ## Restituisce il numero come numero romano sotto forma di testo
+ROUND = ARROTONDA ## Arrotonda il numero al numero di cifre specificato
+ROUNDDOWN = ARROTONDA.PER.DIF ## Arrotonda il valore assoluto di un numero per difetto
+ROUNDUP = ARROTONDA.PER.ECC ## Arrotonda il valore assoluto di un numero per eccesso
+SERIESSUM = SOMMA.SERIE ## Restituisce la somma di una serie di potenze in base alla formula
+SIGN = SEGNO ## Restituisce il segno di un numero
+SIN = SEN ## Restituisce il seno di un dato angolo
+SINH = SENH ## Restituisce il seno iperbolico di un numero
+SQRT = RADQ ## Restituisce una radice quadrata
+SQRTPI = RADQ.PI.GRECO ## Restituisce la radice quadrata di un numero (numero * pi greco)
+SUBTOTAL = SUBTOTALE ## Restituisce un subtotale in un elenco o in un database
+SUM = SOMMA ## Somma i suoi argomenti
+SUMIF = SOMMA.SE ## Somma le celle specificate da un dato criterio
+SUMIFS = SOMMA.PIÙ.SE ## Somma le celle in un intervallo che soddisfano più criteri
+SUMPRODUCT = MATR.SOMMA.PRODOTTO ## Restituisce la somma dei prodotti dei componenti corrispondenti della matrice
+SUMSQ = SOMMA.Q ## Restituisce la somma dei quadrati degli argomenti
+SUMX2MY2 = SOMMA.DIFF.Q ## Restituisce la somma della differenza dei quadrati dei corrispondenti elementi in due matrici
+SUMX2PY2 = SOMMA.SOMMA.Q ## Restituisce la somma della somma dei quadrati dei corrispondenti elementi in due matrici
+SUMXMY2 = SOMMA.Q.DIFF ## Restituisce la somma dei quadrati delle differenze dei corrispondenti elementi in due matrici
+TAN = TAN ## Restituisce la tangente di un numero
+TANH = TANH ## Restituisce la tangente iperbolica di un numero
+TRUNC = TRONCA ## Tronca la parte decimale di un numero
+
+
+##
+## Statistical functions Funzioni statistiche
+##
+AVEDEV = MEDIA.DEV ## Restituisce la media delle deviazioni assolute delle coordinate rispetto alla loro media
+AVERAGE = MEDIA ## Restituisce la media degli argomenti
+AVERAGEA = MEDIA.VALORI ## Restituisce la media degli argomenti, inclusi i numeri, il testo e i valori logici
+AVERAGEIF = MEDIA.SE ## Restituisce la media aritmetica di tutte le celle in un intervallo che soddisfano un determinato criterio
+AVERAGEIFS = MEDIA.PIÙ.SE ## Restituisce la media aritmetica di tutte le celle che soddisfano più criteri
+BETADIST = DISTRIB.BETA ## Restituisce la funzione di distribuzione cumulativa beta
+BETAINV = INV.BETA ## Restituisce l'inverso della funzione di distribuzione cumulativa per una distribuzione beta specificata
+BINOMDIST = DISTRIB.BINOM ## Restituisce la distribuzione binomiale per il termine individuale
+CHIDIST = DISTRIB.CHI ## Restituisce la probabilità a una coda per la distribuzione del chi quadrato
+CHIINV = INV.CHI ## Restituisce l'inverso della probabilità ad una coda per la distribuzione del chi quadrato
+CHITEST = TEST.CHI ## Restituisce il test per l'indipendenza
+CONFIDENCE = CONFIDENZA ## Restituisce l'intervallo di confidenza per una popolazione
+CORREL = CORRELAZIONE ## Restituisce il coefficiente di correlazione tra due insiemi di dati
+COUNT = CONTA.NUMERI ## Conta la quantità di numeri nell'elenco di argomenti
+COUNTA = CONTA.VALORI ## Conta il numero di valori nell'elenco di argomenti
+COUNTBLANK = CONTA.VUOTE ## Conta il numero di celle vuote all'interno di un intervallo
+COUNTIF = CONTA.SE ## Conta il numero di celle all'interno di un intervallo che soddisfa i criteri specificati
+COUNTIFS = CONTA.PIÙ.SE ## Conta il numero di celle in un intervallo che soddisfano più criteri.
+COVAR = COVARIANZA ## Calcola la covarianza, la media dei prodotti delle deviazioni accoppiate
+CRITBINOM = CRIT.BINOM ## Restituisce il più piccolo valore per il quale la distribuzione cumulativa binomiale risulta maggiore o uguale ad un valore di criterio
+DEVSQ = DEV.Q ## Restituisce la somma dei quadrati delle deviazioni
+EXPONDIST = DISTRIB.EXP ## Restituisce la distribuzione esponenziale
+FDIST = DISTRIB.F ## Restituisce la distribuzione di probabilità F
+FINV = INV.F ## Restituisce l'inverso della distribuzione della probabilità F
+FISHER = FISHER ## Restituisce la trasformazione di Fisher
+FISHERINV = INV.FISHER ## Restituisce l'inverso della trasformazione di Fisher
+FORECAST = PREVISIONE ## Restituisce i valori lungo una tendenza lineare
+FREQUENCY = FREQUENZA ## Restituisce la distribuzione di frequenza come matrice verticale
+FTEST = TEST.F ## Restituisce il risultato di un test F
+GAMMADIST = DISTRIB.GAMMA ## Restituisce la distribuzione gamma
+GAMMAINV = INV.GAMMA ## Restituisce l'inverso della distribuzione cumulativa gamma
+GAMMALN = LN.GAMMA ## Restituisce il logaritmo naturale della funzione gamma, G(x)
+GEOMEAN = MEDIA.GEOMETRICA ## Restituisce la media geometrica
+GROWTH = CRESCITA ## Restituisce i valori lungo una linea di tendenza esponenziale
+HARMEAN = MEDIA.ARMONICA ## Restituisce la media armonica
+HYPGEOMDIST = DISTRIB.IPERGEOM ## Restituisce la distribuzione ipergeometrica
+INTERCEPT = INTERCETTA ## Restituisce l'intercetta della retta di regressione lineare
+KURT = CURTOSI ## Restituisce la curtosi di un insieme di dati
+LARGE = GRANDE ## Restituisce il k-esimo valore più grande in un insieme di dati
+LINEST = REGR.LIN ## Restituisce i parametri di una tendenza lineare
+LOGEST = REGR.LOG ## Restituisce i parametri di una linea di tendenza esponenziale
+LOGINV = INV.LOGNORM ## Restituisce l'inverso di una distribuzione lognormale
+LOGNORMDIST = DISTRIB.LOGNORM ## Restituisce la distribuzione lognormale cumulativa
+MAX = MAX ## Restituisce il valore massimo in un elenco di argomenti
+MAXA = MAX.VALORI ## Restituisce il valore massimo in un elenco di argomenti, inclusi i numeri, il testo e i valori logici
+MEDIAN = MEDIANA ## Restituisce la mediana dei numeri specificati
+MIN = MIN ## Restituisce il valore minimo in un elenco di argomenti
+MINA = MIN.VALORI ## Restituisce il più piccolo valore in un elenco di argomenti, inclusi i numeri, il testo e i valori logici
+MODE = MODA ## Restituisce il valore più comune in un insieme di dati
+NEGBINOMDIST = DISTRIB.BINOM.NEG ## Restituisce la distribuzione binomiale negativa
+NORMDIST = DISTRIB.NORM ## Restituisce la distribuzione cumulativa normale
+NORMINV = INV.NORM ## Restituisce l'inverso della distribuzione cumulativa normale standard
+NORMSDIST = DISTRIB.NORM.ST ## Restituisce la distribuzione cumulativa normale standard
+NORMSINV = INV.NORM.ST ## Restituisce l'inverso della distribuzione cumulativa normale
+PEARSON = PEARSON ## Restituisce il coefficiente del momento di correlazione di Pearson
+PERCENTILE = PERCENTILE ## Restituisce il k-esimo dato percentile di valori in un intervallo
+PERCENTRANK = PERCENT.RANGO ## Restituisce il rango di un valore in un insieme di dati come percentuale
+PERMUT = PERMUTAZIONE ## Restituisce il numero delle permutazioni per un determinato numero di oggetti
+POISSON = POISSON ## Restituisce la distribuzione di Poisson
+PROB = PROBABILITÀ ## Calcola la probabilità che dei valori in un intervallo siano compresi tra due limiti
+QUARTILE = QUARTILE ## Restituisce il quartile di un insieme di dati
+RANK = RANGO ## Restituisce il rango di un numero in un elenco di numeri
+RSQ = RQ ## Restituisce la radice quadrata del coefficiente di momento di correlazione di Pearson
+SKEW = ASIMMETRIA ## Restituisce il grado di asimmetria di una distribuzione
+SLOPE = PENDENZA ## Restituisce la pendenza di una retta di regressione lineare
+SMALL = PICCOLO ## Restituisce il k-esimo valore più piccolo in un insieme di dati
+STANDARDIZE = NORMALIZZA ## Restituisce un valore normalizzato
+STDEV = DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione
+STDEVA = DEV.ST.VALORI ## Restituisce una stima della deviazione standard sulla base di un campione, inclusi i numeri, il testo e i valori logici
+STDEVP = DEV.ST.POP ## Calcola la deviazione standard sulla base di un'intera popolazione
+STDEVPA = DEV.ST.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici
+STEYX = ERR.STD.YX ## Restituisce l'errore standard del valore previsto per y per ogni valore x nella regressione
+TDIST = DISTRIB.T ## Restituisce la distribuzione t di Student
+TINV = INV.T ## Restituisce l'inversa della distribuzione t di Student
+TREND = TENDENZA ## Restituisce i valori lungo una linea di tendenza lineare
+TRIMMEAN = MEDIA.TRONCATA ## Restituisce la media della parte interna di un insieme di dati
+TTEST = TEST.T ## Restituisce la probabilità associata ad un test t di Student
+VAR = VAR ## Stima la varianza sulla base di un campione
+VARA = VAR.VALORI ## Stima la varianza sulla base di un campione, inclusi i numeri, il testo e i valori logici
+VARP = VAR.POP ## Calcola la varianza sulla base dell'intera popolazione
+VARPA = VAR.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici
+WEIBULL = WEIBULL ## Restituisce la distribuzione di Weibull
+ZTEST = TEST.Z ## Restituisce il valore di probabilità a una coda per un test z
+
+
+##
+## Text functions Funzioni di testo
+##
+ASC = ASC ## Modifica le lettere inglesi o il katakana a doppio byte all'interno di una stringa di caratteri in caratteri a singolo byte
+BAHTTEXT = BAHTTESTO ## Converte un numero in testo, utilizzando il formato valuta ß (baht)
+CHAR = CODICE.CARATT ## Restituisce il carattere specificato dal numero di codice
+CLEAN = LIBERA ## Elimina dal testo tutti i caratteri che non è possibile stampare
+CODE = CODICE ## Restituisce il codice numerico del primo carattere di una stringa di testo
+CONCATENATE = CONCATENA ## Unisce diversi elementi di testo in un unico elemento di testo
+DOLLAR = VALUTA ## Converte un numero in testo, utilizzando il formato valuta € (euro)
+EXACT = IDENTICO ## Verifica se due valori di testo sono uguali
+FIND = TROVA ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole)
+FINDB = TROVA.B ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole)
+FIXED = FISSO ## Formatta un numero come testo con un numero fisso di decimali
+JIS = ORDINAMENTO.JIS ## Modifica le lettere inglesi o i caratteri katakana a byte singolo all'interno di una stringa di caratteri in caratteri a byte doppio.
+LEFT = SINISTRA ## Restituisce il carattere più a sinistra di un valore di testo
+LEFTB = SINISTRA.B ## Restituisce il carattere più a sinistra di un valore di testo
+LEN = LUNGHEZZA ## Restituisce il numero di caratteri di una stringa di testo
+LENB = LUNB ## Restituisce il numero di caratteri di una stringa di testo
+LOWER = MINUSC ## Converte il testo in lettere minuscole
+MID = MEDIA ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata
+MIDB = MEDIA.B ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata
+PHONETIC = FURIGANA ## Estrae i caratteri fonetici (furigana) da una stringa di testo.
+PROPER = MAIUSC.INIZ ## Converte in maiuscolo la prima lettera di ogni parola di un valore di testo
+REPLACE = RIMPIAZZA ## Sostituisce i caratteri all'interno di un testo
+REPLACEB = SOSTITUISCI.B ## Sostituisce i caratteri all'interno di un testo
+REPT = RIPETI ## Ripete un testo per un dato numero di volte
+RIGHT = DESTRA ## Restituisce il carattere più a destra di un valore di testo
+RIGHTB = DESTRA.B ## Restituisce il carattere più a destra di un valore di testo
+SEARCH = RICERCA ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole)
+SEARCHB = CERCA.B ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole)
+SUBSTITUTE = SOSTITUISCI ## Sostituisce il nuovo testo al testo contenuto in una stringa
+T = T ## Converte gli argomenti in testo
+TEXT = TESTO ## Formatta un numero e lo converte in testo
+TRIM = ANNULLA.SPAZI ## Elimina gli spazi dal testo
+UPPER = MAIUSC ## Converte il testo in lettere maiuscole
+VALUE = VALORE ## Converte un argomento di testo in numero
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config
new file mode 100644
index 0000000..5a0c443
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #LEEG!
+DIV0 = #DEEL/0!
+VALUE = #WAARDE!
+REF = #VERW!
+NAME = #NAAM?
+NUM = #GETAL!
+NA = #N/B
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions
new file mode 100644
index 0000000..d74bf9c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Automatiseringsfuncties en functies in invoegtoepassingen
+##
+GETPIVOTDATA = DRAAITABEL.OPHALEN ## Geeft gegevens uit een draaitabelrapport als resultaat
+
+
+##
+## Cube functions Kubusfuncties
+##
+CUBEKPIMEMBER = KUBUSKPILID ## Retourneert de naam, eigenschap en waarde van een KPI (prestatie-indicator) en geeft de naam en de eigenschap in de cel weer. Een KPI is een meetbare waarde, zoals de maandelijkse brutowinst of de omzet per kwartaal per werknemer, die wordt gebruikt om de prestaties van een organisatie te bewaken
+CUBEMEMBER = KUBUSLID ## Retourneert een lid of tupel in een kubushiërarchie. Wordt gebruikt om te controleren of het lid of de tupel in de kubus aanwezig is
+CUBEMEMBERPROPERTY = KUBUSLIDEIGENSCHAP ## Retourneert de waarde van een lideigenschap in de kubus. Wordt gebruikt om te controleren of de lidnaam in de kubus bestaat en retourneert de opgegeven eigenschap voor dit lid
+CUBERANKEDMEMBER = KUBUSGERANGCHIKTLID ## Retourneert het zoveelste, gerangschikte lid in een set. Wordt gebruikt om een of meer elementen in een set te retourneren, zoals de tien beste verkopers of de tien beste studenten
+CUBESET = KUBUSSET ## Definieert een berekende set leden of tupels door een ingestelde expressie naar de kubus op de server te sturen, alwaar de set wordt gemaakt en vervolgens wordt geretourneerd naar Microsoft Office Excel
+CUBESETCOUNT = KUBUSSETAANTAL ## Retourneert het aantal onderdelen in een set
+CUBEVALUE = KUBUSWAARDE ## Retourneert een samengestelde waarde van een kubus
+
+
+##
+## Database functions Databasefuncties
+##
+DAVERAGE = DBGEMIDDELDE ## Berekent de gemiddelde waarde in geselecteerde databasegegevens
+DCOUNT = DBAANTAL ## Telt de cellen met getallen in een database
+DCOUNTA = DBAANTALC ## Telt de niet-lege cellen in een database
+DGET = DBLEZEN ## Retourneert één record dat voldoet aan de opgegeven criteria uit een database
+DMAX = DBMAX ## Retourneert de maximumwaarde in de geselecteerde databasegegevens
+DMIN = DBMIN ## Retourneert de minimumwaarde in de geselecteerde databasegegevens
+DPRODUCT = DBPRODUCT ## Vermenigvuldigt de waarden in een bepaald veld van de records die voldoen aan de criteria in een database
+DSTDEV = DBSTDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef uit geselecteerde databasegegevens
+DSTDEVP = DBSTDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie van geselecteerde databasegegevens
+DSUM = DBSOM ## Telt de getallen uit een kolom records in de database op die voldoen aan de criteria
+DVAR = DBVAR ## Maakt een schatting van de variantie op basis van een steekproef uit geselecteerde databasegegevens
+DVARP = DBVARP ## Berekent de variantie op basis van de volledige populatie van geselecteerde databasegegevens
+
+
+##
+## Date and time functions Datum- en tijdfuncties
+##
+DATE = DATUM ## Geeft als resultaat het seriële getal van een opgegeven datum
+DATEVALUE = DATUMWAARDE ## Converteert een datum in de vorm van tekst naar een serieel getal
+DAY = DAG ## Converteert een serieel getal naar een dag van de maand
+DAYS360 = DAGEN360 ## Berekent het aantal dagen tussen twee datums op basis van een jaar met 360 dagen
+EDATE = ZELFDE.DAG ## Geeft als resultaat het seriële getal van een datum die het opgegeven aantal maanden voor of na de begindatum ligt
+EOMONTH = LAATSTE.DAG ## Geeft als resultaat het seriële getal van de laatste dag van de maand voor of na het opgegeven aantal maanden
+HOUR = UUR ## Converteert een serieel getal naar uren
+MINUTE = MINUUT ## Converteert een serieel naar getal minuten
+MONTH = MAAND ## Converteert een serieel getal naar een maand
+NETWORKDAYS = NETTO.WERKDAGEN ## Geeft als resultaat het aantal hele werkdagen tussen twee datums
+NOW = NU ## Geeft als resultaat het seriële getal van de huidige datum en tijd
+SECOND = SECONDE ## Converteert een serieel getal naar seconden
+TIME = TIJD ## Geeft als resultaat het seriële getal van een bepaald tijdstip
+TIMEVALUE = TIJDWAARDE ## Converteert de tijd in de vorm van tekst naar een serieel getal
+TODAY = VANDAAG ## Geeft als resultaat het seriële getal van de huidige datum
+WEEKDAY = WEEKDAG ## Converteert een serieel getal naar een weekdag
+WEEKNUM = WEEKNUMMER ## Converteert een serieel getal naar een weeknummer
+WORKDAY = WERKDAG ## Geeft als resultaat het seriële getal van de datum voor of na een bepaald aantal werkdagen
+YEAR = JAAR ## Converteert een serieel getal naar een jaar
+YEARFRAC = JAAR.DEEL ## Geeft als resultaat het gedeelte van het jaar, uitgedrukt in het aantal hele dagen tussen begindatum en einddatum
+
+
+##
+## Engineering functions Technische functies
+##
+BESSELI = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie In(x)
+BESSELJ = BESSEL.J ## Geeft als resultaat de Bessel-functie Jn(x)
+BESSELK = BESSEL.K ## Geeft als resultaat de gewijzigde Bessel-functie Kn(x)
+BESSELY = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie Yn(x)
+BIN2DEC = BIN.N.DEC ## Converteert een binair getal naar een decimaal getal
+BIN2HEX = BIN.N.HEX ## Converteert een binair getal naar een hexadecimaal getal
+BIN2OCT = BIN.N.OCT ## Converteert een binair getal naar een octaal getal
+COMPLEX = COMPLEX ## Converteert reële en imaginaire coëfficiënten naar een complex getal
+CONVERT = CONVERTEREN ## Converteert een getal in de ene maateenheid naar een getal in een andere maateenheid
+DEC2BIN = DEC.N.BIN ## Converteert een decimaal getal naar een binair getal
+DEC2HEX = DEC.N.HEX ## Converteert een decimaal getal naar een hexadecimaal getal
+DEC2OCT = DEC.N.OCT ## Converteert een decimaal getal naar een octaal getal
+DELTA = DELTA ## Test of twee waarden gelijk zijn
+ERF = FOUTFUNCTIE ## Geeft als resultaat de foutfunctie
+ERFC = FOUT.COMPLEMENT ## Geeft als resultaat de complementaire foutfunctie
+GESTEP = GROTER.DAN ## Test of een getal groter is dan de drempelwaarde
+HEX2BIN = HEX.N.BIN ## Converteert een hexadecimaal getal naar een binair getal
+HEX2DEC = HEX.N.DEC ## Converteert een hexadecimaal getal naar een decimaal getal
+HEX2OCT = HEX.N.OCT ## Converteert een hexadecimaal getal naar een octaal getal
+IMABS = C.ABS ## Geeft als resultaat de absolute waarde (modulus) van een complex getal
+IMAGINARY = C.IM.DEEL ## Geeft als resultaat de imaginaire coëfficiënt van een complex getal
+IMARGUMENT = C.ARGUMENT ## Geeft als resultaat het argument thèta, een hoek uitgedrukt in radialen
+IMCONJUGATE = C.TOEGEVOEGD ## Geeft als resultaat het complexe toegevoegde getal van een complex getal
+IMCOS = C.COS ## Geeft als resultaat de cosinus van een complex getal
+IMDIV = C.QUOTIENT ## Geeft als resultaat het quotiënt van twee complexe getallen
+IMEXP = C.EXP ## Geeft als resultaat de exponent van een complex getal
+IMLN = C.LN ## Geeft als resultaat de natuurlijke logaritme van een complex getal
+IMLOG10 = C.LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een complex getal
+IMLOG2 = C.LOG2 ## Geeft als resultaat de logaritme met grondtal 2 van een complex getal
+IMPOWER = C.MACHT ## Geeft als resultaat een complex getal dat is verheven tot de macht van een geheel getal
+IMPRODUCT = C.PRODUCT ## Geeft als resultaat het product van complexe getallen
+IMREAL = C.REEEL.DEEL ## Geeft als resultaat de reële coëfficiënt van een complex getal
+IMSIN = C.SIN ## Geeft als resultaat de sinus van een complex getal
+IMSQRT = C.WORTEL ## Geeft als resultaat de vierkantswortel van een complex getal
+IMSUB = C.VERSCHIL ## Geeft als resultaat het verschil tussen twee complexe getallen
+IMSUM = C.SOM ## Geeft als resultaat de som van complexe getallen
+OCT2BIN = OCT.N.BIN ## Converteert een octaal getal naar een binair getal
+OCT2DEC = OCT.N.DEC ## Converteert een octaal getal naar een decimaal getal
+OCT2HEX = OCT.N.HEX ## Converteert een octaal getal naar een hexadecimaal getal
+
+
+##
+## Financial functions Financiële functies
+##
+ACCRINT = SAMENG.RENTE ## Berekent de opgelopen rente voor een waardepapier waarvan de rente periodiek wordt uitgekeerd
+ACCRINTM = SAMENG.RENTE.V ## Berekent de opgelopen rente voor een waardepapier waarvan de rente op de vervaldatum wordt uitgekeerd
+AMORDEGRC = AMORDEGRC ## Geeft als resultaat de afschrijving voor elke boekingsperiode door een afschrijvingscoëfficiënt toe te passen
+AMORLINC = AMORLINC ## Berekent de afschrijving voor elke boekingsperiode
+COUPDAYBS = COUP.DAGEN.BB ## Berekent het aantal dagen vanaf het begin van de coupontermijn tot de stortingsdatum
+COUPDAYS = COUP.DAGEN ## Geeft als resultaat het aantal dagen in de coupontermijn waarin de stortingsdatum valt
+COUPDAYSNC = COUP.DAGEN.VV ## Geeft als resultaat het aantal dagen vanaf de stortingsdatum tot de volgende couponvervaldatum
+COUPNCD = COUP.DATUM.NB ## Geeft als resultaat de volgende coupondatum na de stortingsdatum
+COUPNUM = COUP.AANTAL ## Geeft als resultaat het aantal coupons dat nog moet worden uitbetaald tussen de stortingsdatum en de vervaldatum
+COUPPCD = COUP.DATUM.VB ## Geeft als resultaat de vorige couponvervaldatum vóór de stortingsdatum
+CUMIPMT = CUM.RENTE ## Geeft als resultaat de cumulatieve rente die tussen twee termijnen is uitgekeerd
+CUMPRINC = CUM.HOOFDSOM ## Geeft als resultaat de cumulatieve hoofdsom van een lening die tussen twee termijnen is terugbetaald
+DB = DB ## Geeft als resultaat de afschrijving van activa voor een bepaalde periode met behulp van de 'fixed declining balance'-methode
+DDB = DDB ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'double declining balance'-methode of een andere methode die u opgeeft
+DISC = DISCONTO ## Geeft als resultaat het discontopercentage voor een waardepapier
+DOLLARDE = EURO.DE ## Converteert een prijs in euro's, uitgedrukt in een breuk, naar een prijs in euro's, uitgedrukt in een decimaal getal
+DOLLARFR = EURO.BR ## Converteert een prijs in euro's, uitgedrukt in een decimaal getal, naar een prijs in euro's, uitgedrukt in een breuk
+DURATION = DUUR ## Geeft als resultaat de gewogen gemiddelde looptijd voor een waardepapier met periodieke rentebetalingen
+EFFECT = EFFECT.RENTE ## Geeft als resultaat het effectieve jaarlijkse rentepercentage
+FV = TW ## Geeft als resultaat de toekomstige waarde van een investering
+FVSCHEDULE = TOEK.WAARDE2 ## Geeft als resultaat de toekomstige waarde van een bepaalde hoofdsom na het toepassen van een reeks samengestelde rentepercentages
+INTRATE = RENTEPERCENTAGE ## Geeft als resultaat het rentepercentage voor een volgestort waardepapier
+IPMT = IBET ## Geeft als resultaat de te betalen rente voor een investering over een bepaalde termijn
+IRR = IR ## Geeft als resultaat de interne rentabiliteit voor een reeks cashflows
+ISPMT = ISBET ## Geeft als resultaat de rente die is betaald tijdens een bepaalde termijn van een investering
+MDURATION = AANG.DUUR ## Geeft als resultaat de aangepaste Macauley-looptijd voor een waardepapier, aangenomen dat de nominale waarde € 100 bedraagt
+MIRR = GIR ## Geeft als resultaat de interne rentabiliteit voor een serie cashflows, waarbij voor betalingen een ander rentepercentage geldt dan voor inkomsten
+NOMINAL = NOMINALE.RENTE ## Geeft als resultaat het nominale jaarlijkse rentepercentage
+NPER = NPER ## Geeft als resultaat het aantal termijnen van een investering
+NPV = NHW ## Geeft als resultaat de netto huidige waarde van een investering op basis van een reeks periodieke cashflows en een discontopercentage
+ODDFPRICE = AFW.ET.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende eerste termijn
+ODDFYIELD = AFW.ET.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende eerste termijn
+ODDLPRICE = AFW.LT.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende laatste termijn
+ODDLYIELD = AFW.LT.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende laatste termijn
+PMT = BET ## Geeft als resultaat de periodieke betaling voor een annuïteit
+PPMT = PBET ## Geeft als resultaat de afbetaling op de hoofdsom voor een bepaalde termijn
+PRICE = PRIJS.NOM ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente periodiek wordt uitgekeerd
+PRICEDISC = PRIJS.DISCONTO ## Geeft als resultaat de prijs per € 100 nominale waarde voor een verdisconteerd waardepapier
+PRICEMAT = PRIJS.VERVALDAG ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum
+PV = HW ## Geeft als resultaat de huidige waarde van een investering
+RATE = RENTE ## Geeft als resultaat het periodieke rentepercentage voor een annuïteit
+RECEIVED = OPBRENGST ## Geeft als resultaat het bedrag dat op de vervaldatum wordt uitgekeerd voor een volgestort waardepapier
+SLN = LIN.AFSCHR ## Geeft als resultaat de lineaire afschrijving van activa over één termijn
+SYD = SYD ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'Sum-Of-Years-Digits'-methode
+TBILLEQ = SCHATK.OBL ## Geeft als resultaat het rendement op schatkistpapier, dat op dezelfde manier wordt berekend als het rendement op obligaties
+TBILLPRICE = SCHATK.PRIJS ## Bepaalt de prijs per € 100 nominale waarde voor schatkistpapier
+TBILLYIELD = SCHATK.REND ## Berekent het rendement voor schatkistpapier
+VDB = VDB ## Geeft als resultaat de afschrijving van activa over een gehele of gedeeltelijke termijn met behulp van de 'declining balance'-methode
+XIRR = IR.SCHEMA ## Berekent de interne rentabiliteit voor een betalingsschema van cashflows
+XNPV = NHW2 ## Berekent de huidige nettowaarde voor een betalingsschema van cashflows
+YIELD = RENDEMENT ## Geeft als resultaat het rendement voor een waardepapier waarvan de rente periodiek wordt uitgekeerd
+YIELDDISC = REND.DISCONTO ## Geeft als resultaat het jaarlijkse rendement voor een verdisconteerd waardepapier, bijvoorbeeld schatkistpapier
+YIELDMAT = REND.VERVAL ## Geeft als resultaat het jaarlijkse rendement voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum
+
+
+##
+## Information functions Informatiefuncties
+##
+CELL = CEL ## Geeft als resultaat informatie over de opmaak, locatie of inhoud van een cel
+ERROR.TYPE = TYPE.FOUT ## Geeft als resultaat een getal dat overeenkomt met een van de foutwaarden van Microsoft Excel
+INFO = INFO ## Geeft als resultaat informatie over de huidige besturingsomgeving
+ISBLANK = ISLEEG ## Geeft als resultaat WAAR als de waarde leeg is
+ISERR = ISFOUT2 ## Geeft als resultaat WAAR als de waarde een foutwaarde is, met uitzondering van #N/B
+ISERROR = ISFOUT ## Geeft als resultaat WAAR als de waarde een foutwaarde is
+ISEVEN = IS.EVEN ## Geeft als resultaat WAAR als het getal even is
+ISLOGICAL = ISLOGISCH ## Geeft als resultaat WAAR als de waarde een logische waarde is
+ISNA = ISNB ## Geeft als resultaat WAAR als de waarde de foutwaarde #N/B is
+ISNONTEXT = ISGEENTEKST ## Geeft als resultaat WAAR als de waarde geen tekst is
+ISNUMBER = ISGETAL ## Geeft als resultaat WAAR als de waarde een getal is
+ISODD = IS.ONEVEN ## Geeft als resultaat WAAR als het getal oneven is
+ISREF = ISVERWIJZING ## Geeft als resultaat WAAR als de waarde een verwijzing is
+ISTEXT = ISTEKST ## Geeft als resultaat WAAR als de waarde tekst is
+N = N ## Geeft als resultaat een waarde die is geconverteerd naar een getal
+NA = NB ## Geeft als resultaat de foutwaarde #N/B
+TYPE = TYPE ## Geeft als resultaat een getal dat het gegevenstype van een waarde aangeeft
+
+
+##
+## Logical functions Logische functies
+##
+AND = EN ## Geeft als resultaat WAAR als alle argumenten WAAR zijn
+FALSE = ONWAAR ## Geeft als resultaat de logische waarde ONWAAR
+IF = ALS ## Geeft een logische test aan
+IFERROR = ALS.FOUT ## Retourneert een waarde die u opgeeft als een formule een fout oplevert, anders wordt het resultaat van de formule geretourneerd
+NOT = NIET ## Keert de logische waarde van het argument om
+OR = OF ## Geeft als resultaat WAAR als minimaal een van de argumenten WAAR is
+TRUE = WAAR ## Geeft als resultaat de logische waarde WAAR
+
+
+##
+## Lookup and reference functions Zoek- en verwijzingsfuncties
+##
+ADDRESS = ADRES ## Geeft als resultaat een verwijzing, in de vorm van tekst, naar één bepaalde cel in een werkblad
+AREAS = BEREIKEN ## Geeft als resultaat het aantal bereiken in een verwijzing
+CHOOSE = KIEZEN ## Kiest een waarde uit een lijst met waarden
+COLUMN = KOLOM ## Geeft als resultaat het kolomnummer van een verwijzing
+COLUMNS = KOLOMMEN ## Geeft als resultaat het aantal kolommen in een verwijzing
+HLOOKUP = HORIZ.ZOEKEN ## Zoekt in de bovenste rij van een matrix naar een bepaalde waarde en geeft als resultaat de gevonden waarde in de opgegeven cel
+HYPERLINK = HYPERLINK ## Maakt een snelkoppeling of een sprong waarmee een document wordt geopend dat is opgeslagen op een netwerkserver, een intranet of op internet
+INDEX = INDEX ## Kiest met een index een waarde uit een verwijzing of een matrix
+INDIRECT = INDIRECT ## Geeft als resultaat een verwijzing die wordt aangegeven met een tekstwaarde
+LOOKUP = ZOEKEN ## Zoekt naar bepaalde waarden in een vector of een matrix
+MATCH = VERGELIJKEN ## Zoekt naar bepaalde waarden in een verwijzing of een matrix
+OFFSET = VERSCHUIVING ## Geeft als resultaat een nieuwe verwijzing die is verschoven ten opzichte van een bepaalde verwijzing
+ROW = RIJ ## Geeft als resultaat het rijnummer van een verwijzing
+ROWS = RIJEN ## Geeft als resultaat het aantal rijen in een verwijzing
+RTD = RTG ## Haalt realtimegegevens op uit een programma dat COM-automatisering (automatisering: een methode waarmee de ene toepassing objecten van een andere toepassing of ontwikkelprogramma kan besturen. Automatisering werd vroeger OLE-automatisering genoemd. Automatisering is een industrienorm die deel uitmaakt van het Component Object Model (COM).) ondersteunt
+TRANSPOSE = TRANSPONEREN ## Geeft als resultaat de getransponeerde van een matrix
+VLOOKUP = VERT.ZOEKEN ## Zoekt in de meest linkse kolom van een matrix naar een bepaalde waarde en geeft als resultaat de waarde in de opgegeven cel
+
+
+##
+## Math and trigonometry functions Wiskundige en trigonometrische functies
+##
+ABS = ABS ## Geeft als resultaat de absolute waarde van een getal
+ACOS = BOOGCOS ## Geeft als resultaat de boogcosinus van een getal
+ACOSH = BOOGCOSH ## Geeft als resultaat de inverse cosinus hyperbolicus van een getal
+ASIN = BOOGSIN ## Geeft als resultaat de boogsinus van een getal
+ASINH = BOOGSINH ## Geeft als resultaat de inverse sinus hyperbolicus van een getal
+ATAN = BOOGTAN ## Geeft als resultaat de boogtangens van een getal
+ATAN2 = BOOGTAN2 ## Geeft als resultaat de boogtangens van de x- en y-coördinaten
+ATANH = BOOGTANH ## Geeft als resultaat de inverse tangens hyperbolicus van een getal
+CEILING = AFRONDEN.BOVEN ## Rondt de absolute waarde van een getal naar boven af op het dichtstbijzijnde gehele getal of het dichtstbijzijnde significante veelvoud
+COMBIN = COMBINATIES ## Geeft als resultaat het aantal combinaties voor een bepaald aantal objecten
+COS = COS ## Geeft als resultaat de cosinus van een getal
+COSH = COSH ## Geeft als resultaat de cosinus hyperbolicus van een getal
+DEGREES = GRADEN ## Converteert radialen naar graden
+EVEN = EVEN ## Rondt het getal af op het dichtstbijzijnde gehele even getal
+EXP = EXP ## Verheft e tot de macht van een bepaald getal
+FACT = FACULTEIT ## Geeft als resultaat de faculteit van een getal
+FACTDOUBLE = DUBBELE.FACULTEIT ## Geeft als resultaat de dubbele faculteit van een getal
+FLOOR = AFRONDEN.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af
+GCD = GGD ## Geeft als resultaat de grootste gemene deler
+INT = INTEGER ## Rondt een getal naar beneden af op het dichtstbijzijnde gehele getal
+LCM = KGV ## Geeft als resultaat het kleinste gemene veelvoud
+LN = LN ## Geeft als resultaat de natuurlijke logaritme van een getal
+LOG = LOG ## Geeft als resultaat de logaritme met het opgegeven grondtal van een getal
+LOG10 = LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een getal
+MDETERM = DETERMINANTMAT ## Geeft als resultaat de determinant van een matrix
+MINVERSE = INVERSEMAT ## Geeft als resultaat de inverse van een matrix
+MMULT = PRODUCTMAT ## Geeft als resultaat het product van twee matrices
+MOD = REST ## Geeft als resultaat het restgetal van een deling
+MROUND = AFRONDEN.N.VEELVOUD ## Geeft als resultaat een getal afgerond op het gewenste veelvoud
+MULTINOMIAL = MULTINOMIAAL ## Geeft als resultaat de multinomiaalcoëfficiënt van een reeks getallen
+ODD = ONEVEN ## Rondt de absolute waarde van het getal naar boven af op het dichtstbijzijnde gehele oneven getal
+PI = PI ## Geeft als resultaat de waarde van pi
+POWER = MACHT ## Verheft een getal tot een macht
+PRODUCT = PRODUCT ## Vermenigvuldigt de argumenten met elkaar
+QUOTIENT = QUOTIENT ## Geeft als resultaat de uitkomst van een deling als geheel getal
+RADIANS = RADIALEN ## Converteert graden naar radialen
+RAND = ASELECT ## Geeft als resultaat een willekeurig getal tussen 0 en 1
+RANDBETWEEN = ASELECTTUSSEN ## Geeft een willekeurig getal tussen de getallen die u hebt opgegeven
+ROMAN = ROMEINS ## Converteert een Arabisch getal naar een Romeins getal en geeft het resultaat weer in de vorm van tekst
+ROUND = AFRONDEN ## Rondt een getal af op het opgegeven aantal decimalen
+ROUNDDOWN = AFRONDEN.NAAR.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af
+ROUNDUP = AFRONDEN.NAAR.BOVEN ## Rondt de absolute waarde van een getal naar boven af
+SERIESSUM = SOM.MACHTREEKS ## Geeft als resultaat de som van een machtreeks die is gebaseerd op de formule
+SIGN = POS.NEG ## Geeft als resultaat het teken van een getal
+SIN = SIN ## Geeft als resultaat de sinus van de opgegeven hoek
+SINH = SINH ## Geeft als resultaat de sinus hyperbolicus van een getal
+SQRT = WORTEL ## Geeft als resultaat de positieve vierkantswortel van een getal
+SQRTPI = WORTEL.PI ## Geeft als resultaat de vierkantswortel van (getal * pi)
+SUBTOTAL = SUBTOTAAL ## Geeft als resultaat een subtotaal voor een bereik
+SUM = SOM ## Telt de argumenten op
+SUMIF = SOM.ALS ## Telt de getallen bij elkaar op die voldoen aan een bepaald criterium
+SUMIFS = SOMMEN.ALS ## Telt de cellen in een bereik op die aan meerdere criteria voldoen
+SUMPRODUCT = SOMPRODUCT ## Geeft als resultaat de som van de producten van de corresponderende matrixelementen
+SUMSQ = KWADRATENSOM ## Geeft als resultaat de som van de kwadraten van de argumenten
+SUMX2MY2 = SOM.X2MINY2 ## Geeft als resultaat de som van het verschil tussen de kwadraten van corresponderende waarden in twee matrices
+SUMX2PY2 = SOM.X2PLUSY2 ## Geeft als resultaat de som van de kwadratensom van corresponderende waarden in twee matrices
+SUMXMY2 = SOM.XMINY.2 ## Geeft als resultaat de som van de kwadraten van de verschillen tussen de corresponderende waarden in twee matrices
+TAN = TAN ## Geeft als resultaat de tangens van een getal
+TANH = TANH ## Geeft als resultaat de tangens hyperbolicus van een getal
+TRUNC = GEHEEL ## Kapt een getal af tot een geheel getal
+
+
+##
+## Statistical functions Statistische functies
+##
+AVEDEV = GEM.DEVIATIE ## Geeft als resultaat het gemiddelde van de absolute deviaties van gegevenspunten ten opzichte van hun gemiddelde waarde
+AVERAGE = GEMIDDELDE ## Geeft als resultaat het gemiddelde van de argumenten
+AVERAGEA = GEMIDDELDEA ## Geeft als resultaat het gemiddelde van de argumenten, inclusief getallen, tekst en logische waarden
+AVERAGEIF = GEMIDDELDE.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen in een bereik die voldoen aan de opgegeven criteria
+AVERAGEIFS = GEMIDDELDEN.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen die aan meerdere criteria voldoen
+BETADIST = BETA.VERD ## Geeft als resultaat de cumulatieve bèta-verdelingsfunctie
+BETAINV = BETA.INV ## Geeft als resultaat de inverse van de cumulatieve verdelingsfunctie voor een gegeven bèta-verdeling
+BINOMDIST = BINOMIALE.VERD ## Geeft als resultaat de binomiale verdeling
+CHIDIST = CHI.KWADRAAT ## Geeft als resultaat de eenzijdige kans van de chi-kwadraatverdeling
+CHIINV = CHI.KWADRAAT.INV ## Geeft als resultaat de inverse van een eenzijdige kans van de chi-kwadraatverdeling
+CHITEST = CHI.TOETS ## Geeft als resultaat de onafhankelijkheidstoets
+CONFIDENCE = BETROUWBAARHEID ## Geeft als resultaat het betrouwbaarheidsinterval van een gemiddelde waarde voor de elementen van een populatie
+CORREL = CORRELATIE ## Geeft als resultaat de correlatiecoëfficiënt van twee gegevensverzamelingen
+COUNT = AANTAL ## Telt het aantal getallen in de argumentenlijst
+COUNTA = AANTALARG ## Telt het aantal waarden in de argumentenlijst
+COUNTBLANK = AANTAL.LEGE.CELLEN ## Telt het aantal lege cellen in een bereik
+COUNTIF = AANTAL.ALS ## Telt in een bereik het aantal cellen die voldoen aan een bepaald criterium
+COUNTIFS = AANTALLEN.ALS ## Telt in een bereik het aantal cellen die voldoen aan meerdere criteria
+COVAR = COVARIANTIE ## Geeft als resultaat de covariantie, het gemiddelde van de producten van de gepaarde deviaties
+CRITBINOM = CRIT.BINOM ## Geeft als resultaat de kleinste waarde waarvoor de binomiale verdeling kleiner is dan of gelijk is aan het criterium
+DEVSQ = DEV.KWAD ## Geeft als resultaat de som van de deviaties in het kwadraat
+EXPONDIST = EXPON.VERD ## Geeft als resultaat de exponentiële verdeling
+FDIST = F.VERDELING ## Geeft als resultaat de F-verdeling
+FINV = F.INVERSE ## Geeft als resultaat de inverse van de F-verdeling
+FISHER = FISHER ## Geeft als resultaat de Fisher-transformatie
+FISHERINV = FISHER.INV ## Geeft als resultaat de inverse van de Fisher-transformatie
+FORECAST = VOORSPELLEN ## Geeft als resultaat een waarde op basis van een lineaire trend
+FREQUENCY = FREQUENTIE ## Geeft als resultaat een frequentieverdeling in de vorm van een verticale matrix
+FTEST = F.TOETS ## Geeft als resultaat een F-toets
+GAMMADIST = GAMMA.VERD ## Geeft als resultaat de gamma-verdeling
+GAMMAINV = GAMMA.INV ## Geeft als resultaat de inverse van de cumulatieve gamma-verdeling
+GAMMALN = GAMMA.LN ## Geeft als resultaat de natuurlijke logaritme van de gamma-functie, G(x)
+GEOMEAN = MEETK.GEM ## Geeft als resultaat het meetkundige gemiddelde
+GROWTH = GROEI ## Geeft als resultaat de waarden voor een exponentiële trend
+HARMEAN = HARM.GEM ## Geeft als resultaat het harmonische gemiddelde
+HYPGEOMDIST = HYPERGEO.VERD ## Geeft als resultaat de hypergeometrische verdeling
+INTERCEPT = SNIJPUNT ## Geeft als resultaat het snijpunt van de lineaire regressielijn met de y-as
+KURT = KURTOSIS ## Geeft als resultaat de kurtosis van een gegevensverzameling
+LARGE = GROOTSTE ## Geeft als resultaat de op k-1 na grootste waarde in een gegevensverzameling
+LINEST = LIJNSCH ## Geeft als resultaat de parameters van een lineaire trend
+LOGEST = LOGSCH ## Geeft als resultaat de parameters van een exponentiële trend
+LOGINV = LOG.NORM.INV ## Geeft als resultaat de inverse van de logaritmische normale verdeling
+LOGNORMDIST = LOG.NORM.VERD ## Geeft als resultaat de cumulatieve logaritmische normale verdeling
+MAX = MAX ## Geeft als resultaat de maximumwaarde in een lijst met argumenten
+MAXA = MAXA ## Geeft als resultaat de maximumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden
+MEDIAN = MEDIAAN ## Geeft als resultaat de mediaan van de opgegeven getallen
+MIN = MIN ## Geeft als resultaat de minimumwaarde in een lijst met argumenten
+MINA = MINA ## Geeft als resultaat de minimumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden
+MODE = MODUS ## Geeft als resultaat de meest voorkomende waarde in een gegevensverzameling
+NEGBINOMDIST = NEG.BINOM.VERD ## Geeft als resultaat de negatieve binomiaalverdeling
+NORMDIST = NORM.VERD ## Geeft als resultaat de cumulatieve normale verdeling
+NORMINV = NORM.INV ## Geeft als resultaat de inverse van de cumulatieve standaardnormale verdeling
+NORMSDIST = STAND.NORM.VERD ## Geeft als resultaat de cumulatieve standaardnormale verdeling
+NORMSINV = STAND.NORM.INV ## Geeft als resultaat de inverse van de cumulatieve normale verdeling
+PEARSON = PEARSON ## Geeft als resultaat de correlatiecoëfficiënt van Pearson
+PERCENTILE = PERCENTIEL ## Geeft als resultaat het k-de percentiel van waarden in een bereik
+PERCENTRANK = PERCENT.RANG ## Geeft als resultaat de positie, in procenten uitgedrukt, van een waarde in de rangorde van een gegevensverzameling
+PERMUT = PERMUTATIES ## Geeft als resultaat het aantal permutaties voor een gegeven aantal objecten
+POISSON = POISSON ## Geeft als resultaat de Poisson-verdeling
+PROB = KANS ## Geeft als resultaat de kans dat waarden zich tussen twee grenzen bevinden
+QUARTILE = KWARTIEL ## Geeft als resultaat het kwartiel van een gegevensverzameling
+RANK = RANG ## Geeft als resultaat het rangnummer van een getal in een lijst getallen
+RSQ = R.KWADRAAT ## Geeft als resultaat het kwadraat van de Pearson-correlatiecoëfficiënt
+SKEW = SCHEEFHEID ## Geeft als resultaat de mate van asymmetrie van een verdeling
+SLOPE = RICHTING ## Geeft als resultaat de richtingscoëfficiënt van een lineaire regressielijn
+SMALL = KLEINSTE ## Geeft als resultaat de op k-1 na kleinste waarde in een gegevensverzameling
+STANDARDIZE = NORMALISEREN ## Geeft als resultaat een genormaliseerde waarde
+STDEV = STDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef
+STDEVA = STDEVA ## Maakt een schatting van de standaarddeviatie op basis van een steekproef, inclusief getallen, tekst en logische waarden
+STDEVP = STDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie
+STDEVPA = STDEVPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden
+STEYX = STAND.FOUT.YX ## Geeft als resultaat de standaardfout in de voorspelde y-waarde voor elke x in een regressie
+TDIST = T.VERD ## Geeft als resultaat de Student T-verdeling
+TINV = T.INV ## Geeft als resultaat de inverse van de Student T-verdeling
+TREND = TREND ## Geeft als resultaat de waarden voor een lineaire trend
+TRIMMEAN = GETRIMD.GEM ## Geeft als resultaat het gemiddelde van waarden in een gegevensverzameling
+TTEST = T.TOETS ## Geeft als resultaat de kans met behulp van de Student T-toets
+VAR = VAR ## Maakt een schatting van de variantie op basis van een steekproef
+VARA = VARA ## Maakt een schatting van de variantie op basis van een steekproef, inclusief getallen, tekst en logische waarden
+VARP = VARP ## Berekent de variantie op basis van de volledige populatie
+VARPA = VARPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden
+WEIBULL = WEIBULL ## Geeft als resultaat de Weibull-verdeling
+ZTEST = Z.TOETS ## Geeft als resultaat de eenzijdige kanswaarde van een Z-toets
+
+
+##
+## Text functions Tekstfuncties
+##
+ASC = ASC ## Wijzigt Nederlandse letters of katakanatekens over de volle breedte (dubbel-bytetekens) binnen een tekenreeks in tekens over de halve breedte (enkel-bytetekens)
+BAHTTEXT = BAHT.TEKST ## Converteert een getal naar tekst met de valutanotatie ß (baht)
+CHAR = TEKEN ## Geeft als resultaat het teken dat hoort bij de opgegeven code
+CLEAN = WISSEN.CONTROL ## Verwijdert alle niet-afdrukbare tekens uit een tekst
+CODE = CODE ## Geeft als resultaat de numerieke code voor het eerste teken in een tekenreeks
+CONCATENATE = TEKST.SAMENVOEGEN ## Voegt verschillende tekstfragmenten samen tot één tekstfragment
+DOLLAR = EURO ## Converteert een getal naar tekst met de valutanotatie € (euro)
+EXACT = GELIJK ## Controleert of twee tekenreeksen identiek zijn
+FIND = VIND.ALLES ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters)
+FINDB = VIND.ALLES.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters)
+FIXED = VAST ## Maakt een getal als tekst met een vast aantal decimalen op
+JIS = JIS ## Wijzigt Nederlandse letters of katakanatekens over de halve breedte (enkel-bytetekens) binnen een tekenreeks in tekens over de volle breedte (dubbel-bytetekens)
+LEFT = LINKS ## Geeft als resultaat de meest linkse tekens in een tekenreeks
+LEFTB = LINKSB ## Geeft als resultaat de meest linkse tekens in een tekenreeks
+LEN = LENGTE ## Geeft als resultaat het aantal tekens in een tekenreeks
+LENB = LENGTEB ## Geeft als resultaat het aantal tekens in een tekenreeks
+LOWER = KLEINE.LETTERS ## Zet tekst om in kleine letters
+MID = MIDDEN ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft
+MIDB = DEELB ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft
+PHONETIC = FONETISCH ## Haalt de fonetische tekens (furigana) uit een tekenreeks op
+PROPER = BEGINLETTERS ## Zet de eerste letter van elk woord in een tekst om in een hoofdletter
+REPLACE = VERVANG ## Vervangt tekens binnen een tekst
+REPLACEB = VERVANGENB ## Vervangt tekens binnen een tekst
+REPT = HERHALING ## Herhaalt een tekst een aantal malen
+RIGHT = RECHTS ## Geeft als resultaat de meest rechtse tekens in een tekenreeks
+RIGHTB = RECHTSB ## Geeft als resultaat de meest rechtse tekens in een tekenreeks
+SEARCH = VIND.SPEC ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters)
+SEARCHB = VIND.SPEC.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters)
+SUBSTITUTE = SUBSTITUEREN ## Vervangt oude tekst door nieuwe tekst in een tekenreeks
+T = T ## Converteert de argumenten naar tekst
+TEXT = TEKST ## Maakt een getal op en converteert het getal naar tekst
+TRIM = SPATIES.WISSEN ## Verwijdert de spaties uit een tekst
+UPPER = HOOFDLETTERS ## Zet tekst om in hoofdletters
+VALUE = WAARDE ## Converteert tekst naar een getal
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config
new file mode 100644
index 0000000..56feff1
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = kr
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NULL!
+DIV0 = #DIV/0!
+VALUE = #VERDI!
+REF = #REF!
+NAME = #NAVN?
+NUM = #NUM!
+NA = #I/T
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions
new file mode 100644
index 0000000..2c6c891
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Funksjonene Tillegg og Automatisering
+##
+GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data som er lagret i en pivottabellrapport
+
+
+##
+## Cube functions Kubefunksjoner
+##
+CUBEKPIMEMBER = KUBEKPIMEDLEM ## Returnerer navnet, egenskapen og målet for en viktig ytelsesindikator (KPI), og viser navnet og egenskapen i cellen. En KPI er en målbar enhet, for eksempel månedlig bruttoinntjening eller kvartalsvis inntjening per ansatt, og brukes til å overvåke ytelsen i en organisasjon.
+CUBEMEMBER = KUBEMEDLEM ## Returnerer et medlem eller en tuppel i et kubehierarki. Brukes til å validere at medlemmet eller tuppelen finnes i kuben.
+CUBEMEMBERPROPERTY = KUBEMEDLEMEGENSKAP ## Returnerer verdien til en medlemsegenskap i kuben. Brukes til å validere at et medlemsnavn finnes i kuben, og til å returnere den angitte egenskapen for dette medlemmet.
+CUBERANKEDMEMBER = KUBERANGERTMEDLEM ## Returnerer det n-te, eller rangerte, medlemmet i et sett. Brukes til å returnere ett eller flere elementer i et sett, for eksempel de 10 beste studentene.
+CUBESET = KUBESETT ## Definerer et beregnet sett av medlemmer eller tuppeler ved å sende et settuttrykk til kuben på serveren, noe som oppretter settet og deretter returnerer dette settet til Microsoft Office Excel.
+CUBESETCOUNT = KUBESETTANTALL ## Returnerer antallet elementer i et sett.
+CUBEVALUE = KUBEVERDI ## Returnerer en aggregert verdi fra en kube.
+
+
+##
+## Database functions Databasefunksjoner
+##
+DAVERAGE = DGJENNOMSNITT ## Returnerer gjennomsnittet av merkede databaseposter
+DCOUNT = DANTALL ## Teller celler som inneholder tall i en database
+DCOUNTA = DANTALLA ## Teller celler som ikke er tomme i en database
+DGET = DHENT ## Trekker ut fra en database en post som oppfyller angitte vilkår
+DMAX = DMAKS ## Returnerer maksimumsverdien fra merkede databaseposter
+DMIN = DMIN ## Returnerer minimumsverdien fra merkede databaseposter
+DPRODUCT = DPRODUKT ## Multipliserer verdiene i et bestemt felt med poster som oppfyller vilkårene i en database
+DSTDEV = DSTDAV ## Estimerer standardavviket basert på et utvalg av merkede databaseposter
+DSTDEVP = DSTAVP ## Beregner standardavviket basert på at merkede databaseposter utgjør hele populasjonen
+DSUM = DSUMMER ## Legger til tallene i feltkolonnen med poster, i databasen som oppfyller vilkårene
+DVAR = DVARIANS ## Estimerer variansen basert på et utvalg av merkede databaseposter
+DVARP = DVARIANSP ## Beregner variansen basert på at merkede databaseposter utgjør hele populasjonen
+
+
+##
+## Date and time functions Dato- og tidsfunksjoner
+##
+DATE = DATO ## Returnerer serienummeret som svarer til en bestemt dato
+DATEVALUE = DATOVERDI ## Konverterer en dato med tekstformat til et serienummer
+DAY = DAG ## Konverterer et serienummer til en dag i måneden
+DAYS360 = DAGER360 ## Beregner antall dager mellom to datoer basert på et år med 360 dager
+EDATE = DAG.ETTER ## Returnerer serienummeret som svarer til datoen som er det indikerte antall måneder før eller etter startdatoen
+EOMONTH = MÅNEDSSLUTT ## Returnerer serienummeret som svarer til siste dag i måneden, før eller etter et angitt antall måneder
+HOUR = TIME ## Konverterer et serienummer til en time
+MINUTE = MINUTT ## Konverterer et serienummer til et minutt
+MONTH = MÅNED ## Konverterer et serienummer til en måned
+NETWORKDAYS = NETT.ARBEIDSDAGER ## Returnerer antall hele arbeidsdager mellom to datoer
+NOW = NÅ ## Returnerer serienummeret som svarer til gjeldende dato og klokkeslett
+SECOND = SEKUND ## Konverterer et serienummer til et sekund
+TIME = TID ## Returnerer serienummeret som svarer til et bestemt klokkeslett
+TIMEVALUE = TIDSVERDI ## Konverterer et klokkeslett i tekstformat til et serienummer
+TODAY = IDAG ## Returnerer serienummeret som svarer til dagens dato
+WEEKDAY = UKEDAG ## Konverterer et serienummer til en ukedag
+WEEKNUM = UKENR ## Konverterer et serienummer til et tall som representerer hvilket nummer uken har i et år
+WORKDAY = ARBEIDSDAG ## Returnerer serienummeret som svarer til datoen før eller etter et angitt antall arbeidsdager
+YEAR = ÅR ## Konverterer et serienummer til et år
+YEARFRAC = ÅRDEL ## Returnerer brøkdelen for året, som svarer til antall hele dager mellom startdato og sluttdato
+
+
+##
+## Engineering functions Tekniske funksjoner
+##
+BESSELI = BESSELI ## Returnerer den endrede Bessel-funksjonen In(x)
+BESSELJ = BESSELJ ## Returnerer Bessel-funksjonen Jn(x)
+BESSELK = BESSELK ## Returnerer den endrede Bessel-funksjonen Kn(x)
+BESSELY = BESSELY ## Returnerer Bessel-funksjonen Yn(x)
+BIN2DEC = BINTILDES ## Konverterer et binært tall til et desimaltall
+BIN2HEX = BINTILHEKS ## Konverterer et binært tall til et heksadesimaltall
+BIN2OCT = BINTILOKT ## Konverterer et binært tall til et oktaltall
+COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koeffisienter til et komplekst tall
+CONVERT = KONVERTER ## Konverterer et tall fra ett målsystem til et annet
+DEC2BIN = DESTILBIN ## Konverterer et desimaltall til et binærtall
+DEC2HEX = DESTILHEKS ## Konverterer et heltall i 10-tallsystemet til et heksadesimalt tall
+DEC2OCT = DESTILOKT ## Konverterer et heltall i 10-tallsystemet til et oktaltall
+DELTA = DELTA ## Undersøker om to verdier er like
+ERF = FEILF ## Returnerer feilfunksjonen
+ERFC = FEILFK ## Returnerer den komplementære feilfunksjonen
+GESTEP = GRENSEVERDI ## Tester om et tall er større enn en terskelverdi
+HEX2BIN = HEKSTILBIN ## Konverterer et heksadesimaltall til et binært tall
+HEX2DEC = HEKSTILDES ## Konverterer et heksadesimalt tall til et heltall i 10-tallsystemet
+HEX2OCT = HEKSTILOKT ## Konverterer et heksadesimalt tall til et oktaltall
+IMABS = IMABS ## Returnerer absoluttverdien (koeffisienten) til et komplekst tall
+IMAGINARY = IMAGINÆR ## Returnerer den imaginære koeffisienten til et komplekst tall
+IMARGUMENT = IMARGUMENT ## Returnerer argumentet theta, som er en vinkel uttrykt i radianer
+IMCONJUGATE = IMKONJUGERT ## Returnerer den komplekse konjugaten til et komplekst tall
+IMCOS = IMCOS ## Returnerer cosinus til et komplekst tall
+IMDIV = IMDIV ## Returnerer kvotienten til to komplekse tall
+IMEXP = IMEKSP ## Returnerer eksponenten til et komplekst tall
+IMLN = IMLN ## Returnerer den naturlige logaritmen for et komplekst tall
+IMLOG10 = IMLOG10 ## Returnerer logaritmen med grunntall 10 for et komplekst tall
+IMLOG2 = IMLOG2 ## Returnerer logaritmen med grunntall 2 for et komplekst tall
+IMPOWER = IMOPPHØY ## Returnerer et komplekst tall opphøyd til en heltallspotens
+IMPRODUCT = IMPRODUKT ## Returnerer produktet av komplekse tall
+IMREAL = IMREELL ## Returnerer den reelle koeffisienten til et komplekst tall
+IMSIN = IMSIN ## Returnerer sinus til et komplekst tall
+IMSQRT = IMROT ## Returnerer kvadratroten av et komplekst tall
+IMSUB = IMSUB ## Returnerer differansen mellom to komplekse tall
+IMSUM = IMSUMMER ## Returnerer summen av komplekse tall
+OCT2BIN = OKTTILBIN ## Konverterer et oktaltall til et binært tall
+OCT2DEC = OKTTILDES ## Konverterer et oktaltall til et desimaltall
+OCT2HEX = OKTTILHEKS ## Konverterer et oktaltall til et heksadesimaltall
+
+
+##
+## Financial functions Økonomiske funksjoner
+##
+ACCRINT = PÅLØPT.PERIODISK.RENTE ## Returnerer påløpte renter for et verdipapir som betaler periodisk rente
+ACCRINTM = PÅLØPT.FORFALLSRENTE ## Returnerer den påløpte renten for et verdipapir som betaler rente ved forfall
+AMORDEGRC = AMORDEGRC ## Returnerer avskrivningen for hver regnskapsperiode ved hjelp av en avskrivingskoeffisient
+AMORLINC = AMORLINC ## Returnerer avskrivingen for hver regnskapsperiode
+COUPDAYBS = OBLIG.DAGER.FF ## Returnerer antall dager fra begynnelsen av den rentebærende perioden til innløsningsdatoen
+COUPDAYS = OBLIG.DAGER ## Returnerer antall dager i den rentebærende perioden som inneholder innløsningsdatoen
+COUPDAYSNC = OBLIG.DAGER.NF ## Returnerer antall dager fra betalingsdato til neste renteinnbetalingsdato
+COUPNCD = OBLIG.DAGER.EF ## Returnerer obligasjonsdatoen som kommer etter oppgjørsdatoen
+COUPNUM = OBLIG.ANTALL ## Returnerer antall obligasjoner som skal betales mellom oppgjørsdatoen og forfallsdatoen
+COUPPCD = OBLIG.DAG.FORRIGE ## Returnerer obligasjonsdatoen som kommer før oppgjørsdatoen
+CUMIPMT = SAMLET.RENTE ## Returnerer den kumulative renten som er betalt mellom to perioder
+CUMPRINC = SAMLET.HOVEDSTOL ## Returnerer den kumulative hovedstolen som er betalt for et lån mellom to perioder
+DB = DAVSKR ## Returnerer avskrivningen for et aktivum i en angitt periode, foretatt med fast degressiv avskrivning
+DDB = DEGRAVS ## Returnerer avskrivningen for et aktivum for en gitt periode, ved hjelp av dobbel degressiv avskrivning eller en metode som du selv angir
+DISC = DISKONTERT ## Returnerer diskonteringsraten for et verdipapir
+DOLLARDE = DOLLARDE ## Konverterer en valutapris uttrykt som en brøk, til en valutapris uttrykt som et desimaltall
+DOLLARFR = DOLLARBR ## Konverterer en valutapris uttrykt som et desimaltall, til en valutapris uttrykt som en brøk
+DURATION = VARIGHET ## Returnerer årlig varighet for et verdipapir med renter som betales periodisk
+EFFECT = EFFEKTIV.RENTE ## Returnerer den effektive årlige rentesatsen
+FV = SLUTTVERDI ## Returnerer fremtidig verdi for en investering
+FVSCHEDULE = SVPLAN ## Returnerer den fremtidige verdien av en inngående hovedstol etter å ha anvendt en serie med sammensatte rentesatser
+INTRATE = RENTESATS ## Returnerer rentefoten av et fullfinansiert verdipapir
+IPMT = RAVDRAG ## Returnerer betalte renter på en investering for en gitt periode
+IRR = IR ## Returnerer internrenten for en serie kontantstrømmer
+ISPMT = ER.AVDRAG ## Beregner renten som er betalt for en investering i løpet av en bestemt periode
+MDURATION = MVARIGHET ## Returnerer Macauleys modifiserte varighet for et verdipapir med en antatt pålydende verdi på kr 100,00
+MIRR = MODIR ## Returnerer internrenten der positive og negative kontantstrømmer finansieres med forskjellige satser
+NOMINAL = NOMINELL ## Returnerer årlig nominell rentesats
+NPER = PERIODER ## Returnerer antall perioder for en investering
+NPV = NNV ## Returnerer netto nåverdi for en investering, basert på en serie periodiske kontantstrømmer og en rentesats
+ODDFPRICE = AVVIKFP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde første periode
+ODDFYIELD = AVVIKFP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde første periode
+ODDLPRICE = AVVIKSP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde siste periode
+ODDLYIELD = AVVIKSP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde siste periode
+PMT = AVDRAG ## Returnerer periodisk betaling for en annuitet
+PPMT = AMORT ## Returnerer betalingen på hovedstolen for en investering i en gitt periode
+PRICE = PRIS ## Returnerer prisen per pålydende kr 100 for et verdipapir som gir periodisk avkastning
+PRICEDISC = PRIS.DISKONTERT ## Returnerer prisen per pålydende kr 100 for et diskontert verdipapir
+PRICEMAT = PRIS.FORFALL ## Returnerer prisen per pålydende kr 100 av et verdipapir som betaler rente ved forfall
+PV = NÅVERDI ## Returnerer nåverdien av en investering
+RATE = RENTE ## Returnerer rentesatsen per periode for en annuitet
+RECEIVED = MOTTATT.AVKAST ## Returnerer summen som mottas ved forfallsdato for et fullinvestert verdipapir
+SLN = LINAVS ## Returnerer den lineære avskrivningen for et aktivum i én periode
+SYD = ÅRSAVS ## Returnerer årsavskrivningen for et aktivum i en angitt periode
+TBILLEQ = TBILLEKV ## Returnerer den obligasjonsekvivalente avkastningen for en statsobligasjon
+TBILLPRICE = TBILLPRIS ## Returnerer prisen per pålydende kr 100 for en statsobligasjon
+TBILLYIELD = TBILLAVKASTNING ## Returnerer avkastningen til en statsobligasjon
+VDB = VERDIAVS ## Returnerer avskrivningen for et aktivum i en angitt periode eller delperiode, ved hjelp av degressiv avskrivning
+XIRR = XIR ## Returnerer internrenten for en serie kontantstrømmer som ikke nødvendigvis er periodiske
+XNPV = XNNV ## Returnerer netto nåverdi for en serie kontantstrømmer som ikke nødvendigvis er periodiske
+YIELD = AVKAST ## Returnerer avkastningen på et verdipapir som betaler periodisk rente
+YIELDDISC = AVKAST.DISKONTERT ## Returnerer årlig avkastning for et diskontert verdipapir, for eksempel en statskasseveksel
+YIELDMAT = AVKAST.FORFALL ## Returnerer den årlige avkastningen for et verdipapir som betaler rente ved forfallsdato
+
+
+##
+## Information functions Informasjonsfunksjoner
+##
+CELL = CELLE ## Returnerer informasjon om formatering, plassering eller innholdet til en celle
+ERROR.TYPE = FEIL.TYPE ## Returnerer et tall som svarer til en feiltype
+INFO = INFO ## Returnerer informasjon om gjeldende operativmiljø
+ISBLANK = ERTOM ## Returnerer SANN hvis verdien er tom
+ISERR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst annen feilverdi enn #I/T
+ISERROR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst feilverdi
+ISEVEN = ERPARTALL ## Returnerer SANN hvis tallet er et partall
+ISLOGICAL = ERLOGISK ## Returnerer SANN hvis verdien er en logisk verdi
+ISNA = ERIT ## Returnerer SANN hvis verdien er feilverdien #I/T
+ISNONTEXT = ERIKKETEKST ## Returnerer SANN hvis verdien ikke er tekst
+ISNUMBER = ERTALL ## Returnerer SANN hvis verdien er et tall
+ISODD = ERODDETALL ## Returnerer SANN hvis tallet er et oddetall
+ISREF = ERREF ## Returnerer SANN hvis verdien er en referanse
+ISTEXT = ERTEKST ## Returnerer SANN hvis verdien er tekst
+N = N ## Returnerer en verdi som er konvertert til et tall
+NA = IT ## Returnerer feilverdien #I/T
+TYPE = VERDITYPE ## Returnerer et tall som indikerer datatypen til en verdi
+
+
+##
+## Logical functions Logiske funksjoner
+##
+AND = OG ## Returnerer SANN hvis alle argumentene er lik SANN
+FALSE = USANN ## Returnerer den logiske verdien USANN
+IF = HVIS ## Angir en logisk test som skal utføres
+IFERROR = HVISFEIL ## Returnerer en verdi du angir hvis en formel evaluerer til en feil. Ellers returnerer den resultatet av formelen.
+NOT = IKKE ## Reverserer logikken til argumentet
+OR = ELLER ## Returnerer SANN hvis ett eller flere argumenter er lik SANN
+TRUE = SANN ## Returnerer den logiske verdien SANN
+
+
+##
+## Lookup and reference functions Oppslag- og referansefunksjoner
+##
+ADDRESS = ADRESSE ## Returnerer en referanse som tekst til en enkelt celle i et regneark
+AREAS = OMRÅDER ## Returnerer antall områder i en referanse
+CHOOSE = VELG ## Velger en verdi fra en liste med verdier
+COLUMN = KOLONNE ## Returnerer kolonnenummeret for en referanse
+COLUMNS = KOLONNER ## Returnerer antall kolonner i en referanse
+HLOOKUP = FINN.KOLONNE ## Leter i den øverste raden i en matrise og returnerer verdien for den angitte cellen
+HYPERLINK = HYPERKOBLING ## Oppretter en snarvei eller et hopp som åpner et dokument som er lagret på en nettverksserver, et intranett eller Internett
+INDEX = INDEKS ## Bruker en indeks til å velge en verdi fra en referanse eller matrise
+INDIRECT = INDIREKTE ## Returnerer en referanse angitt av en tekstverdi
+LOOKUP = SLÅ.OPP ## Slår opp verdier i en vektor eller matrise
+MATCH = SAMMENLIGNE ## Slår opp verdier i en referanse eller matrise
+OFFSET = FORSKYVNING ## Returnerer en referanseforskyvning fra en gitt referanse
+ROW = RAD ## Returnerer radnummeret for en referanse
+ROWS = RADER ## Returnerer antall rader i en referanse
+RTD = RTD ## Henter sanntidsdata fra et program som støtter COM-automatisering (automatisering: En måte å arbeide på med programobjekter fra et annet program- eller utviklingsverktøy. Tidligere kalt OLE-automatisering. Automatisering er en bransjestandard og en funksjon i Component Object Model (COM).)
+TRANSPOSE = TRANSPONER ## Returnerer transponeringen av en matrise
+VLOOKUP = FINN.RAD ## Leter i den første kolonnen i en matrise og flytter bortover raden for å returnere verdien til en celle
+
+
+##
+## Math and trigonometry functions Matematikk- og trigonometrifunksjoner
+##
+ABS = ABS ## Returnerer absoluttverdien til et tall
+ACOS = ARCCOS ## Returnerer arcus cosinus til et tall
+ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus til et tall
+ASIN = ARCSIN ## Returnerer arcus sinus til et tall
+ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus til et tall
+ATAN = ARCTAN ## Returnerer arcus tangens til et tall
+ATAN2 = ARCTAN2 ## Returnerer arcus tangens fra x- og y-koordinater
+ATANH = ARCTANH ## Returnerer den inverse hyperbolske tangens til et tall
+CEILING = AVRUND.GJELDENDE.MULTIPLUM ## Runder av et tall til nærmeste heltall eller til nærmeste signifikante multiplum
+COMBIN = KOMBINASJON ## Returnerer antall kombinasjoner for ett gitt antall objekter
+COS = COS ## Returnerer cosinus til et tall
+COSH = COSH ## Returnerer den hyperbolske cosinus til et tall
+DEGREES = GRADER ## Konverterer radianer til grader
+EVEN = AVRUND.TIL.PARTALL ## Runder av et tall oppover til nærmeste heltall som er et partall
+EXP = EKSP ## Returnerer e opphøyd i en angitt potens
+FACT = FAKULTET ## Returnerer fakultet til et tall
+FACTDOUBLE = DOBBELFAKT ## Returnerer et talls doble fakultet
+FLOOR = AVRUND.GJELDENDE.MULTIPLUM.NED ## Avrunder et tall nedover, mot null
+GCD = SFF ## Returnerer høyeste felles divisor
+INT = HELTALL ## Avrunder et tall nedover til nærmeste heltall
+LCM = MFM ## Returnerer minste felles multiplum
+LN = LN ## Returnerer den naturlige logaritmen til et tall
+LOG = LOG ## Returnerer logaritmen for et tall til et angitt grunntall
+LOG10 = LOG10 ## Returnerer logaritmen med grunntall 10 for et tall
+MDETERM = MDETERM ## Returnerer matrisedeterminanten til en matrise
+MINVERSE = MINVERS ## Returnerer den inverse matrisen til en matrise
+MMULT = MMULT ## Returnerer matriseproduktet av to matriser
+MOD = REST ## Returnerer resten fra en divisjon
+MROUND = MRUND ## Returnerer et tall avrundet til det ønskede multiplum
+MULTINOMIAL = MULTINOMINELL ## Returnerer det multinominelle for et sett med tall
+ODD = AVRUND.TIL.ODDETALL ## Runder av et tall oppover til nærmeste heltall som er et oddetall
+PI = PI ## Returnerer verdien av pi
+POWER = OPPHØYD.I ## Returnerer resultatet av et tall opphøyd i en potens
+PRODUCT = PRODUKT ## Multipliserer argumentene
+QUOTIENT = KVOTIENT ## Returnerer heltallsdelen av en divisjon
+RADIANS = RADIANER ## Konverterer grader til radianer
+RAND = TILFELDIG ## Returnerer et tilfeldig tall mellom 0 og 1
+RANDBETWEEN = TILFELDIGMELLOM ## Returnerer et tilfeldig tall innenfor et angitt område
+ROMAN = ROMERTALL ## Konverterer vanlige tall til romertall, som tekst
+ROUND = AVRUND ## Avrunder et tall til et angitt antall sifre
+ROUNDDOWN = AVRUND.NED ## Avrunder et tall nedover, mot null
+ROUNDUP = AVRUND.OPP ## Runder av et tall oppover, bort fra null
+SERIESSUM = SUMMER.REKKE ## Returnerer summen av en geometrisk rekke, basert på formelen
+SIGN = FORTEGN ## Returnerer fortegnet for et tall
+SIN = SIN ## Returnerer sinus til en gitt vinkel
+SINH = SINH ## Returnerer den hyperbolske sinus til et tall
+SQRT = ROT ## Returnerer en positiv kvadratrot
+SQRTPI = ROTPI ## Returnerer kvadratroten av (tall * pi)
+SUBTOTAL = DELSUM ## Returnerer en delsum i en liste eller database
+SUM = SUMMER ## Legger sammen argumentene
+SUMIF = SUMMERHVIS ## Legger sammen cellene angitt ved et gitt vilkår
+SUMIFS = SUMMER.HVIS.SETT ## Legger sammen cellene i et område som oppfyller flere vilkår
+SUMPRODUCT = SUMMERPRODUKT ## Returnerer summen av produktene av tilsvarende matrisekomponenter
+SUMSQ = SUMMERKVADRAT ## Returnerer kvadratsummen av argumentene
+SUMX2MY2 = SUMMERX2MY2 ## Returnerer summen av differansen av kvadratene for tilsvarende verdier i to matriser
+SUMX2PY2 = SUMMERX2PY2 ## Returnerer summen av kvadratsummene for tilsvarende verdier i to matriser
+SUMXMY2 = SUMMERXMY2 ## Returnerer summen av kvadratene av differansen for tilsvarende verdier i to matriser
+TAN = TAN ## Returnerer tangens for et tall
+TANH = TANH ## Returnerer den hyperbolske tangens for et tall
+TRUNC = AVKORT ## Korter av et tall til et heltall
+
+
+##
+## Statistical functions Statistiske funksjoner
+##
+AVEDEV = GJENNOMSNITTSAVVIK ## Returnerer datapunktenes gjennomsnittlige absoluttavvik fra middelverdien
+AVERAGE = GJENNOMSNITT ## Returnerer gjennomsnittet for argumentene
+AVERAGEA = GJENNOMSNITTA ## Returnerer gjennomsnittet for argumentene, inkludert tall, tekst og logiske verdier
+AVERAGEIF = GJENNOMSNITTHVIS ## Returnerer gjennomsnittet (aritmetisk gjennomsnitt) av alle cellene i et område som oppfyller et bestemt vilkår
+AVERAGEIFS = GJENNOMSNITT.HVIS.SETT ## Returnerer gjennomsnittet (aritmetisk middelverdi) av alle celler som oppfyller flere vilkår.
+BETADIST = BETA.FORDELING ## Returnerer den kumulative betafordelingsfunksjonen
+BETAINV = INVERS.BETA.FORDELING ## Returnerer den inverse verdien til fordelingsfunksjonen for en angitt betafordeling
+BINOMDIST = BINOM.FORDELING ## Returnerer den individuelle binomiske sannsynlighetsfordelingen
+CHIDIST = KJI.FORDELING ## Returnerer den ensidige sannsynligheten for en kjikvadrert fordeling
+CHIINV = INVERS.KJI.FORDELING ## Returnerer den inverse av den ensidige sannsynligheten for den kjikvadrerte fordelingen
+CHITEST = KJI.TEST ## Utfører testen for uavhengighet
+CONFIDENCE = KONFIDENS ## Returnerer konfidensintervallet til gjennomsnittet for en populasjon
+CORREL = KORRELASJON ## Returnerer korrelasjonskoeffisienten mellom to datasett
+COUNT = ANTALL ## Teller hvor mange tall som er i argumentlisten
+COUNTA = ANTALLA ## Teller hvor mange verdier som er i argumentlisten
+COUNTBLANK = TELLBLANKE ## Teller antall tomme celler i et område.
+COUNTIF = ANTALL.HVIS ## Teller antall celler i et område som oppfyller gitte vilkår
+COUNTIFS = ANTALL.HVIS.SETT ## Teller antallet ikke-tomme celler i et område som oppfyller flere vilkår
+COVAR = KOVARIANS ## Returnerer kovariansen, gjennomsnittet av produktene av parvise avvik
+CRITBINOM = GRENSE.BINOM ## Returnerer den minste verdien der den kumulative binomiske fordelingen er mindre enn eller lik en vilkårsverdi
+DEVSQ = AVVIK.KVADRERT ## Returnerer summen av kvadrerte avvik
+EXPONDIST = EKSP.FORDELING ## Returnerer eksponentialfordelingen
+FDIST = FFORDELING ## Returnerer F-sannsynlighetsfordelingen
+FINV = FFORDELING.INVERS ## Returnerer den inverse av den sannsynlige F-fordelingen
+FISHER = FISHER ## Returnerer Fisher-transformasjonen
+FISHERINV = FISHERINV ## Returnerer den inverse av Fisher-transformasjonen
+FORECAST = PROGNOSE ## Returnerer en verdi langs en lineær trend
+FREQUENCY = FREKVENS ## Returnerer en frekvensdistribusjon som en loddrett matrise
+FTEST = FTEST ## Returnerer resultatet av en F-test
+GAMMADIST = GAMMAFORDELING ## Returnerer gammafordelingen
+GAMMAINV = GAMMAINV ## Returnerer den inverse av den gammakumulative fordelingen
+GAMMALN = GAMMALN ## Returnerer den naturlige logaritmen til gammafunksjonen G(x)
+GEOMEAN = GJENNOMSNITT.GEOMETRISK ## Returnerer den geometriske middelverdien
+GROWTH = VEKST ## Returnerer verdier langs en eksponentiell trend
+HARMEAN = GJENNOMSNITT.HARMONISK ## Returnerer den harmoniske middelverdien
+HYPGEOMDIST = HYPGEOM.FORDELING ## Returnerer den hypergeometriske fordelingen
+INTERCEPT = SKJÆRINGSPUNKT ## Returnerer skjæringspunktet til den lineære regresjonslinjen
+KURT = KURT ## Returnerer kurtosen til et datasett
+LARGE = N.STØRST ## Returnerer den n-te største verdien i et datasett
+LINEST = RETTLINJE ## Returnerer parameterne til en lineær trend
+LOGEST = KURVE ## Returnerer parameterne til en eksponentiell trend
+LOGINV = LOGINV ## Returnerer den inverse lognormale fordelingen
+LOGNORMDIST = LOGNORMFORD ## Returnerer den kumulative lognormale fordelingen
+MAX = STØRST ## Returnerer maksimumsverdien i en argumentliste
+MAXA = MAKSA ## Returnerer maksimumsverdien i en argumentliste, inkludert tall, tekst og logiske verdier
+MEDIAN = MEDIAN ## Returnerer medianen til tallene som er gitt
+MIN = MIN ## Returnerer minimumsverdien i en argumentliste
+MINA = MINA ## Returnerer den minste verdien i en argumentliste, inkludert tall, tekst og logiske verdier
+MODE = MODUS ## Returnerer den vanligste verdien i et datasett
+NEGBINOMDIST = NEGBINOM.FORDELING ## Returnerer den negative binomiske fordelingen
+NORMDIST = NORMALFORDELING ## Returnerer den kumulative normalfordelingen
+NORMINV = NORMINV ## Returnerer den inverse kumulative normalfordelingen
+NORMSDIST = NORMSFORDELING ## Returnerer standard kumulativ normalfordeling
+NORMSINV = NORMSINV ## Returnerer den inverse av den den kumulative standard normalfordelingen
+PEARSON = PEARSON ## Returnerer produktmomentkorrelasjonskoeffisienten, Pearson
+PERCENTILE = PERSENTIL ## Returnerer den n-te persentil av verdiene i et område
+PERCENTRANK = PROSENTDEL ## Returnerer prosentrangeringen av en verdi i et datasett
+PERMUT = PERMUTER ## Returnerer antall permutasjoner for et gitt antall objekter
+POISSON = POISSON ## Returnerer Poissons sannsynlighetsfordeling
+PROB = SANNSYNLIG ## Returnerer sannsynligheten for at verdier i et område ligger mellom to grenser
+QUARTILE = KVARTIL ## Returnerer kvartilen til et datasett
+RANK = RANG ## Returnerer rangeringen av et tall, eller plassen tallet har i en rekke
+RSQ = RKVADRAT ## Returnerer kvadratet av produktmomentkorrelasjonskoeffisienten (Pearsons r)
+SKEW = SKJEVFORDELING ## Returnerer skjevheten i en fordeling
+SLOPE = STIGNINGSTALL ## Returnerer stigningtallet for den lineære regresjonslinjen
+SMALL = N.MINST ## Returnerer den n-te minste verdien i et datasett
+STANDARDIZE = NORMALISER ## Returnerer en normalisert verdi
+STDEV = STDAV ## Estimere standardavvik på grunnlag av et utvalg
+STDEVA = STDAVVIKA ## Estimerer standardavvik basert på et utvalg, inkludert tall, tekst og logiske verdier
+STDEVP = STDAVP ## Beregner standardavvik basert på hele populasjonen
+STDEVPA = STDAVVIKPA ## Beregner standardavvik basert på hele populasjonen, inkludert tall, tekst og logiske verdier
+STEYX = STANDARDFEIL ## Returnerer standardfeilen for den predikerte y-verdien for hver x i regresjonen
+TDIST = TFORDELING ## Returnerer en Student t-fordeling
+TINV = TINV ## Returnerer den inverse Student t-fordelingen
+TREND = TREND ## Returnerer verdier langs en lineær trend
+TRIMMEAN = TRIMMET.GJENNOMSNITT ## Returnerer den interne middelverdien til et datasett
+TTEST = TTEST ## Returnerer sannsynligheten assosiert med en Student t-test
+VAR = VARIANS ## Estimerer varians basert på et utvalg
+VARA = VARIANSA ## Estimerer varians basert på et utvalg, inkludert tall, tekst og logiske verdier
+VARP = VARIANSP ## Beregner varians basert på hele populasjonen
+VARPA = VARIANSPA ## Beregner varians basert på hele populasjonen, inkludert tall, tekst og logiske verdier
+WEIBULL = WEIBULL.FORDELING ## Returnerer Weibull-fordelingen
+ZTEST = ZTEST ## Returnerer den ensidige sannsynlighetsverdien for en z-test
+
+
+##
+## Text functions Tekstfunksjoner
+##
+ASC = STIGENDE ## Endrer fullbreddes (dobbeltbyte) engelske bokstaver eller katakana i en tegnstreng, til halvbreddes (enkeltbyte) tegn
+BAHTTEXT = BAHTTEKST ## Konverterer et tall til tekst, og bruker valutaformatet ß (baht)
+CHAR = TEGNKODE ## Returnerer tegnet som svarer til kodenummeret
+CLEAN = RENSK ## Fjerner alle tegn som ikke kan skrives ut, fra teksten
+CODE = KODE ## Returnerer en numerisk kode for det første tegnet i en tekststreng
+CONCATENATE = KJEDE.SAMMEN ## Slår sammen flere tekstelementer til ett tekstelement
+DOLLAR = VALUTA ## Konverterer et tall til tekst, og bruker valutaformatet $ (dollar)
+EXACT = EKSAKT ## Kontrollerer om to tekstverdier er like
+FIND = FINN ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver)
+FINDB = FINNB ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver)
+FIXED = FASTSATT ## Formaterer et tall som tekst med et bestemt antall desimaler
+JIS = JIS ## Endrer halvbreddes (enkeltbyte) engelske bokstaver eller katakana i en tegnstreng, til fullbreddes (dobbeltbyte) tegn
+LEFT = VENSTRE ## Returnerer tegnene lengst til venstre i en tekstverdi
+LEFTB = VENSTREB ## Returnerer tegnene lengst til venstre i en tekstverdi
+LEN = LENGDE ## Returnerer antall tegn i en tekststreng
+LENB = LENGDEB ## Returnerer antall tegn i en tekststreng
+LOWER = SMÅ ## Konverterer tekst til små bokstaver
+MID = DELTEKST ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir
+MIDB = DELTEKSTB ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir
+PHONETIC = FURIGANA ## Trekker ut fonetiske tegn (furigana) fra en tekststreng
+PROPER = STOR.FORBOKSTAV ## Gir den første bokstaven i hvert ord i en tekstverdi stor forbokstav
+REPLACE = ERSTATT ## Erstatter tegn i en tekst
+REPLACEB = ERSTATTB ## Erstatter tegn i en tekst
+REPT = GJENTA ## Gjentar tekst et gitt antall ganger
+RIGHT = HØYRE ## Returnerer tegnene lengst til høyre i en tekstverdi
+RIGHTB = HØYREB ## Returnerer tegnene lengst til høyre i en tekstverdi
+SEARCH = SØK ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver)
+SEARCHB = SØKB ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver)
+SUBSTITUTE = BYTT.UT ## Bytter ut gammel tekst med ny tekst i en tekststreng
+T = T ## Konverterer argumentene til tekst
+TEXT = TEKST ## Formaterer et tall og konverterer det til tekst
+TRIM = TRIMME ## Fjerner mellomrom fra tekst
+UPPER = STORE ## Konverterer tekst til store bokstaver
+VALUE = VERDI ## Konverterer et tekstargument til et tall
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config
new file mode 100644
index 0000000..6ca363d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = zł
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #ZERO!
+DIV0 = #DZIEL/0!
+VALUE = #ARG!
+REF = #ADR!
+NAME = #NAZWA?
+NUM = #LICZBA!
+NA = #N/D!
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions
new file mode 100644
index 0000000..3f2ee98
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Funkcje dodatków i automatyzacji
+##
+GETPIVOTDATA = WEŹDANETABELI ## Zwraca dane przechowywane w raporcie tabeli przestawnej.
+
+
+##
+## Cube functions Funkcje modułów
+##
+CUBEKPIMEMBER = ELEMENT.KPI.MODUŁU ## Zwraca nazwę, właściwość i miarę kluczowego wskaźnika wydajności (KPI) oraz wyświetla nazwę i właściwość w komórce. Wskaźnik KPI jest miarą ilościową, taką jak miesięczny zysk brutto lub kwartalna fluktuacja pracowników, używaną do monitorowania wydajności organizacji.
+CUBEMEMBER = ELEMENT.MODUŁU ## Zwraca element lub krotkę z hierarchii modułu. Służy do sprawdzania, czy element lub krotka istnieje w module.
+CUBEMEMBERPROPERTY = WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU ## Zwraca wartość właściwości elementu w module. Służy do sprawdzania, czy nazwa elementu istnieje w module, i zwracania określonej właściwości dla tego elementu.
+CUBERANKEDMEMBER = USZEREGOWANY.ELEMENT.MODUŁU ## Zwraca n-ty (albo uszeregowany) element zestawu. Służy do zwracania elementu lub elementów zestawu, na przykład najlepszego sprzedawcy lub 10 najlepszych studentów.
+CUBESET = ZESTAW.MODUŁÓW ## Definiuje obliczony zestaw elementów lub krotek, wysyłając wyrażenie zestawu do serwera modułu, który tworzy zestaw i zwraca go do programu Microsoft Office Excel.
+CUBESETCOUNT = LICZNIK.MODUŁÓW.ZESTAWU ## Zwraca liczbę elementów zestawu.
+CUBEVALUE = WARTOŚĆ.MODUŁU ## Zwraca zagregowaną wartość z modułu.
+
+
+##
+## Database functions Funkcje baz danych
+##
+DAVERAGE = BD.ŚREDNIA ## Zwraca wartość średniej wybranych wpisów bazy danych.
+DCOUNT = BD.ILE.REKORDÓW ## Zlicza komórki zawierające liczby w bazie danych.
+DCOUNTA = BD.ILE.REKORDÓW.A ## Zlicza niepuste komórki w bazie danych.
+DGET = BD.POLE ## Wyodrębnia z bazy danych jeden rekord spełniający określone kryteria.
+DMAX = BD.MAX ## Zwraca wartość maksymalną z wybranych wpisów bazy danych.
+DMIN = BD.MIN ## Zwraca wartość minimalną z wybranych wpisów bazy danych.
+DPRODUCT = BD.ILOCZYN ## Mnoży wartości w konkretnym, spełniającym kryteria polu rekordów bazy danych.
+DSTDEV = BD.ODCH.STANDARD ## Szacuje odchylenie standardowe na podstawie próbki z wybranych wpisów bazy danych.
+DSTDEVP = BD.ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji wybranych wpisów bazy danych.
+DSUM = BD.SUMA ## Dodaje liczby w kolumnie pól rekordów bazy danych, które spełniają kryteria.
+DVAR = BD.WARIANCJA ## Szacuje wariancję na podstawie próbki z wybranych wpisów bazy danych.
+DVARP = BD.WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji wybranych wpisów bazy danych.
+
+
+##
+## Date and time functions Funkcje dat, godzin i czasu
+##
+DATE = DATA ## Zwraca liczbę seryjną dla wybranej daty.
+DATEVALUE = DATA.WARTOŚĆ ## Konwertuje datę w formie tekstu na liczbę seryjną.
+DAY = DZIEŃ ## Konwertuje liczbę seryjną na dzień miesiąca.
+DAYS360 = DNI.360 ## Oblicza liczbę dni między dwiema datami na podstawie roku 360-dniowego.
+EDATE = UPŁDNI ## Zwraca liczbę seryjną daty jako wskazaną liczbę miesięcy przed określoną datą początkową lub po niej.
+EOMONTH = EOMONTH ## Zwraca liczbę seryjną ostatniego dnia miesiąca przed określoną liczbą miesięcy lub po niej.
+HOUR = GODZINA ## Konwertuje liczbę seryjną na godzinę.
+MINUTE = MINUTA ## Konwertuje liczbę seryjną na minutę.
+MONTH = MIESIĄC ## Konwertuje liczbę seryjną na miesiąc.
+NETWORKDAYS = NETWORKDAYS ## Zwraca liczbę pełnych dni roboczych między dwiema datami.
+NOW = TERAZ ## Zwraca liczbę seryjną bieżącej daty i godziny.
+SECOND = SEKUNDA ## Konwertuje liczbę seryjną na sekundę.
+TIME = CZAS ## Zwraca liczbę seryjną określonego czasu.
+TIMEVALUE = CZAS.WARTOŚĆ ## Konwertuje czas w formie tekstu na liczbę seryjną.
+TODAY = DZIŚ ## Zwraca liczbę seryjną dla daty bieżącej.
+WEEKDAY = DZIEŃ.TYG ## Konwertuje liczbę seryjną na dzień tygodnia.
+WEEKNUM = WEEKNUM ## Konwertuje liczbę seryjną na liczbę reprezentującą numer tygodnia w roku.
+WORKDAY = WORKDAY ## Zwraca liczbę seryjną dla daty przed określoną liczbą dni roboczych lub po niej.
+YEAR = ROK ## Konwertuje liczbę seryjną na rok.
+YEARFRAC = YEARFRAC ## Zwraca część roku reprezentowaną przez pełną liczbę dni między datą początkową a datą końcową.
+
+
+##
+## Engineering functions Funkcje inżynierskie
+##
+BESSELI = BESSELI ## Zwraca wartość zmodyfikowanej funkcji Bessela In(x).
+BESSELJ = BESSELJ ## Zwraca wartość funkcji Bessela Jn(x).
+BESSELK = BESSELK ## Zwraca wartość zmodyfikowanej funkcji Bessela Kn(x).
+BESSELY = BESSELY ## Zwraca wartość funkcji Bessela Yn(x).
+BIN2DEC = BIN2DEC ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci dziesiętnej.
+BIN2HEX = BIN2HEX ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci szesnastkowej.
+BIN2OCT = BIN2OCT ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci ósemkowej.
+COMPLEX = COMPLEX ## Konwertuje część rzeczywistą i urojoną na liczbę zespoloną.
+CONVERT = CONVERT ## Konwertuje liczbę z jednego systemu miar na inny.
+DEC2BIN = DEC2BIN ## Konwertuje liczbę w postaci dziesiętnej na postać dwójkową.
+DEC2HEX = DEC2HEX ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci szesnastkowej.
+DEC2OCT = DEC2OCT ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci ósemkowej.
+DELTA = DELTA ## Sprawdza, czy dwie wartości są równe.
+ERF = ERF ## Zwraca wartość funkcji błędu.
+ERFC = ERFC ## Zwraca wartość komplementarnej funkcji błędu.
+GESTEP = GESTEP ## Sprawdza, czy liczba jest większa niż wartość progowa.
+HEX2BIN = HEX2BIN ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dwójkowej.
+HEX2DEC = HEX2DEC ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dziesiętnej.
+HEX2OCT = HEX2OCT ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci ósemkowej.
+IMABS = IMABS ## Zwraca wartość bezwzględną (moduł) liczby zespolonej.
+IMAGINARY = IMAGINARY ## Zwraca wartość części urojonej liczby zespolonej.
+IMARGUMENT = IMARGUMENT ## Zwraca wartość argumentu liczby zespolonej, przy czym kąt wyrażony jest w radianach.
+IMCONJUGATE = IMCONJUGATE ## Zwraca wartość liczby sprzężonej danej liczby zespolonej.
+IMCOS = IMCOS ## Zwraca wartość cosinusa liczby zespolonej.
+IMDIV = IMDIV ## Zwraca wartość ilorazu dwóch liczb zespolonych.
+IMEXP = IMEXP ## Zwraca postać wykładniczą liczby zespolonej.
+IMLN = IMLN ## Zwraca wartość logarytmu naturalnego liczby zespolonej.
+IMLOG10 = IMLOG10 ## Zwraca wartość logarytmu dziesiętnego liczby zespolonej.
+IMLOG2 = IMLOG2 ## Zwraca wartość logarytmu liczby zespolonej przy podstawie 2.
+IMPOWER = IMPOWER ## Zwraca wartość liczby zespolonej podniesionej do potęgi całkowitej.
+IMPRODUCT = IMPRODUCT ## Zwraca wartość iloczynu liczb zespolonych.
+IMREAL = IMREAL ## Zwraca wartość części rzeczywistej liczby zespolonej.
+IMSIN = IMSIN ## Zwraca wartość sinusa liczby zespolonej.
+IMSQRT = IMSQRT ## Zwraca wartość pierwiastka kwadratowego z liczby zespolonej.
+IMSUB = IMSUB ## Zwraca wartość różnicy dwóch liczb zespolonych.
+IMSUM = IMSUM ## Zwraca wartość sumy liczb zespolonych.
+OCT2BIN = OCT2BIN ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dwójkowej.
+OCT2DEC = OCT2DEC ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dziesiętnej.
+OCT2HEX = OCT2HEX ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci szesnastkowej.
+
+
+##
+## Financial functions Funkcje finansowe
+##
+ACCRINT = ACCRINT ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem okresowym.
+ACCRINTM = ACCRINTM ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem w terminie wykupu.
+AMORDEGRC = AMORDEGRC ## Zwraca amortyzację dla każdego okresu rozliczeniowego z wykorzystaniem współczynnika amortyzacji.
+AMORLINC = AMORLINC ## Zwraca amortyzację dla każdego okresu rozliczeniowego.
+COUPDAYBS = COUPDAYBS ## Zwraca liczbę dni od początku okresu dywidendy do dnia rozliczeniowego.
+COUPDAYS = COUPDAYS ## Zwraca liczbę dni w okresie dywidendy, z uwzględnieniem dnia rozliczeniowego.
+COUPDAYSNC = COUPDAYSNC ## Zwraca liczbę dni od dnia rozliczeniowego do daty następnego dnia dywidendy.
+COUPNCD = COUPNCD ## Zwraca dzień następnej dywidendy po dniu rozliczeniowym.
+COUPNUM = COUPNUM ## Zwraca liczbę dywidend płatnych między dniem rozliczeniowym a dniem wykupu.
+COUPPCD = COUPPCD ## Zwraca dzień poprzedniej dywidendy przed dniem rozliczeniowym.
+CUMIPMT = CUMIPMT ## Zwraca wartość procentu składanego płatnego między dwoma okresami.
+CUMPRINC = CUMPRINC ## Zwraca wartość kapitału skumulowanego spłaty pożyczki między dwoma okresami.
+DB = DB ## Zwraca amortyzację środka trwałego w danym okresie metodą degresywną z zastosowaniem stałej bazowej.
+DDB = DDB ## Zwraca amortyzację środka trwałego za podany okres metodą degresywną z zastosowaniem podwójnej bazowej lub metodą określoną przez użytkownika.
+DISC = DISC ## Zwraca wartość stopy dyskontowej papieru wartościowego.
+DOLLARDE = DOLLARDE ## Konwertuje cenę w postaci ułamkowej na cenę wyrażoną w postaci dziesiętnej.
+DOLLARFR = DOLLARFR ## Konwertuje cenę wyrażoną w postaci dziesiętnej na cenę wyrażoną w postaci ułamkowej.
+DURATION = DURATION ## Zwraca wartość rocznego przychodu z papieru wartościowego o okresowych wypłatach oprocentowania.
+EFFECT = EFFECT ## Zwraca wartość efektywnej rocznej stopy procentowej.
+FV = FV ## Zwraca przyszłą wartość lokaty.
+FVSCHEDULE = FVSCHEDULE ## Zwraca przyszłą wartość kapitału początkowego wraz z szeregiem procentów składanych.
+INTRATE = INTRATE ## Zwraca wartość stopy procentowej papieru wartościowego całkowicie ulokowanego.
+IPMT = IPMT ## Zwraca wysokość spłaty oprocentowania lokaty za dany okres.
+IRR = IRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii przepływów gotówkowych.
+ISPMT = ISPMT ## Oblicza wysokość spłaty oprocentowania za dany okres lokaty.
+MDURATION = MDURATION ## Zwraca wartość zmodyfikowanego okresu Macauleya dla papieru wartościowego o założonej wartości nominalnej 100 zł.
+MIRR = MIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla przypadku, gdy dodatnie i ujemne przepływy gotówkowe mają różne stopy.
+NOMINAL = NOMINAL ## Zwraca wysokość nominalnej rocznej stopy procentowej.
+NPER = NPER ## Zwraca liczbę okresów dla lokaty.
+NPV = NPV ## Zwraca wartość bieżącą netto lokaty na podstawie szeregu okresowych przepływów gotówkowych i stopy dyskontowej.
+ODDFPRICE = ODDFPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym pierwszym okresem.
+ODDFYIELD = ODDFYIELD ## Zwraca rentowność papieru wartościowego z nietypowym pierwszym okresem.
+ODDLPRICE = ODDLPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym ostatnim okresem.
+ODDLYIELD = ODDLYIELD ## Zwraca rentowność papieru wartościowego z nietypowym ostatnim okresem.
+PMT = PMT ## Zwraca wartość okresowej płatności raty rocznej.
+PPMT = PPMT ## Zwraca wysokość spłaty kapitału w przypadku lokaty dla danego okresu.
+PRICE = PRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem okresowym.
+PRICEDISC = PRICEDISC ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego zdyskontowanego.
+PRICEMAT = PRICEMAT ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem w terminie wykupu.
+PV = PV ## Zwraca wartość bieżącą lokaty.
+RATE = RATE ## Zwraca wysokość stopy procentowej w okresie raty rocznej.
+RECEIVED = RECEIVED ## Zwraca wartość kapitału otrzymanego przy wykupie papieru wartościowego całkowicie ulokowanego.
+SLN = SLN ## Zwraca amortyzację środka trwałego za jeden okres metodą liniową.
+SYD = SYD ## Zwraca amortyzację środka trwałego za dany okres metodą sumy cyfr lat amortyzacji.
+TBILLEQ = TBILLEQ ## Zwraca rentowność ekwiwalentu obligacji dla bonu skarbowego.
+TBILLPRICE = TBILLPRICE ## Zwraca cenę za 100 zł wartości nominalnej bonu skarbowego.
+TBILLYIELD = TBILLYIELD ## Zwraca rentowność bonu skarbowego.
+VDB = VDB ## Oblicza amortyzację środka trwałego w danym okresie lub jego części metodą degresywną.
+XIRR = XIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych.
+XNPV = XNPV ## Zwraca wartość bieżącą netto dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych.
+YIELD = YIELD ## Zwraca rentowność papieru wartościowego z oprocentowaniem okresowym.
+YIELDDISC = YIELDDISC ## Zwraca roczną rentowność zdyskontowanego papieru wartościowego, na przykład bonu skarbowego.
+YIELDMAT = YIELDMAT ## Zwraca roczną rentowność papieru wartościowego oprocentowanego przy wykupie.
+
+
+##
+## Information functions Funkcje informacyjne
+##
+CELL = KOMÓRKA ## Zwraca informacje o formacie, położeniu lub zawartości komórki.
+ERROR.TYPE = NR.BŁĘDU ## Zwraca liczbę odpowiadającą typowi błędu.
+INFO = INFO ## Zwraca informację o aktualnym środowisku pracy.
+ISBLANK = CZY.PUSTA ## Zwraca wartość PRAWDA, jeśli wartość jest pusta.
+ISERR = CZY.BŁ ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu, z wyjątkiem #N/D!.
+ISERROR = CZY.BŁĄD ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu.
+ISEVEN = ISEVEN ## Zwraca wartość PRAWDA, jeśli liczba jest parzysta.
+ISLOGICAL = CZY.LOGICZNA ## Zwraca wartość PRAWDA, jeśli wartość jest wartością logiczną.
+ISNA = CZY.BRAK ## Zwraca wartość PRAWDA, jeśli wartość jest wartością błędu #N/D!.
+ISNONTEXT = CZY.NIE.TEKST ## Zwraca wartość PRAWDA, jeśli wartość nie jest tekstem.
+ISNUMBER = CZY.LICZBA ## Zwraca wartość PRAWDA, jeśli wartość jest liczbą.
+ISODD = ISODD ## Zwraca wartość PRAWDA, jeśli liczba jest nieparzysta.
+ISREF = CZY.ADR ## Zwraca wartość PRAWDA, jeśli wartość jest odwołaniem.
+ISTEXT = CZY.TEKST ## Zwraca wartość PRAWDA, jeśli wartość jest tekstem.
+N = L ## Zwraca wartość przekonwertowaną na postać liczbową.
+NA = BRAK ## Zwraca wartość błędu #N/D!.
+TYPE = TYP ## Zwraca liczbę wskazującą typ danych wartości.
+
+
+##
+## Logical functions Funkcje logiczne
+##
+AND = ORAZ ## Zwraca wartość PRAWDA, jeśli wszystkie argumenty mają wartość PRAWDA.
+FALSE = FAŁSZ ## Zwraca wartość logiczną FAŁSZ.
+IF = JEŻELI ## Określa warunek logiczny do sprawdzenia.
+IFERROR = JEŻELI.BŁĄD ## Zwraca określoną wartość, jeśli wynikiem obliczenia formuły jest błąd; w przeciwnym przypadku zwraca wynik formuły.
+NOT = NIE ## Odwraca wartość logiczną argumentu.
+OR = LUB ## Zwraca wartość PRAWDA, jeśli co najmniej jeden z argumentów ma wartość PRAWDA.
+TRUE = PRAWDA ## Zwraca wartość logiczną PRAWDA.
+
+
+##
+## Lookup and reference functions Funkcje wyszukiwania i odwołań
+##
+ADDRESS = ADRES ## Zwraca odwołanie do jednej komórki w arkuszu jako wartość tekstową.
+AREAS = OBSZARY ## Zwraca liczbę obszarów występujących w odwołaniu.
+CHOOSE = WYBIERZ ## Wybiera wartość z listy wartości.
+COLUMN = NR.KOLUMNY ## Zwraca numer kolumny z odwołania.
+COLUMNS = LICZBA.KOLUMN ## Zwraca liczbę kolumn dla danego odwołania.
+HLOOKUP = WYSZUKAJ.POZIOMO ## Przegląda górny wiersz tablicy i zwraca wartość wskazanej komórki.
+HYPERLINK = HIPERŁĄCZE ## Tworzy skrót lub skok, który pozwala otwierać dokument przechowywany na serwerze sieciowym, w sieci intranet lub w Internecie.
+INDEX = INDEKS ## Używa indeksu do wybierania wartości z odwołania lub tablicy.
+INDIRECT = ADR.POŚR ## Zwraca odwołanie określone przez wartość tekstową.
+LOOKUP = WYSZUKAJ ## Wyszukuje wartości w wektorze lub tablicy.
+MATCH = PODAJ.POZYCJĘ ## Wyszukuje wartości w odwołaniu lub w tablicy.
+OFFSET = PRZESUNIĘCIE ## Zwraca adres przesunięty od danego odwołania.
+ROW = WIERSZ ## Zwraca numer wiersza odwołania.
+ROWS = ILE.WIERSZY ## Zwraca liczbę wierszy dla danego odwołania.
+RTD = RTD ## Pobiera dane w czasie rzeczywistym z programu obsługującego automatyzację COM (Automatyzacja: Sposób pracy z obiektami aplikacji pochodzącymi z innej aplikacji lub narzędzia projektowania. Nazywana wcześniej Automatyzacją OLE, Automatyzacja jest standardem przemysłowym i funkcją obiektowego modelu składników (COM, Component Object Model).).
+TRANSPOSE = TRANSPONUJ ## Zwraca transponowaną tablicę.
+VLOOKUP = WYSZUKAJ.PIONOWO ## Przeszukuje pierwszą kolumnę tablicy i przechodzi wzdłuż wiersza, aby zwrócić wartość komórki.
+
+
+##
+## Math and trigonometry functions Funkcje matematyczne i trygonometryczne
+##
+ABS = MODUŁ.LICZBY ## Zwraca wartość absolutną liczby.
+ACOS = ACOS ## Zwraca arcus cosinus liczby.
+ACOSH = ACOSH ## Zwraca arcus cosinus hiperboliczny liczby.
+ASIN = ASIN ## Zwraca arcus sinus liczby.
+ASINH = ASINH ## Zwraca arcus sinus hiperboliczny liczby.
+ATAN = ATAN ## Zwraca arcus tangens liczby.
+ATAN2 = ATAN2 ## Zwraca arcus tangens liczby na podstawie współrzędnych x i y.
+ATANH = ATANH ## Zwraca arcus tangens hiperboliczny liczby.
+CEILING = ZAOKR.W.GÓRĘ ## Zaokrągla liczbę do najbliższej liczby całkowitej lub do najbliższej wielokrotności dokładności.
+COMBIN = KOMBINACJE ## Zwraca liczbę kombinacji dla danej liczby obiektów.
+COS = COS ## Zwraca cosinus liczby.
+COSH = COSH ## Zwraca cosinus hiperboliczny liczby.
+DEGREES = STOPNIE ## Konwertuje radiany na stopnie.
+EVEN = ZAOKR.DO.PARZ ## Zaokrągla liczbę w górę do najbliższej liczby parzystej.
+EXP = EXP ## Zwraca wartość liczby e podniesionej do potęgi określonej przez podaną liczbę.
+FACT = SILNIA ## Zwraca silnię liczby.
+FACTDOUBLE = FACTDOUBLE ## Zwraca podwójną silnię liczby.
+FLOOR = ZAOKR.W.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera.
+GCD = GCD ## Zwraca największy wspólny dzielnik.
+INT = ZAOKR.DO.CAŁK ## Zaokrągla liczbę w dół do najbliższej liczby całkowitej.
+LCM = LCM ## Zwraca najmniejszą wspólną wielokrotność.
+LN = LN ## Zwraca logarytm naturalny podanej liczby.
+LOG = LOG ## Zwraca logarytm danej liczby przy zadanej podstawie.
+LOG10 = LOG10 ## Zwraca logarytm dziesiętny liczby.
+MDETERM = WYZNACZNIK.MACIERZY ## Zwraca wyznacznik macierzy tablicy.
+MINVERSE = MACIERZ.ODW ## Zwraca odwrotność macierzy tablicy.
+MMULT = MACIERZ.ILOCZYN ## Zwraca iloczyn macierzy dwóch tablic.
+MOD = MOD ## Zwraca resztę z dzielenia.
+MROUND = MROUND ## Zwraca liczbę zaokrągloną do żądanej wielokrotności.
+MULTINOMIAL = MULTINOMIAL ## Zwraca wielomian dla zbioru liczb.
+ODD = ZAOKR.DO.NPARZ ## Zaokrągla liczbę w górę do najbliższej liczby nieparzystej.
+PI = PI ## Zwraca wartość liczby Pi.
+POWER = POTĘGA ## Zwraca liczbę podniesioną do potęgi.
+PRODUCT = ILOCZYN ## Mnoży argumenty.
+QUOTIENT = QUOTIENT ## Zwraca iloraz (całkowity).
+RADIANS = RADIANY ## Konwertuje stopnie na radiany.
+RAND = LOS ## Zwraca liczbę pseudolosową z zakresu od 0 do 1.
+RANDBETWEEN = RANDBETWEEN ## Zwraca liczbę pseudolosową z zakresu określonego przez podane argumenty.
+ROMAN = RZYMSKIE ## Konwertuje liczbę arabską na rzymską jako tekst.
+ROUND = ZAOKR ## Zaokrągla liczbę do określonej liczby cyfr.
+ROUNDDOWN = ZAOKR.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera.
+ROUNDUP = ZAOKR.GÓRA ## Zaokrągla liczbę w górę, w kierunku od zera.
+SERIESSUM = SERIESSUM ## Zwraca sumę szeregu potęgowego na podstawie wzoru.
+SIGN = ZNAK.LICZBY ## Zwraca znak liczby.
+SIN = SIN ## Zwraca sinus danego kąta.
+SINH = SINH ## Zwraca sinus hiperboliczny liczby.
+SQRT = PIERWIASTEK ## Zwraca dodatni pierwiastek kwadratowy.
+SQRTPI = SQRTPI ## Zwraca pierwiastek kwadratowy iloczynu (liczba * Pi).
+SUBTOTAL = SUMY.POŚREDNIE ## Zwraca sumę częściową listy lub bazy danych.
+SUM = SUMA ## Dodaje argumenty.
+SUMIF = SUMA.JEŻELI ## Dodaje komórki określone przez podane kryterium.
+SUMIFS = SUMA.WARUNKÓW ## Dodaje komórki w zakresie, które spełniają wiele kryteriów.
+SUMPRODUCT = SUMA.ILOCZYNÓW ## Zwraca sumę iloczynów odpowiednich elementów tablicy.
+SUMSQ = SUMA.KWADRATÓW ## Zwraca sumę kwadratów argumentów.
+SUMX2MY2 = SUMA.X2.M.Y2 ## Zwraca sumę różnic kwadratów odpowiednich wartości w dwóch tablicach.
+SUMX2PY2 = SUMA.X2.P.Y2 ## Zwraca sumę sum kwadratów odpowiednich wartości w dwóch tablicach.
+SUMXMY2 = SUMA.XMY.2 ## Zwraca sumę kwadratów różnic odpowiednich wartości w dwóch tablicach.
+TAN = TAN ## Zwraca tangens liczby.
+TANH = TANH ## Zwraca tangens hiperboliczny liczby.
+TRUNC = LICZBA.CAŁK ## Przycina liczbę do wartości całkowitej.
+
+
+##
+## Statistical functions Funkcje statystyczne
+##
+AVEDEV = ODCH.ŚREDNIE ## Zwraca średnią wartość odchyleń absolutnych punktów danych od ich wartości średniej.
+AVERAGE = ŚREDNIA ## Zwraca wartość średnią argumentów.
+AVERAGEA = ŚREDNIA.A ## Zwraca wartość średnią argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych.
+AVERAGEIF = ŚREDNIA.JEŻELI ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek w zakresie, które spełniają podane kryteria.
+AVERAGEIFS = ŚREDNIA.WARUNKÓW ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek, które spełniają jedno lub więcej kryteriów.
+BETADIST = ROZKŁAD.BETA ## Zwraca skumulowaną funkcję gęstości prawdopodobieństwa beta.
+BETAINV = ROZKŁAD.BETA.ODW ## Zwraca odwrotność skumulowanej funkcji gęstości prawdopodobieństwa beta.
+BINOMDIST = ROZKŁAD.DWUM ## Zwraca pojedynczy składnik dwumianowego rozkładu prawdopodobieństwa.
+CHIDIST = ROZKŁAD.CHI ## Zwraca wartość jednostronnego prawdopodobieństwa rozkładu chi-kwadrat.
+CHIINV = ROZKŁAD.CHI.ODW ## Zwraca odwrotność wartości jednostronnego prawdopodobieństwa rozkładu chi-kwadrat.
+CHITEST = TEST.CHI ## Zwraca test niezależności.
+CONFIDENCE = UFNOŚĆ ## Zwraca interwał ufności dla średniej populacji.
+CORREL = WSP.KORELACJI ## Zwraca współczynnik korelacji dwóch zbiorów danych.
+COUNT = ILE.LICZB ## Zlicza liczby znajdujące się na liście argumentów.
+COUNTA = ILE.NIEPUSTYCH ## Zlicza wartości znajdujące się na liście argumentów.
+COUNTBLANK = LICZ.PUSTE ## Zwraca liczbę pustych komórek w pewnym zakresie.
+COUNTIF = LICZ.JEŻELI ## Zlicza komórki wewnątrz zakresu, które spełniają podane kryteria.
+COUNTIFS = LICZ.WARUNKI ## Zlicza komórki wewnątrz zakresu, które spełniają wiele kryteriów.
+COVAR = KOWARIANCJA ## Zwraca kowariancję, czyli średnią wartość iloczynów odpowiednich odchyleń.
+CRITBINOM = PRÓG.ROZKŁAD.DWUM ## Zwraca najmniejszą wartość, dla której skumulowany rozkład dwumianowy jest mniejszy niż wartość kryterium lub równy jej.
+DEVSQ = ODCH.KWADRATOWE ## Zwraca sumę kwadratów odchyleń.
+EXPONDIST = ROZKŁAD.EXP ## Zwraca rozkład wykładniczy.
+FDIST = ROZKŁAD.F ## Zwraca rozkład prawdopodobieństwa F.
+FINV = ROZKŁAD.F.ODW ## Zwraca odwrotność rozkładu prawdopodobieństwa F.
+FISHER = ROZKŁAD.FISHER ## Zwraca transformację Fishera.
+FISHERINV = ROZKŁAD.FISHER.ODW ## Zwraca odwrotność transformacji Fishera.
+FORECAST = REGLINX ## Zwraca wartość trendu liniowego.
+FREQUENCY = CZĘSTOŚĆ ## Zwraca rozkład częstotliwości jako tablicę pionową.
+FTEST = TEST.F ## Zwraca wynik testu F.
+GAMMADIST = ROZKŁAD.GAMMA ## Zwraca rozkład gamma.
+GAMMAINV = ROZKŁAD.GAMMA.ODW ## Zwraca odwrotność skumulowanego rozkładu gamma.
+GAMMALN = ROZKŁAD.LIN.GAMMA ## Zwraca logarytm naturalny funkcji gamma, Γ(x).
+GEOMEAN = ŚREDNIA.GEOMETRYCZNA ## Zwraca średnią geometryczną.
+GROWTH = REGEXPW ## Zwraca wartości trendu wykładniczego.
+HARMEAN = ŚREDNIA.HARMONICZNA ## Zwraca średnią harmoniczną.
+HYPGEOMDIST = ROZKŁAD.HIPERGEOM ## Zwraca rozkład hipergeometryczny.
+INTERCEPT = ODCIĘTA ## Zwraca punkt przecięcia osi pionowej z linią regresji liniowej.
+KURT = KURTOZA ## Zwraca kurtozę zbioru danych.
+LARGE = MAX.K ## Zwraca k-tą największą wartość ze zbioru danych.
+LINEST = REGLINP ## Zwraca parametry trendu liniowego.
+LOGEST = REGEXPP ## Zwraca parametry trendu wykładniczego.
+LOGINV = ROZKŁAD.LOG.ODW ## Zwraca odwrotność rozkładu logarytmu naturalnego.
+LOGNORMDIST = ROZKŁAD.LOG ## Zwraca skumulowany rozkład logarytmu naturalnego.
+MAX = MAX ## Zwraca maksymalną wartość listy argumentów.
+MAXA = MAX.A ## Zwraca maksymalną wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych.
+MEDIAN = MEDIANA ## Zwraca medianę podanych liczb.
+MIN = MIN ## Zwraca minimalną wartość listy argumentów.
+MINA = MIN.A ## Zwraca najmniejszą wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych.
+MODE = WYST.NAJCZĘŚCIEJ ## Zwraca wartość najczęściej występującą w zbiorze danych.
+NEGBINOMDIST = ROZKŁAD.DWUM.PRZEC ## Zwraca ujemny rozkład dwumianowy.
+NORMDIST = ROZKŁAD.NORMALNY ## Zwraca rozkład normalny skumulowany.
+NORMINV = ROZKŁAD.NORMALNY.ODW ## Zwraca odwrotność rozkładu normalnego skumulowanego.
+NORMSDIST = ROZKŁAD.NORMALNY.S ## Zwraca standardowy rozkład normalny skumulowany.
+NORMSINV = ROZKŁAD.NORMALNY.S.ODW ## Zwraca odwrotność standardowego rozkładu normalnego skumulowanego.
+PEARSON = PEARSON ## Zwraca współczynnik korelacji momentu iloczynu Pearsona.
+PERCENTILE = PERCENTYL ## Wyznacza k-ty percentyl wartości w zakresie.
+PERCENTRANK = PROCENT.POZYCJA ## Zwraca procentową pozycję wartości w zbiorze danych.
+PERMUT = PERMUTACJE ## Zwraca liczbę permutacji dla danej liczby obiektów.
+POISSON = ROZKŁAD.POISSON ## Zwraca rozkład Poissona.
+PROB = PRAWDPD ## Zwraca prawdopodobieństwo, że wartości w zakresie leżą pomiędzy dwiema granicami.
+QUARTILE = KWARTYL ## Wyznacza kwartyl zbioru danych.
+RANK = POZYCJA ## Zwraca pozycję liczby na liście liczb.
+RSQ = R.KWADRAT ## Zwraca kwadrat współczynnika korelacji momentu iloczynu Pearsona.
+SKEW = SKOŚNOŚĆ ## Zwraca skośność rozkładu.
+SLOPE = NACHYLENIE ## Zwraca nachylenie linii regresji liniowej.
+SMALL = MIN.K ## Zwraca k-tą najmniejszą wartość ze zbioru danych.
+STANDARDIZE = NORMALIZUJ ## Zwraca wartość znormalizowaną.
+STDEV = ODCH.STANDARDOWE ## Szacuje odchylenie standardowe na podstawie próbki.
+STDEVA = ODCH.STANDARDOWE.A ## Szacuje odchylenie standardowe na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych.
+STDEVP = ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji.
+STDEVPA = ODCH.STANDARD.POPUL.A ## Oblicza odchylenie standardowe na podstawie całej populacji, z uwzględnieniem liczb, teksów i wartości logicznych.
+STEYX = REGBŁSTD ## Zwraca błąd standardowy przewidzianej wartości y dla każdej wartości x w regresji.
+TDIST = ROZKŁAD.T ## Zwraca rozkład t-Studenta.
+TINV = ROZKŁAD.T.ODW ## Zwraca odwrotność rozkładu t-Studenta.
+TREND = REGLINW ## Zwraca wartości trendu liniowego.
+TRIMMEAN = ŚREDNIA.WEWN ## Zwraca średnią wartość dla wnętrza zbioru danych.
+TTEST = TEST.T ## Zwraca prawdopodobieństwo związane z testem t-Studenta.
+VAR = WARIANCJA ## Szacuje wariancję na podstawie próbki.
+VARA = WARIANCJA.A ## Szacuje wariancję na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych.
+VARP = WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji.
+VARPA = WARIANCJA.POPUL.A ## Oblicza wariancję na podstawie całej populacji, z uwzględnieniem liczb, tekstów i wartości logicznych.
+WEIBULL = ROZKŁAD.WEIBULL ## Zwraca rozkład Weibulla.
+ZTEST = TEST.Z ## Zwraca wartość jednostronnego prawdopodobieństwa testu z.
+
+
+##
+## Text functions Funkcje tekstowe
+##
+ASC = ASC ## Zamienia litery angielskie lub katakana o pełnej szerokości (dwubajtowe) w ciągu znaków na znaki o szerokości połówkowej (jednobajtowe).
+BAHTTEXT = BAHTTEXT ## Konwertuje liczbę na tekst, stosując format walutowy ß (baht).
+CHAR = ZNAK ## Zwraca znak o podanym numerze kodu.
+CLEAN = OCZYŚĆ ## Usuwa z tekstu wszystkie znaki, które nie mogą być drukowane.
+CODE = KOD ## Zwraca kod numeryczny pierwszego znaku w ciągu tekstowym.
+CONCATENATE = ZŁĄCZ.TEKSTY ## Łączy kilka oddzielnych tekstów w jeden tekst.
+DOLLAR = KWOTA ## Konwertuje liczbę na tekst, stosując format walutowy $ (dolar).
+EXACT = PORÓWNAJ ## Sprawdza identyczność dwóch wartości tekstowych.
+FIND = ZNAJDŹ ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter).
+FINDB = ZNAJDŹB ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter).
+FIXED = ZAOKR.DO.TEKST ## Formatuje liczbę jako tekst przy stałej liczbie miejsc dziesiętnych.
+JIS = JIS ## Zmienia litery angielskie lub katakana o szerokości połówkowej (jednobajtowe) w ciągu znaków na znaki o pełnej szerokości (dwubajtowe).
+LEFT = LEWY ## Zwraca skrajne lewe znaki z wartości tekstowej.
+LEFTB = LEWYB ## Zwraca skrajne lewe znaki z wartości tekstowej.
+LEN = DŁ ## Zwraca liczbę znaków ciągu tekstowego.
+LENB = DŁ.B ## Zwraca liczbę znaków ciągu tekstowego.
+LOWER = LITERY.MAŁE ## Konwertuje wielkie litery tekstu na małe litery.
+MID = FRAGMENT.TEKSTU ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji.
+MIDB = FRAGMENT.TEKSTU.B ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji.
+PHONETIC = PHONETIC ## Wybiera znaki fonetyczne (furigana) z ciągu tekstowego.
+PROPER = Z.WIELKIEJ.LITERY ## Zastępuje pierwszą literę każdego wyrazu tekstu wielką literą.
+REPLACE = ZASTĄP ## Zastępuje znaki w tekście.
+REPLACEB = ZASTĄP.B ## Zastępuje znaki w tekście.
+REPT = POWT ## Powiela tekst daną liczbę razy.
+RIGHT = PRAWY ## Zwraca skrajne prawe znaki z wartości tekstowej.
+RIGHTB = PRAWYB ## Zwraca skrajne prawe znaki z wartości tekstowej.
+SEARCH = SZUKAJ.TEKST ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter).
+SEARCHB = SZUKAJ.TEKST.B ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter).
+SUBSTITUTE = PODSTAW ## Podstawia nowy tekst w miejsce poprzedniego tekstu w ciągu tekstowym.
+T = T ## Konwertuje argumenty na tekst.
+TEXT = TEKST ## Formatuje liczbę i konwertuje ją na tekst.
+TRIM = USUŃ.ZBĘDNE.ODSTĘPY ## Usuwa spacje z tekstu.
+UPPER = LITERY.WIELKIE ## Konwertuje znaki tekstu na wielkie litery.
+VALUE = WARTOŚĆ ## Konwertuje argument tekstowy na liczbę.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config
new file mode 100644
index 0000000..dc44168
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = R$
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NULO!
+DIV0 = #DIV/0!
+VALUE = #VALOR!
+REF = #REF!
+NAME = #NOME?
+NUM = #NÚM!
+NA = #N/D
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions
new file mode 100644
index 0000000..f3ba3a3
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions
@@ -0,0 +1,408 @@
+##
+## Add-in and Automation functions Funções Suplemento e Automação
+##
+GETPIVOTDATA = INFODADOSTABELADINÂMICA ## Retorna os dados armazenados em um relatório de tabela dinâmica
+
+
+##
+## Cube functions Funções de Cubo
+##
+CUBEKPIMEMBER = MEMBROKPICUBO ## Retorna o nome de um KPI (indicador de desempenho-chave), uma propriedade e uma medida e exibe o nome e a propriedade na célula. Um KPI é uma medida quantificável, como o lucro bruto mensal ou a rotatividade trimestral dos funcionários, usada para monitorar o desempenho de uma organização.
+CUBEMEMBER = MEMBROCUBO ## Retorna um membro ou tupla em uma hierarquia de cubo. Use para validar se o membro ou tupla existe no cubo.
+CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Retorna o valor da propriedade de um membro no cubo. Usada para validar a existência do nome do membro no cubo e para retornar a propriedade especificada para esse membro.
+CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Retorna o enésimo membro, ou o membro ordenado, em um conjunto. Use para retornar um ou mais elementos em um conjunto, assim como o melhor vendedor ou os dez melhores alunos.
+CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou tuplas enviando uma expressão do conjunto para o cubo no servidor, que cria o conjunto e o retorna para o Microsoft Office Excel.
+CUBESETCOUNT = CONTAGEMCONJUNTOCUBO ## Retorna o número de itens em um conjunto.
+CUBEVALUE = VALORCUBO ## Retorna um valor agregado de um cubo.
+
+
+##
+## Database functions Funções de banco de dados
+##
+DAVERAGE = BDMÉDIA ## Retorna a média das entradas selecionadas de um banco de dados
+DCOUNT = BDCONTAR ## Conta as células que contêm números em um banco de dados
+DCOUNTA = BDCONTARA ## Conta células não vazias em um banco de dados
+DGET = BDEXTRAIR ## Extrai de um banco de dados um único registro que corresponde a um critério específico
+DMAX = BDMÁX ## Retorna o valor máximo de entradas selecionadas de um banco de dados
+DMIN = BDMÍN ## Retorna o valor mínimo de entradas selecionadas de um banco de dados
+DPRODUCT = BDMULTIPL ## Multiplica os valores em um campo específico de registros que correspondem ao critério em um banco de dados
+DSTDEV = BDEST ## Estima o desvio padrão com base em uma amostra de entradas selecionadas de um banco de dados
+DSTDEVP = BDDESVPA ## Calcula o desvio padrão com base na população inteira de entradas selecionadas de um banco de dados
+DSUM = BDSOMA ## Adiciona os números à coluna de campos de registros do banco de dados que correspondem ao critério
+DVAR = BDVAREST ## Estima a variância com base em uma amostra de entradas selecionadas de um banco de dados
+DVARP = BDVARP ## Calcula a variância com base na população inteira de entradas selecionadas de um banco de dados
+
+
+##
+## Date and time functions Funções de data e hora
+##
+DATE = DATA ## Retorna o número de série de uma data específica
+DATEVALUE = DATA.VALOR ## Converte uma data na forma de texto para um número de série
+DAY = DIA ## Converte um número de série em um dia do mês
+DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base em um ano de 360 dias
+EDATE = DATAM ## Retorna o número de série da data que é o número indicado de meses antes ou depois da data inicial
+EOMONTH = FIMMÊS ## Retorna o número de série do último dia do mês antes ou depois de um número especificado de meses
+HOUR = HORA ## Converte um número de série em uma hora
+MINUTE = MINUTO ## Converte um número de série em um minuto
+MONTH = MÊS ## Converte um número de série em um mês
+NETWORKDAYS = DIATRABALHOTOTAL ## Retorna o número de dias úteis inteiros entre duas datas
+NOW = AGORA ## Retorna o número de série seqüencial da data e hora atuais
+SECOND = SEGUNDO ## Converte um número de série em um segundo
+TIME = HORA ## Retorna o número de série de uma hora específica
+TIMEVALUE = VALOR.TEMPO ## Converte um horário na forma de texto para um número de série
+TODAY = HOJE ## Retorna o número de série da data de hoje
+WEEKDAY = DIA.DA.SEMANA ## Converte um número de série em um dia da semana
+WEEKNUM = NÚMSEMANA ## Converte um número de série em um número que representa onde a semana cai numericamente em um ano
+WORKDAY = DIATRABALHO ## Retorna o número de série da data antes ou depois de um número específico de dias úteis
+YEAR = ANO ## Converte um número de série em um ano
+YEARFRAC = FRAÇÃOANO ## Retorna a fração do ano que representa o número de dias entre data_inicial e data_final
+
+
+##
+## Engineering functions Funções de engenharia
+##
+BESSELI = BESSELI ## Retorna a função de Bessel In(x) modificada
+BESSELJ = BESSELJ ## Retorna a função de Bessel Jn(x)
+BESSELK = BESSELK ## Retorna a função de Bessel Kn(x) modificada
+BESSELY = BESSELY ## Retorna a função de Bessel Yn(x)
+BIN2DEC = BIN2DEC ## Converte um número binário em decimal
+BIN2HEX = BIN2HEX ## Converte um número binário em hexadecimal
+BIN2OCT = BIN2OCT ## Converte um número binário em octal
+COMPLEX = COMPLEX ## Converte coeficientes reais e imaginários e um número complexo
+CONVERT = CONVERTER ## Converte um número de um sistema de medida para outro
+DEC2BIN = DECABIN ## Converte um número decimal em binário
+DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal
+DEC2OCT = DECAOCT ## Converte um número decimal em octal
+DELTA = DELTA ## Testa se dois valores são iguais
+ERF = FUNERRO ## Retorna a função de erro
+ERFC = FUNERROCOMPL ## Retorna a função de erro complementar
+GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite
+HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário
+HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal
+HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal
+IMABS = IMABS ## Retorna o valor absoluto (módulo) de um número complexo
+IMAGINARY = IMAGINÁRIO ## Retorna o coeficiente imaginário de um número complexo
+IMARGUMENT = IMARG ## Retorna o argumento teta, um ângulo expresso em radianos
+IMCONJUGATE = IMCONJ ## Retorna o conjugado complexo de um número complexo
+IMCOS = IMCOS ## Retorna o cosseno de um número complexo
+IMDIV = IMDIV ## Retorna o quociente de dois números complexos
+IMEXP = IMEXP ## Retorna o exponencial de um número complexo
+IMLN = IMLN ## Retorna o logaritmo natural de um número complexo
+IMLOG10 = IMLOG10 ## Retorna o logaritmo de base 10 de um número complexo
+IMLOG2 = IMLOG2 ## Retorna o logaritmo de base 2 de um número complexo
+IMPOWER = IMPOT ## Retorna um número complexo elevado a uma potência inteira
+IMPRODUCT = IMPROD ## Retorna o produto de números complexos
+IMREAL = IMREAL ## Retorna o coeficiente real de um número complexo
+IMSIN = IMSENO ## Retorna o seno de um número complexo
+IMSQRT = IMRAIZ ## Retorna a raiz quadrada de um número complexo
+IMSUB = IMSUBTR ## Retorna a diferença entre dois números complexos
+IMSUM = IMSOMA ## Retorna a soma de números complexos
+OCT2BIN = OCTABIN ## Converte um número octal em binário
+OCT2DEC = OCTADEC ## Converte um número octal em decimal
+OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal
+
+
+##
+## Financial functions Funções financeiras
+##
+ACCRINT = JUROSACUM ## Retorna a taxa de juros acumulados de um título que paga uma taxa periódica de juros
+ACCRINTM = JUROSACUMV ## Retorna os juros acumulados de um título que paga juros no vencimento
+AMORDEGRC = AMORDEGRC ## Retorna a depreciação para cada período contábil usando o coeficiente de depreciação
+AMORLINC = AMORLINC ## Retorna a depreciação para cada período contábil
+COUPDAYBS = CUPDIASINLIQ ## Retorna o número de dias do início do período de cupom até a data de liquidação
+COUPDAYS = CUPDIAS ## Retorna o número de dias no período de cupom que contém a data de quitação
+COUPDAYSNC = CUPDIASPRÓX ## Retorna o número de dias da data de liquidação até a data do próximo cupom
+COUPNCD = CUPDATAPRÓX ## Retorna a próxima data de cupom após a data de quitação
+COUPNUM = CUPNÚM ## Retorna o número de cupons pagáveis entre as datas de quitação e vencimento
+COUPPCD = CUPDATAANT ## Retorna a data de cupom anterior à data de quitação
+CUMIPMT = PGTOJURACUM ## Retorna os juros acumulados pagos entre dois períodos
+CUMPRINC = PGTOCAPACUM ## Retorna o capital acumulado pago sobre um empréstimo entre dois períodos
+DB = BD ## Retorna a depreciação de um ativo para um período especificado, usando o método de balanço de declínio fixo
+DDB = BDD ## Retorna a depreciação de um ativo com relação a um período especificado usando o método de saldos decrescentes duplos ou qualquer outro método especificado por você
+DISC = DESC ## Retorna a taxa de desconto de um título
+DOLLARDE = MOEDADEC ## Converte um preço em formato de moeda, na forma fracionária, em um preço na forma decimal
+DOLLARFR = MOEDAFRA ## Converte um preço, apresentado na forma decimal, em um preço apresentado na forma fracionária
+DURATION = DURAÇÃO ## Retorna a duração anual de um título com pagamentos de juros periódicos
+EFFECT = EFETIVA ## Retorna a taxa de juros anual efetiva
+FV = VF ## Retorna o valor futuro de um investimento
+FVSCHEDULE = VFPLANO ## Retorna o valor futuro de um capital inicial após a aplicação de uma série de taxas de juros compostas
+INTRATE = TAXAJUROS ## Retorna a taxa de juros de um título totalmente investido
+IPMT = IPGTO ## Retorna o pagamento de juros para um investimento em um determinado período
+IRR = TIR ## Retorna a taxa interna de retorno de uma série de fluxos de caixa
+ISPMT = ÉPGTO ## Calcula os juros pagos durante um período específico de um investimento
+MDURATION = MDURAÇÃO ## Retorna a duração de Macauley modificada para um título com um valor de paridade equivalente a R$ 100
+MIRR = MTIR ## Calcula a taxa interna de retorno em que fluxos de caixa positivos e negativos são financiados com diferentes taxas
+NOMINAL = NOMINAL ## Retorna a taxa de juros nominal anual
+NPER = NPER ## Retorna o número de períodos de um investimento
+NPV = VPL ## Retorna o valor líquido atual de um investimento com base em uma série de fluxos de caixa periódicos e em uma taxa de desconto
+ODDFPRICE = PREÇOPRIMINC ## Retorna o preço por R$ 100 de valor nominal de um título com um primeiro período indefinido
+ODDFYIELD = LUCROPRIMINC ## Retorna o rendimento de um título com um primeiro período indefinido
+ODDLPRICE = PREÇOÚLTINC ## Retorna o preço por R$ 100 de valor nominal de um título com um último período de cupom indefinido
+ODDLYIELD = LUCROÚLTINC ## Retorna o rendimento de um título com um último período indefinido
+PMT = PGTO ## Retorna o pagamento periódico de uma anuidade
+PPMT = PPGTO ## Retorna o pagamento de capital para determinado período de investimento
+PRICE = PREÇO ## Retorna a preço por R$ 100,00 de valor nominal de um título que paga juros periódicos
+PRICEDISC = PREÇODESC ## Retorna o preço por R$ 100,00 de valor nominal de um título descontado
+PRICEMAT = PREÇOVENC ## Retorna o preço por R$ 100,00 de valor nominal de um título que paga juros no vencimento
+PV = VP ## Retorna o valor presente de um investimento
+RATE = TAXA ## Retorna a taxa de juros por período de uma anuidade
+RECEIVED = RECEBER ## Retorna a quantia recebida no vencimento de um título totalmente investido
+SLN = DPD ## Retorna a depreciação em linha reta de um ativo durante um período
+SYD = SDA ## Retorna a depreciação dos dígitos da soma dos anos de um ativo para um período especificado
+TBILLEQ = OTN ## Retorna o rendimento de um título equivalente a uma obrigação do Tesouro
+TBILLPRICE = OTNVALOR ## Retorna o preço por R$ 100,00 de valor nominal de uma obrigação do Tesouro
+TBILLYIELD = OTNLUCRO ## Retorna o rendimento de uma obrigação do Tesouro
+VDB = BDV ## Retorna a depreciação de um ativo para um período especificado ou parcial usando um método de balanço declinante
+XIRR = XTIR ## Fornece a taxa interna de retorno para um programa de fluxos de caixa que não é necessariamente periódico
+XNPV = XVPL ## Retorna o valor presente líquido de um programa de fluxos de caixa que não é necessariamente periódico
+YIELD = LUCRO ## Retorna o lucro de um título que paga juros periódicos
+YIELDDISC = LUCRODESC ## Retorna o rendimento anual de um título descontado. Por exemplo, uma obrigação do Tesouro
+YIELDMAT = LUCROVENC ## Retorna o lucro anual de um título que paga juros no vencimento
+
+
+##
+## Information functions Funções de informação
+##
+CELL = CÉL ## Retorna informações sobre formatação, localização ou conteúdo de uma célula
+ERROR.TYPE = TIPO.ERRO ## Retorna um número correspondente a um tipo de erro
+INFO = INFORMAÇÃO ## Retorna informações sobre o ambiente operacional atual
+ISBLANK = ÉCÉL.VAZIA ## Retorna VERDADEIRO se o valor for vazio
+ISERR = ÉERRO ## Retorna VERDADEIRO se o valor for um valor de erro diferente de #N/D
+ISERROR = ÉERROS ## Retorna VERDADEIRO se o valor for um valor de erro
+ISEVEN = ÉPAR ## Retorna VERDADEIRO se o número for par
+ISLOGICAL = ÉLÓGICO ## Retorna VERDADEIRO se o valor for um valor lógico
+ISNA = É.NÃO.DISP ## Retorna VERDADEIRO se o valor for o valor de erro #N/D
+ISNONTEXT = É.NÃO.TEXTO ## Retorna VERDADEIRO se o valor for diferente de texto
+ISNUMBER = ÉNÚM ## Retorna VERDADEIRO se o valor for um número
+ISODD = ÉIMPAR ## Retorna VERDADEIRO se o número for ímpar
+ISREF = ÉREF ## Retorna VERDADEIRO se o valor for uma referência
+ISTEXT = ÉTEXTO ## Retorna VERDADEIRO se o valor for texto
+N = N ## Retorna um valor convertido em um número
+NA = NÃO.DISP ## Retorna o valor de erro #N/D
+TYPE = TIPO ## Retorna um número indicando o tipo de dados de um valor
+
+
+##
+## Logical functions Funções lógicas
+##
+AND = E ## Retorna VERDADEIRO se todos os seus argumentos forem VERDADEIROS
+FALSE = FALSO ## Retorna o valor lógico FALSO
+IF = SE ## Especifica um teste lógico a ser executado
+IFERROR = SEERRO ## Retornará um valor que você especifica se uma fórmula for avaliada para um erro; do contrário, retornará o resultado da fórmula
+NOT = NÃO ## Inverte o valor lógico do argumento
+OR = OU ## Retorna VERDADEIRO se um dos argumentos for VERDADEIRO
+TRUE = VERDADEIRO ## Retorna o valor lógico VERDADEIRO
+
+
+##
+## Lookup and reference functions Funções de pesquisa e referência
+##
+ADDRESS = ENDEREÇO ## Retorna uma referência como texto para uma única célula em uma planilha
+AREAS = ÁREAS ## Retorna o número de áreas em uma referência
+CHOOSE = ESCOLHER ## Escolhe um valor a partir de uma lista de valores
+COLUMN = COL ## Retorna o número da coluna de uma referência
+COLUMNS = COLS ## Retorna o número de colunas em uma referência
+HLOOKUP = PROCH ## Procura na linha superior de uma matriz e retorna o valor da célula especificada
+HYPERLINK = HYPERLINK ## Cria um atalho ou salto que abre um documento armazenado em um servidor de rede, uma intranet ou na Internet
+INDEX = ÍNDICE ## Usa um índice para escolher um valor de uma referência ou matriz
+INDIRECT = INDIRETO ## Retorna uma referência indicada por um valor de texto
+LOOKUP = PROC ## Procura valores em um vetor ou em uma matriz
+MATCH = CORRESP ## Procura valores em uma referência ou em uma matriz
+OFFSET = DESLOC ## Retorna um deslocamento de referência com base em uma determinada referência
+ROW = LIN ## Retorna o número da linha de uma referência
+ROWS = LINS ## Retorna o número de linhas em uma referência
+RTD = RTD ## Recupera dados em tempo real de um programa que ofereça suporte a automação COM (automação: uma forma de trabalhar com objetos de um aplicativo a partir de outro aplicativo ou ferramenta de desenvolvimento. Chamada inicialmente de automação OLE, a automação é um padrão industrial e um recurso do modelo de objeto componente (COM).)
+TRANSPOSE = TRANSPOR ## Retorna a transposição de uma matriz
+VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e move ao longo da linha para retornar o valor de uma célula
+
+
+##
+## Math and trigonometry functions Funções matemáticas e trigonométricas
+##
+ABS = ABS ## Retorna o valor absoluto de um número
+ACOS = ACOS ## Retorna o arco cosseno de um número
+ACOSH = ACOSH ## Retorna o cosseno hiperbólico inverso de um número
+ASIN = ASEN ## Retorna o arco seno de um número
+ASINH = ASENH ## Retorna o seno hiperbólico inverso de um número
+ATAN = ATAN ## Retorna o arco tangente de um número
+ATAN2 = ATAN2 ## Retorna o arco tangente das coordenadas x e y especificadas
+ATANH = ATANH ## Retorna a tangente hiperbólica inversa de um número
+CEILING = TETO ## Arredonda um número para o inteiro mais próximo ou para o múltiplo mais próximo de significância
+COMBIN = COMBIN ## Retorna o número de combinações de um determinado número de objetos
+COS = COS ## Retorna o cosseno de um número
+COSH = COSH ## Retorna o cosseno hiperbólico de um número
+DEGREES = GRAUS ## Converte radianos em graus
+EVEN = PAR ## Arredonda um número para cima até o inteiro par mais próximo
+EXP = EXP ## Retorna e elevado à potência de um número especificado
+FACT = FATORIAL ## Retorna o fatorial de um número
+FACTDOUBLE = FATDUPLO ## Retorna o fatorial duplo de um número
+FLOOR = ARREDMULTB ## Arredonda um número para baixo até zero
+GCD = MDC ## Retorna o máximo divisor comum
+INT = INT ## Arredonda um número para baixo até o número inteiro mais próximo
+LCM = MMC ## Retorna o mínimo múltiplo comum
+LN = LN ## Retorna o logaritmo natural de um número
+LOG = LOG ## Retorna o logaritmo de um número de uma base especificada
+LOG10 = LOG10 ## Retorna o logaritmo de base 10 de um número
+MDETERM = MATRIZ.DETERM ## Retorna o determinante de uma matriz de uma variável do tipo matriz
+MINVERSE = MATRIZ.INVERSO ## Retorna a matriz inversa de uma matriz
+MMULT = MATRIZ.MULT ## Retorna o produto de duas matrizes
+MOD = RESTO ## Retorna o resto da divisão
+MROUND = MARRED ## Retorna um número arredondado ao múltiplo desejado
+MULTINOMIAL = MULTINOMIAL ## Retorna o multinomial de um conjunto de números
+ODD = ÍMPAR ## Arredonda um número para cima até o inteiro ímpar mais próximo
+PI = PI ## Retorna o valor de Pi
+POWER = POTÊNCIA ## Fornece o resultado de um número elevado a uma potência
+PRODUCT = MULT ## Multiplica seus argumentos
+QUOTIENT = QUOCIENTE ## Retorna a parte inteira de uma divisão
+RADIANS = RADIANOS ## Converte graus em radianos
+RAND = ALEATÓRIO ## Retorna um número aleatório entre 0 e 1
+RANDBETWEEN = ALEATÓRIOENTRE ## Retorna um número aleatório entre os números especificados
+ROMAN = ROMANO ## Converte um algarismo arábico em romano, como texto
+ROUND = ARRED ## Arredonda um número até uma quantidade especificada de dígitos
+ROUNDDOWN = ARREDONDAR.PARA.BAIXO ## Arredonda um número para baixo até zero
+ROUNDUP = ARREDONDAR.PARA.CIMA ## Arredonda um número para cima, afastando-o de zero
+SERIESSUM = SOMASEQÜÊNCIA ## Retorna a soma de uma série polinomial baseada na fórmula
+SIGN = SINAL ## Retorna o sinal de um número
+SIN = SEN ## Retorna o seno de um ângulo dado
+SINH = SENH ## Retorna o seno hiperbólico de um número
+SQRT = RAIZ ## Retorna uma raiz quadrada positiva
+SQRTPI = RAIZPI ## Retorna a raiz quadrada de (núm* pi)
+SUBTOTAL = SUBTOTAL ## Retorna um subtotal em uma lista ou em um banco de dados
+SUM = SOMA ## Soma seus argumentos
+SUMIF = SOMASE ## Adiciona as células especificadas por um determinado critério
+SUMIFS = SOMASE ## Adiciona as células em um intervalo que atende a vários critérios
+SUMPRODUCT = SOMARPRODUTO ## Retorna a soma dos produtos de componentes correspondentes de matrizes
+SUMSQ = SOMAQUAD ## Retorna a soma dos quadrados dos argumentos
+SUMX2MY2 = SOMAX2DY2 ## Retorna a soma da diferença dos quadrados dos valores correspondentes em duas matrizes
+SUMX2PY2 = SOMAX2SY2 ## Retorna a soma da soma dos quadrados dos valores correspondentes em duas matrizes
+SUMXMY2 = SOMAXMY2 ## Retorna a soma dos quadrados das diferenças dos valores correspondentes em duas matrizes
+TAN = TAN ## Retorna a tangente de um número
+TANH = TANH ## Retorna a tangente hiperbólica de um número
+TRUNC = TRUNCAR ## Trunca um número para um inteiro
+
+
+##
+## Statistical functions Funções estatísticas
+##
+AVEDEV = DESV.MÉDIO ## Retorna a média aritmética dos desvios médios dos pontos de dados a partir de sua média
+AVERAGE = MÉDIA ## Retorna a média dos argumentos
+AVERAGEA = MÉDIAA ## Retorna a média dos argumentos, inclusive números, texto e valores lógicos
+AVERAGEIF = MÉDIASE ## Retorna a média (média aritmética) de todas as células em um intervalo que atendem a um determinado critério
+AVERAGEIFS = MÉDIASES ## Retorna a média (média aritmética) de todas as células que atendem a múltiplos critérios.
+BETADIST = DISTBETA ## Retorna a função de distribuição cumulativa beta
+BETAINV = BETA.ACUM.INV ## Retorna o inverso da função de distribuição cumulativa para uma distribuição beta especificada
+BINOMDIST = DISTRBINOM ## Retorna a probabilidade de distribuição binomial do termo individual
+CHIDIST = DIST.QUI ## Retorna a probabilidade unicaudal da distribuição qui-quadrada
+CHIINV = INV.QUI ## Retorna o inverso da probabilidade uni-caudal da distribuição qui-quadrada
+CHITEST = TESTE.QUI ## Retorna o teste para independência
+CONFIDENCE = INT.CONFIANÇA ## Retorna o intervalo de confiança para uma média da população
+CORREL = CORREL ## Retorna o coeficiente de correlação entre dois conjuntos de dados
+COUNT = CONT.NÚM ## Calcula quantos números há na lista de argumentos
+COUNTA = CONT.VALORES ## Calcula quantos valores há na lista de argumentos
+COUNTBLANK = CONTAR.VAZIO ## Conta o número de células vazias no intervalo especificado
+COUNTIF = CONT.SE ## Calcula o número de células não vazias em um intervalo que corresponde a determinados critérios
+COUNTIFS = CONT.SES ## Conta o número de células dentro de um intervalo que atende a múltiplos critérios
+COVAR = COVAR ## Retorna a covariância, a média dos produtos dos desvios pares
+CRITBINOM = CRIT.BINOM ## Retorna o menor valor para o qual a distribuição binomial cumulativa é menor ou igual ao valor padrão
+DEVSQ = DESVQ ## Retorna a soma dos quadrados dos desvios
+EXPONDIST = DISTEXPON ## Retorna a distribuição exponencial
+FDIST = DISTF ## Retorna a distribuição de probabilidade F
+FINV = INVF ## Retorna o inverso da distribuição de probabilidades F
+FISHER = FISHER ## Retorna a transformação Fisher
+FISHERINV = FISHERINV ## Retorna o inverso da transformação Fisher
+FORECAST = PREVISÃO ## Retorna um valor ao longo de uma linha reta
+FREQUENCY = FREQÜÊNCIA ## Retorna uma distribuição de freqüência como uma matriz vertical
+FTEST = TESTEF ## Retorna o resultado de um teste F
+GAMMADIST = DISTGAMA ## Retorna a distribuição gama
+GAMMAINV = INVGAMA ## Retorna o inverso da distribuição cumulativa gama
+GAMMALN = LNGAMA ## Retorna o logaritmo natural da função gama, G(x)
+GEOMEAN = MÉDIA.GEOMÉTRICA ## Retorna a média geométrica
+GROWTH = CRESCIMENTO ## Retorna valores ao longo de uma tendência exponencial
+HARMEAN = MÉDIA.HARMÔNICA ## Retorna a média harmônica
+HYPGEOMDIST = DIST.HIPERGEOM ## Retorna a distribuição hipergeométrica
+INTERCEPT = INTERCEPÇÃO ## Retorna a intercepção da linha de regressão linear
+KURT = CURT ## Retorna a curtose de um conjunto de dados
+LARGE = MAIOR ## Retorna o maior valor k-ésimo de um conjunto de dados
+LINEST = PROJ.LIN ## Retorna os parâmetros de uma tendência linear
+LOGEST = PROJ.LOG ## Retorna os parâmetros de uma tendência exponencial
+LOGINV = INVLOG ## Retorna o inverso da distribuição lognormal
+LOGNORMDIST = DIST.LOGNORMAL ## Retorna a distribuição lognormal cumulativa
+MAX = MÁXIMO ## Retorna o valor máximo em uma lista de argumentos
+MAXA = MÁXIMOA ## Retorna o maior valor em uma lista de argumentos, inclusive números, texto e valores lógicos
+MEDIAN = MED ## Retorna a mediana dos números indicados
+MIN = MÍNIMO ## Retorna o valor mínimo em uma lista de argumentos
+MINA = MÍNIMOA ## Retorna o menor valor em uma lista de argumentos, inclusive números, texto e valores lógicos
+MODE = MODO ## Retorna o valor mais comum em um conjunto de dados
+NEGBINOMDIST = DIST.BIN.NEG ## Retorna a distribuição binomial negativa
+NORMDIST = DIST.NORM ## Retorna a distribuição cumulativa normal
+NORMINV = INV.NORM ## Retorna o inverso da distribuição cumulativa normal
+NORMSDIST = DIST.NORMP ## Retorna a distribuição cumulativa normal padrão
+NORMSINV = INV.NORMP ## Retorna o inverso da distribuição cumulativa normal padrão
+PEARSON = PEARSON ## Retorna o coeficiente de correlação do momento do produto Pearson
+PERCENTILE = PERCENTIL ## Retorna o k-ésimo percentil de valores em um intervalo
+PERCENTRANK = ORDEM.PORCENTUAL ## Retorna a ordem percentual de um valor em um conjunto de dados
+PERMUT = PERMUT ## Retorna o número de permutações de um determinado número de objetos
+POISSON = POISSON ## Retorna a distribuição Poisson
+PROB = PROB ## Retorna a probabilidade de valores em um intervalo estarem entre dois limites
+QUARTILE = QUARTIL ## Retorna o quartil do conjunto de dados
+RANK = ORDEM ## Retorna a posição de um número em uma lista de números
+RSQ = RQUAD ## Retorna o quadrado do coeficiente de correlação do momento do produto de Pearson
+SKEW = DISTORÇÃO ## Retorna a distorção de uma distribuição
+SLOPE = INCLINAÇÃO ## Retorna a inclinação da linha de regressão linear
+SMALL = MENOR ## Retorna o menor valor k-ésimo do conjunto de dados
+STANDARDIZE = PADRONIZAR ## Retorna um valor normalizado
+STDEV = DESVPAD ## Estima o desvio padrão com base em uma amostra
+STDEVA = DESVPADA ## Estima o desvio padrão com base em uma amostra, inclusive números, texto e valores lógicos
+STDEVP = DESVPADP ## Calcula o desvio padrão com base na população total
+STDEVPA = DESVPADPA ## Calcula o desvio padrão com base na população total, inclusive números, texto e valores lógicos
+STEYX = EPADYX ## Retorna o erro padrão do valor-y previsto para cada x da regressão
+TDIST = DISTT ## Retorna a distribuição t de Student
+TINV = INVT ## Retorna o inverso da distribuição t de Student
+TREND = TENDÊNCIA ## Retorna valores ao longo de uma tendência linear
+TRIMMEAN = MÉDIA.INTERNA ## Retorna a média do interior de um conjunto de dados
+TTEST = TESTET ## Retorna a probabilidade associada ao teste t de Student
+VAR = VAR ## Estima a variância com base em uma amostra
+VARA = VARA ## Estima a variância com base em uma amostra, inclusive números, texto e valores lógicos
+VARP = VARP ## Calcula a variância com base na população inteira
+VARPA = VARPA ## Calcula a variância com base na população total, inclusive números, texto e valores lógicos
+WEIBULL = WEIBULL ## Retorna a distribuição Weibull
+ZTEST = TESTEZ ## Retorna o valor de probabilidade uni-caudal de um teste-z
+
+
+##
+## Text functions Funções de texto
+##
+ASC = ASC ## Altera letras do inglês ou katakana de largura total (bytes duplos) dentro de uma seqüência de caracteres para caracteres de meia largura (byte único)
+BAHTTEXT = BAHTTEXT ## Converte um número em um texto, usando o formato de moeda ß (baht)
+CHAR = CARACT ## Retorna o caractere especificado pelo número de código
+CLEAN = TIRAR ## Remove todos os caracteres do texto que não podem ser impressos
+CODE = CÓDIGO ## Retorna um código numérico para o primeiro caractere de uma seqüência de caracteres de texto
+CONCATENATE = CONCATENAR ## Agrupa vários itens de texto em um único item de texto
+DOLLAR = MOEDA ## Converte um número em texto, usando o formato de moeda $ (dólar)
+EXACT = EXATO ## Verifica se dois valores de texto são idênticos
+FIND = PROCURAR ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas)
+FINDB = PROCURARB ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas)
+FIXED = DEF.NÚM.DEC ## Formata um número como texto com um número fixo de decimais
+JIS = JIS ## Altera letras do inglês ou katakana de meia largura (byte único) dentro de uma seqüência de caracteres para caracteres de largura total (bytes duplos)
+LEFT = ESQUERDA ## Retorna os caracteres mais à esquerda de um valor de texto
+LEFTB = ESQUERDAB ## Retorna os caracteres mais à esquerda de um valor de texto
+LEN = NÚM.CARACT ## Retorna o número de caracteres em uma seqüência de texto
+LENB = NÚM.CARACTB ## Retorna o número de caracteres em uma seqüência de texto
+LOWER = MINÚSCULA ## Converte texto para minúsculas
+MID = EXT.TEXTO ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada
+MIDB = EXT.TEXTOB ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada
+PHONETIC = FONÉTICA ## Extrai os caracteres fonéticos (furigana) de uma seqüência de caracteres de texto
+PROPER = PRI.MAIÚSCULA ## Coloca a primeira letra de cada palavra em maiúscula em um valor de texto
+REPLACE = MUDAR ## Muda os caracteres dentro do texto
+REPLACEB = MUDARB ## Muda os caracteres dentro do texto
+REPT = REPT ## Repete o texto um determinado número de vezes
+RIGHT = DIREITA ## Retorna os caracteres mais à direita de um valor de texto
+RIGHTB = DIREITAB ## Retorna os caracteres mais à direita de um valor de texto
+SEARCH = LOCALIZAR ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas)
+SEARCHB = LOCALIZARB ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas)
+SUBSTITUTE = SUBSTITUIR ## Substitui um novo texto por um texto antigo em uma seqüência de texto
+T = T ## Converte os argumentos em texto
+TEXT = TEXTO ## Formata um número e o converte em texto
+TRIM = ARRUMAR ## Remove espaços do texto
+UPPER = MAIÚSCULA ## Converte o texto em maiúsculas
+VALUE = VALOR ## Converte um argumento de texto em um número
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config
new file mode 100644
index 0000000..96cf9a6
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = €
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #NULO!
+DIV0 = #DIV/0!
+VALUE = #VALOR!
+REF = #REF!
+NAME = #NOME?
+NUM = #NÚM!
+NA = #N/D
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions
new file mode 100644
index 0000000..7fe9e3b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions
@@ -0,0 +1,408 @@
+##
+## Add-in and Automation functions Funções de Suplemento e Automatização
+##
+GETPIVOTDATA = OBTERDADOSDIN ## Devolve dados armazenados num relatório de Tabela Dinâmica
+
+
+##
+## Cube functions Funções de cubo
+##
+CUBEKPIMEMBER = MEMBROKPICUBO ## Devolve o nome, propriedade e medição de um KPI (key performance indicator) e apresenta o nome e a propriedade na célula. Um KPI é uma medida quantificável, como, por exemplo, o lucro mensal bruto ou a rotatividade trimestral de pessoal, utilizada para monitorizar o desempenho de uma organização.
+CUBEMEMBER = MEMBROCUBO ## Devolve um membro ou cadeia de identificação numa hierarquia de cubo. Utilizada para validar a existência do membro ou cadeia de identificação no cubo.
+CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Devolve o valor de uma propriedade de membro no cubo. Utilizada para validar a existência de um nome de membro no cubo e para devolver a propriedade especificada para esse membro.
+CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Devolve o enésimo ou a classificação mais alta num conjunto. Utilizada para devolver um ou mais elementos num conjunto, tal como o melhor vendedor ou os 10 melhores alunos.
+CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou cadeias de identificação enviando uma expressão de conjunto para o cubo no servidor, que cria o conjunto e, em seguida, devolve o conjunto ao Microsoft Office Excel.
+CUBESETCOUNT = CONTARCONJUNTOCUBO ## Devolve o número de itens num conjunto.
+CUBEVALUE = VALORCUBO ## Devolve um valor agregado do cubo.
+
+
+##
+## Database functions Funções de base de dados
+##
+DAVERAGE = BDMÉDIA ## Devolve a média das entradas da base de dados seleccionadas
+DCOUNT = BDCONTAR ## Conta as células que contêm números numa base de dados
+DCOUNTA = BDCONTAR.VAL ## Conta as células que não estejam em branco numa base de dados
+DGET = BDOBTER ## Extrai de uma base de dados um único registo que corresponde aos critérios especificados
+DMAX = BDMÁX ## Devolve o valor máximo das entradas da base de dados seleccionadas
+DMIN = BDMÍN ## Devolve o valor mínimo das entradas da base de dados seleccionadas
+DPRODUCT = BDMULTIPL ## Multiplica os valores de um determinado campo de registos que correspondem aos critérios numa base de dados
+DSTDEV = BDDESVPAD ## Calcula o desvio-padrão com base numa amostra de entradas da base de dados seleccionadas
+DSTDEVP = BDDESVPADP ## Calcula o desvio-padrão com base na população total das entradas da base de dados seleccionadas
+DSUM = BDSOMA ## Adiciona os números na coluna de campo dos registos de base de dados que correspondem aos critérios
+DVAR = BDVAR ## Calcula a variância com base numa amostra das entradas de base de dados seleccionadas
+DVARP = BDVARP ## Calcula a variância com base na população total das entradas de base de dados seleccionadas
+
+
+##
+## Date and time functions Funções de data e hora
+##
+DATE = DATA ## Devolve o número de série de uma determinada data
+DATEVALUE = DATA.VALOR ## Converte uma data em forma de texto num número de série
+DAY = DIA ## Converte um número de série num dia do mês
+DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base num ano com 360 dias
+EDATE = DATAM ## Devolve um número de série de data que corresponde ao número de meses indicado antes ou depois da data de início
+EOMONTH = FIMMÊS ## Devolve o número de série do último dia do mês antes ou depois de um número de meses especificado
+HOUR = HORA ## Converte um número de série numa hora
+MINUTE = MINUTO ## Converte um número de série num minuto
+MONTH = MÊS ## Converte um número de série num mês
+NETWORKDAYS = DIATRABALHOTOTAL ## Devolve o número total de dias úteis entre duas datas
+NOW = AGORA ## Devolve o número de série da data e hora actuais
+SECOND = SEGUNDO ## Converte um número de série num segundo
+TIME = TEMPO ## Devolve o número de série de um determinado tempo
+TIMEVALUE = VALOR.TEMPO ## Converte um tempo em forma de texto num número de série
+TODAY = HOJE ## Devolve o número de série da data actual
+WEEKDAY = DIA.SEMANA ## Converte um número de série num dia da semana
+WEEKNUM = NÚMSEMANA ## Converte um número de série num número que representa o número da semana num determinado ano
+WORKDAY = DIA.TRABALHO ## Devolve o número de série da data antes ou depois de um número de dias úteis especificado
+YEAR = ANO ## Converte um número de série num ano
+YEARFRAC = FRACÇÃOANO ## Devolve a fracção de ano que representa o número de dias inteiros entre a data_de_início e a data_de_fim
+
+
+##
+## Engineering functions Funções de engenharia
+##
+BESSELI = BESSELI ## Devolve a função de Bessel modificada In(x)
+BESSELJ = BESSELJ ## Devolve a função de Bessel Jn(x)
+BESSELK = BESSELK ## Devolve a função de Bessel modificada Kn(x)
+BESSELY = BESSELY ## Devolve a função de Bessel Yn(x)
+BIN2DEC = BINADEC ## Converte um número binário em decimal
+BIN2HEX = BINAHEX ## Converte um número binário em hexadecimal
+BIN2OCT = BINAOCT ## Converte um número binário em octal
+COMPLEX = COMPLEXO ## Converte coeficientes reais e imaginários num número complexo
+CONVERT = CONVERTER ## Converte um número de um sistema de medida noutro
+DEC2BIN = DECABIN ## Converte um número decimal em binário
+DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal
+DEC2OCT = DECAOCT ## Converte um número decimal em octal
+DELTA = DELTA ## Testa se dois valores são iguais
+ERF = FUNCERRO ## Devolve a função de erro
+ERFC = FUNCERROCOMPL ## Devolve a função de erro complementar
+GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite
+HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário
+HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal
+HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal
+IMABS = IMABS ## Devolve o valor absoluto (módulo) de um número complexo
+IMAGINARY = IMAGINÁRIO ## Devolve o coeficiente imaginário de um número complexo
+IMARGUMENT = IMARG ## Devolve o argumento Teta, um ângulo expresso em radianos
+IMCONJUGATE = IMCONJ ## Devolve o conjugado complexo de um número complexo
+IMCOS = IMCOS ## Devolve o co-seno de um número complexo
+IMDIV = IMDIV ## Devolve o quociente de dois números complexos
+IMEXP = IMEXP ## Devolve o exponencial de um número complexo
+IMLN = IMLN ## Devolve o logaritmo natural de um número complexo
+IMLOG10 = IMLOG10 ## Devolve o logaritmo de base 10 de um número complexo
+IMLOG2 = IMLOG2 ## Devolve o logaritmo de base 2 de um número complexo
+IMPOWER = IMPOT ## Devolve um número complexo elevado a uma potência inteira
+IMPRODUCT = IMPROD ## Devolve o produto de números complexos
+IMREAL = IMREAL ## Devolve o coeficiente real de um número complexo
+IMSIN = IMSENO ## Devolve o seno de um número complexo
+IMSQRT = IMRAIZ ## Devolve a raiz quadrada de um número complexo
+IMSUB = IMSUBTR ## Devolve a diferença entre dois números complexos
+IMSUM = IMSOMA ## Devolve a soma de números complexos
+OCT2BIN = OCTABIN ## Converte um número octal em binário
+OCT2DEC = OCTADEC ## Converte um número octal em decimal
+OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal
+
+
+##
+## Financial functions Funções financeiras
+##
+ACCRINT = JUROSACUM ## Devolve os juros acumulados de um título que paga juros periódicos
+ACCRINTM = JUROSACUMV ## Devolve os juros acumulados de um título que paga juros no vencimento
+AMORDEGRC = AMORDEGRC ## Devolve a depreciação correspondente a cada período contabilístico utilizando um coeficiente de depreciação
+AMORLINC = AMORLINC ## Devolve a depreciação correspondente a cada período contabilístico
+COUPDAYBS = CUPDIASINLIQ ## Devolve o número de dias entre o início do período do cupão e a data de regularização
+COUPDAYS = CUPDIAS ## Devolve o número de dias no período do cupão que contém a data de regularização
+COUPDAYSNC = CUPDIASPRÓX ## Devolve o número de dias entre a data de regularização e a data do cupão seguinte
+COUPNCD = CUPDATAPRÓX ## Devolve a data do cupão seguinte após a data de regularização
+COUPNUM = CUPNÚM ## Devolve o número de cupões a serem pagos entre a data de regularização e a data de vencimento
+COUPPCD = CUPDATAANT ## Devolve a data do cupão anterior antes da data de regularização
+CUMIPMT = PGTOJURACUM ## Devolve os juros cumulativos pagos entre dois períodos
+CUMPRINC = PGTOCAPACUM ## Devolve o capital cumulativo pago a título de empréstimo entre dois períodos
+DB = BD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas fixas
+DDB = BDD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas duplas ou qualquer outro método especificado
+DISC = DESC ## Devolve a taxa de desconto de um título
+DOLLARDE = MOEDADEC ## Converte um preço em unidade monetária, expresso como uma fracção, num preço em unidade monetária, expresso como um número decimal
+DOLLARFR = MOEDAFRA ## Converte um preço em unidade monetária, expresso como um número decimal, num preço em unidade monetária, expresso como uma fracção
+DURATION = DURAÇÃO ## Devolve a duração anual de um título com pagamentos de juros periódicos
+EFFECT = EFECTIVA ## Devolve a taxa de juros anual efectiva
+FV = VF ## Devolve o valor futuro de um investimento
+FVSCHEDULE = VFPLANO ## Devolve o valor futuro de um capital inicial após a aplicação de uma série de taxas de juro compostas
+INTRATE = TAXAJUROS ## Devolve a taxa de juros de um título investido na totalidade
+IPMT = IPGTO ## Devolve o pagamento dos juros de um investimento durante um determinado período
+IRR = TIR ## Devolve a taxa de rentabilidade interna para uma série de fluxos monetários
+ISPMT = É.PGTO ## Calcula os juros pagos durante um período específico de um investimento
+MDURATION = MDURAÇÃO ## Devolve a duração modificada de Macauley de um título com um valor de paridade equivalente a € 100
+MIRR = MTIR ## Devolve a taxa interna de rentabilidade em que os fluxos monetários positivos e negativos são financiados com taxas diferentes
+NOMINAL = NOMINAL ## Devolve a taxa de juros nominal anual
+NPER = NPER ## Devolve o número de períodos de um investimento
+NPV = VAL ## Devolve o valor actual líquido de um investimento com base numa série de fluxos monetários periódicos e numa taxa de desconto
+ODDFPRICE = PREÇOPRIMINC ## Devolve o preço por € 100 do valor nominal de um título com um período inicial incompleto
+ODDFYIELD = LUCROPRIMINC ## Devolve o lucro de um título com um período inicial incompleto
+ODDLPRICE = PREÇOÚLTINC ## Devolve o preço por € 100 do valor nominal de um título com um período final incompleto
+ODDLYIELD = LUCROÚLTINC ## Devolve o lucro de um título com um período final incompleto
+PMT = PGTO ## Devolve o pagamento periódico de uma anuidade
+PPMT = PPGTO ## Devolve o pagamento sobre o capital de um investimento num determinado período
+PRICE = PREÇO ## Devolve o preço por € 100 do valor nominal de um título que paga juros periódicos
+PRICEDISC = PREÇODESC ## Devolve o preço por € 100 do valor nominal de um título descontado
+PRICEMAT = PREÇOVENC ## Devolve o preço por € 100 do valor nominal de um título que paga juros no vencimento
+PV = VA ## Devolve o valor actual de um investimento
+RATE = TAXA ## Devolve a taxa de juros por período de uma anuidade
+RECEIVED = RECEBER ## Devolve o montante recebido no vencimento de um título investido na totalidade
+SLN = AMORT ## Devolve uma depreciação linear de um activo durante um período
+SYD = AMORTD ## Devolve a depreciação por algarismos da soma dos anos de um activo durante um período especificado
+TBILLEQ = OTN ## Devolve o lucro de um título equivalente a uma Obrigação do Tesouro
+TBILLPRICE = OTNVALOR ## Devolve o preço por € 100 de valor nominal de uma Obrigação do Tesouro
+TBILLYIELD = OTNLUCRO ## Devolve o lucro de uma Obrigação do Tesouro
+VDB = BDV ## Devolve a depreciação de um activo relativo a um período específico ou parcial utilizando um método de quotas degressivas
+XIRR = XTIR ## Devolve a taxa interna de rentabilidade de um plano de fluxos monetários que não seja necessariamente periódica
+XNPV = XVAL ## Devolve o valor actual líquido de um plano de fluxos monetários que não seja necessariamente periódico
+YIELD = LUCRO ## Devolve o lucro de um título que paga juros periódicos
+YIELDDISC = LUCRODESC ## Devolve o lucro anual de um título emitido abaixo do valor nominal, por exemplo, uma Obrigação do Tesouro
+YIELDMAT = LUCROVENC ## Devolve o lucro anual de um título que paga juros na data de vencimento
+
+
+##
+## Information functions Funções de informação
+##
+CELL = CÉL ## Devolve informações sobre a formatação, localização ou conteúdo de uma célula
+ERROR.TYPE = TIPO.ERRO ## Devolve um número correspondente a um tipo de erro
+INFO = INFORMAÇÃO ## Devolve informações sobre o ambiente de funcionamento actual
+ISBLANK = É.CÉL.VAZIA ## Devolve VERDADEIRO se o valor estiver em branco
+ISERR = É.ERROS ## Devolve VERDADEIRO se o valor for um valor de erro diferente de #N/D
+ISERROR = É.ERRO ## Devolve VERDADEIRO se o valor for um valor de erro
+ISEVEN = ÉPAR ## Devolve VERDADEIRO se o número for par
+ISLOGICAL = É.LÓGICO ## Devolve VERDADEIRO se o valor for lógico
+ISNA = É.NÃO.DISP ## Devolve VERDADEIRO se o valor for o valor de erro #N/D
+ISNONTEXT = É.NÃO.TEXTO ## Devolve VERDADEIRO se o valor não for texto
+ISNUMBER = É.NÚM ## Devolve VERDADEIRO se o valor for um número
+ISODD = ÉÍMPAR ## Devolve VERDADEIRO se o número for ímpar
+ISREF = É.REF ## Devolve VERDADEIRO se o valor for uma referência
+ISTEXT = É.TEXTO ## Devolve VERDADEIRO se o valor for texto
+N = N ## Devolve um valor convertido num número
+NA = NÃO.DISP ## Devolve o valor de erro #N/D
+TYPE = TIPO ## Devolve um número que indica o tipo de dados de um valor
+
+
+##
+## Logical functions Funções lógicas
+##
+AND = E ## Devolve VERDADEIRO se todos os respectivos argumentos corresponderem a VERDADEIRO
+FALSE = FALSO ## Devolve o valor lógico FALSO
+IF = SE ## Especifica um teste lógico a ser executado
+IFERROR = SE.ERRO ## Devolve um valor definido pelo utilizador se ocorrer um erro na fórmula, e devolve o resultado da fórmula se não ocorrer nenhum erro
+NOT = NÃO ## Inverte a lógica do respectivo argumento
+OR = OU ## Devolve VERDADEIRO se qualquer argumento for VERDADEIRO
+TRUE = VERDADEIRO ## Devolve o valor lógico VERDADEIRO
+
+
+##
+## Lookup and reference functions Funções de pesquisa e referência
+##
+ADDRESS = ENDEREÇO ## Devolve uma referência a uma única célula numa folha de cálculo como texto
+AREAS = ÁREAS ## Devolve o número de áreas numa referência
+CHOOSE = SELECCIONAR ## Selecciona um valor a partir de uma lista de valores
+COLUMN = COL ## Devolve o número da coluna de uma referência
+COLUMNS = COLS ## Devolve o número de colunas numa referência
+HLOOKUP = PROCH ## Procura na linha superior de uma matriz e devolve o valor da célula indicada
+HYPERLINK = HIPERLIGAÇÃO ## Cria um atalho ou hiperligação que abre um documento armazenado num servidor de rede, numa intranet ou na Internet
+INDEX = ÍNDICE ## Utiliza um índice para escolher um valor de uma referência ou de uma matriz
+INDIRECT = INDIRECTO ## Devolve uma referência indicada por um valor de texto
+LOOKUP = PROC ## Procura valores num vector ou numa matriz
+MATCH = CORRESP ## Procura valores numa referência ou numa matriz
+OFFSET = DESLOCAMENTO ## Devolve o deslocamento de referência de uma determinada referência
+ROW = LIN ## Devolve o número da linha de uma referência
+ROWS = LINS ## Devolve o número de linhas numa referência
+RTD = RTD ## Obtém dados em tempo real a partir de um programa que suporte automatização COM (automatização: modo de trabalhar com objectos de uma aplicação a partir de outra aplicação ou ferramenta de desenvolvimento. Anteriormente conhecida como automatização OLE, a automatização é uma norma da indústria de software e uma funcionalidade COM (Component Object Model).)
+TRANSPOSE = TRANSPOR ## Devolve a transposição de uma matriz
+VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e percorre a linha para devolver o valor de uma célula
+
+
+##
+## Math and trigonometry functions Funções matemáticas e trigonométricas
+##
+ABS = ABS ## Devolve o valor absoluto de um número
+ACOS = ACOS ## Devolve o arco de co-seno de um número
+ACOSH = ACOSH ## Devolve o co-seno hiperbólico inverso de um número
+ASIN = ASEN ## Devolve o arco de seno de um número
+ASINH = ASENH ## Devolve o seno hiperbólico inverso de um número
+ATAN = ATAN ## Devolve o arco de tangente de um número
+ATAN2 = ATAN2 ## Devolve o arco de tangente das coordenadas x e y
+ATANH = ATANH ## Devolve a tangente hiperbólica inversa de um número
+CEILING = ARRED.EXCESSO ## Arredonda um número para o número inteiro mais próximo ou para o múltiplo de significância mais próximo
+COMBIN = COMBIN ## Devolve o número de combinações de um determinado número de objectos
+COS = COS ## Devolve o co-seno de um número
+COSH = COSH ## Devolve o co-seno hiperbólico de um número
+DEGREES = GRAUS ## Converte radianos em graus
+EVEN = PAR ## Arredonda um número por excesso para o número inteiro mais próximo
+EXP = EXP ## Devolve e elevado à potência de um determinado número
+FACT = FACTORIAL ## Devolve o factorial de um número
+FACTDOUBLE = FACTDUPLO ## Devolve o factorial duplo de um número
+FLOOR = ARRED.DEFEITO ## Arredonda um número por defeito até zero
+GCD = MDC ## Devolve o maior divisor comum
+INT = INT ## Arredonda um número por defeito para o número inteiro mais próximo
+LCM = MMC ## Devolve o mínimo múltiplo comum
+LN = LN ## Devolve o logaritmo natural de um número
+LOG = LOG ## Devolve o logaritmo de um número com uma base especificada
+LOG10 = LOG10 ## Devolve o logaritmo de base 10 de um número
+MDETERM = MATRIZ.DETERM ## Devolve o determinante matricial de uma matriz
+MINVERSE = MATRIZ.INVERSA ## Devolve o inverso matricial de uma matriz
+MMULT = MATRIZ.MULT ## Devolve o produto matricial de duas matrizes
+MOD = RESTO ## Devolve o resto da divisão
+MROUND = MARRED ## Devolve um número arredondado para o múltiplo pretendido
+MULTINOMIAL = POLINOMIAL ## Devolve o polinomial de um conjunto de números
+ODD = ÍMPAR ## Arredonda por excesso um número para o número inteiro ímpar mais próximo
+PI = PI ## Devolve o valor de pi
+POWER = POTÊNCIA ## Devolve o resultado de um número elevado a uma potência
+PRODUCT = PRODUTO ## Multiplica os respectivos argumentos
+QUOTIENT = QUOCIENTE ## Devolve a parte inteira de uma divisão
+RADIANS = RADIANOS ## Converte graus em radianos
+RAND = ALEATÓRIO ## Devolve um número aleatório entre 0 e 1
+RANDBETWEEN = ALEATÓRIOENTRE ## Devolve um número aleatório entre os números especificados
+ROMAN = ROMANO ## Converte um número árabe em romano, como texto
+ROUND = ARRED ## Arredonda um número para um número de dígitos especificado
+ROUNDDOWN = ARRED.PARA.BAIXO ## Arredonda um número por defeito até zero
+ROUNDUP = ARRED.PARA.CIMA ## Arredonda um número por excesso, afastando-o de zero
+SERIESSUM = SOMASÉRIE ## Devolve a soma de uma série de potências baseada na fórmula
+SIGN = SINAL ## Devolve o sinal de um número
+SIN = SEN ## Devolve o seno de um determinado ângulo
+SINH = SENH ## Devolve o seno hiperbólico de um número
+SQRT = RAIZQ ## Devolve uma raiz quadrada positiva
+SQRTPI = RAIZPI ## Devolve a raiz quadrada de (núm * pi)
+SUBTOTAL = SUBTOTAL ## Devolve um subtotal numa lista ou base de dados
+SUM = SOMA ## Adiciona os respectivos argumentos
+SUMIF = SOMA.SE ## Adiciona as células especificadas por um determinado critério
+SUMIFS = SOMA.SE.S ## Adiciona as células num intervalo que cumpre vários critérios
+SUMPRODUCT = SOMARPRODUTO ## Devolve a soma dos produtos de componentes de matrizes correspondentes
+SUMSQ = SOMARQUAD ## Devolve a soma dos quadrados dos argumentos
+SUMX2MY2 = SOMAX2DY2 ## Devolve a soma da diferença dos quadrados dos valores correspondentes em duas matrizes
+SUMX2PY2 = SOMAX2SY2 ## Devolve a soma da soma dos quadrados dos valores correspondentes em duas matrizes
+SUMXMY2 = SOMAXMY2 ## Devolve a soma dos quadrados da diferença dos valores correspondentes em duas matrizes
+TAN = TAN ## Devolve a tangente de um número
+TANH = TANH ## Devolve a tangente hiperbólica de um número
+TRUNC = TRUNCAR ## Trunca um número para um número inteiro
+
+
+##
+## Statistical functions Funções estatísticas
+##
+AVEDEV = DESV.MÉDIO ## Devolve a média aritmética dos desvios absolutos à média dos pontos de dados
+AVERAGE = MÉDIA ## Devolve a média dos respectivos argumentos
+AVERAGEA = MÉDIAA ## Devolve uma média dos respectivos argumentos, incluindo números, texto e valores lógicos
+AVERAGEIF = MÉDIA.SE ## Devolve a média aritmética de todas as células num intervalo que cumprem determinado critério
+AVERAGEIFS = MÉDIA.SE.S ## Devolve a média aritmética de todas as células que cumprem múltiplos critérios
+BETADIST = DISTBETA ## Devolve a função de distribuição cumulativa beta
+BETAINV = BETA.ACUM.INV ## Devolve o inverso da função de distribuição cumulativa relativamente a uma distribuição beta específica
+BINOMDIST = DISTRBINOM ## Devolve a probabilidade de distribuição binomial de termo individual
+CHIDIST = DIST.CHI ## Devolve a probabilidade unicaudal da distribuição qui-quadrada
+CHIINV = INV.CHI ## Devolve o inverso da probabilidade unicaudal da distribuição qui-quadrada
+CHITEST = TESTE.CHI ## Devolve o teste para independência
+CONFIDENCE = INT.CONFIANÇA ## Devolve o intervalo de confiança correspondente a uma média de população
+CORREL = CORREL ## Devolve o coeficiente de correlação entre dois conjuntos de dados
+COUNT = CONTAR ## Conta os números que existem na lista de argumentos
+COUNTA = CONTAR.VAL ## Conta os valores que existem na lista de argumentos
+COUNTBLANK = CONTAR.VAZIO ## Conta o número de células em branco num intervalo
+COUNTIF = CONTAR.SE ## Calcula o número de células num intervalo que corresponde aos critérios determinados
+COUNTIFS = CONTAR.SE.S ## Conta o número de células num intervalo que cumprem múltiplos critérios
+COVAR = COVAR ## Devolve a covariância, que é a média dos produtos de desvios de pares
+CRITBINOM = CRIT.BINOM ## Devolve o menor valor em que a distribuição binomial cumulativa é inferior ou igual a um valor de critério
+DEVSQ = DESVQ ## Devolve a soma dos quadrados dos desvios
+EXPONDIST = DISTEXPON ## Devolve a distribuição exponencial
+FDIST = DISTF ## Devolve a distribuição da probabilidade F
+FINV = INVF ## Devolve o inverso da distribuição da probabilidade F
+FISHER = FISHER ## Devolve a transformação Fisher
+FISHERINV = FISHERINV ## Devolve o inverso da transformação Fisher
+FORECAST = PREVISÃO ## Devolve um valor ao longo de uma tendência linear
+FREQUENCY = FREQUÊNCIA ## Devolve uma distribuição de frequência como uma matriz vertical
+FTEST = TESTEF ## Devolve o resultado de um teste F
+GAMMADIST = DISTGAMA ## Devolve a distribuição gama
+GAMMAINV = INVGAMA ## Devolve o inverso da distribuição gama cumulativa
+GAMMALN = LNGAMA ## Devolve o logaritmo natural da função gama, Γ(x)
+GEOMEAN = MÉDIA.GEOMÉTRICA ## Devolve a média geométrica
+GROWTH = CRESCIMENTO ## Devolve valores ao longo de uma tendência exponencial
+HARMEAN = MÉDIA.HARMÓNICA ## Devolve a média harmónica
+HYPGEOMDIST = DIST.HIPERGEOM ## Devolve a distribuição hipergeométrica
+INTERCEPT = INTERCEPTAR ## Devolve a intercepção da linha de regressão linear
+KURT = CURT ## Devolve a curtose de um conjunto de dados
+LARGE = MAIOR ## Devolve o maior valor k-ésimo de um conjunto de dados
+LINEST = PROJ.LIN ## Devolve os parâmetros de uma tendência linear
+LOGEST = PROJ.LOG ## Devolve os parâmetros de uma tendência exponencial
+LOGINV = INVLOG ## Devolve o inverso da distribuição normal logarítmica
+LOGNORMDIST = DIST.NORMALLOG ## Devolve a distribuição normal logarítmica cumulativa
+MAX = MÁXIMO ## Devolve o valor máximo numa lista de argumentos
+MAXA = MÁXIMOA ## Devolve o valor máximo numa lista de argumentos, incluindo números, texto e valores lógicos
+MEDIAN = MED ## Devolve a mediana dos números indicados
+MIN = MÍNIMO ## Devolve o valor mínimo numa lista de argumentos
+MINA = MÍNIMOA ## Devolve o valor mínimo numa lista de argumentos, incluindo números, texto e valores lógicos
+MODE = MODA ## Devolve o valor mais comum num conjunto de dados
+NEGBINOMDIST = DIST.BIN.NEG ## Devolve a distribuição binominal negativa
+NORMDIST = DIST.NORM ## Devolve a distribuição cumulativa normal
+NORMINV = INV.NORM ## Devolve o inverso da distribuição cumulativa normal
+NORMSDIST = DIST.NORMP ## Devolve a distribuição cumulativa normal padrão
+NORMSINV = INV.NORMP ## Devolve o inverso da distribuição cumulativa normal padrão
+PEARSON = PEARSON ## Devolve o coeficiente de correlação momento/produto de Pearson
+PERCENTILE = PERCENTIL ## Devolve o k-ésimo percentil de valores num intervalo
+PERCENTRANK = ORDEM.PERCENTUAL ## Devolve a ordem percentual de um valor num conjunto de dados
+PERMUT = PERMUTAR ## Devolve o número de permutações de um determinado número de objectos
+POISSON = POISSON ## Devolve a distribuição de Poisson
+PROB = PROB ## Devolve a probabilidade dos valores num intervalo se encontrarem entre dois limites
+QUARTILE = QUARTIL ## Devolve o quartil de um conjunto de dados
+RANK = ORDEM ## Devolve a ordem de um número numa lista numérica
+RSQ = RQUAD ## Devolve o quadrado do coeficiente de correlação momento/produto de Pearson
+SKEW = DISTORÇÃO ## Devolve a distorção de uma distribuição
+SLOPE = DECLIVE ## Devolve o declive da linha de regressão linear
+SMALL = MENOR ## Devolve o menor valor de k-ésimo de um conjunto de dados
+STANDARDIZE = NORMALIZAR ## Devolve um valor normalizado
+STDEV = DESVPAD ## Calcula o desvio-padrão com base numa amostra
+STDEVA = DESVPADA ## Calcula o desvio-padrão com base numa amostra, incluindo números, texto e valores lógicos
+STDEVP = DESVPADP ## Calcula o desvio-padrão com base na população total
+STDEVPA = DESVPADPA ## Calcula o desvio-padrão com base na população total, incluindo números, texto e valores lógicos
+STEYX = EPADYX ## Devolve o erro-padrão do valor de y previsto para cada x na regressão
+TDIST = DISTT ## Devolve a distribuição t de Student
+TINV = INVT ## Devolve o inverso da distribuição t de Student
+TREND = TENDÊNCIA ## Devolve valores ao longo de uma tendência linear
+TRIMMEAN = MÉDIA.INTERNA ## Devolve a média do interior de um conjunto de dados
+TTEST = TESTET ## Devolve a probabilidade associada ao teste t de Student
+VAR = VAR ## Calcula a variância com base numa amostra
+VARA = VARA ## Calcula a variância com base numa amostra, incluindo números, texto e valores lógicos
+VARP = VARP ## Calcula a variância com base na população total
+VARPA = VARPA ## Calcula a variância com base na população total, incluindo números, texto e valores lógicos
+WEIBULL = WEIBULL ## Devolve a distribuição Weibull
+ZTEST = TESTEZ ## Devolve o valor de probabilidade unicaudal de um teste-z
+
+
+##
+## Text functions Funções de texto
+##
+ASC = ASC ## Altera letras ou katakana de largura total (byte duplo) numa cadeia de caracteres para caracteres de largura média (byte único)
+BAHTTEXT = TEXTO.BAHT ## Converte um número em texto, utilizando o formato monetário ß (baht)
+CHAR = CARÁCT ## Devolve o carácter especificado pelo número de código
+CLEAN = LIMPAR ## Remove do texto todos os caracteres não imprimíveis
+CODE = CÓDIGO ## Devolve um código numérico correspondente ao primeiro carácter numa cadeia de texto
+CONCATENATE = CONCATENAR ## Agrupa vários itens de texto num único item de texto
+DOLLAR = MOEDA ## Converte um número em texto, utilizando o formato monetário € (Euro)
+EXACT = EXACTO ## Verifica se dois valores de texto são idênticos
+FIND = LOCALIZAR ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas)
+FINDB = LOCALIZARB ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas)
+FIXED = FIXA ## Formata um número como texto com um número fixo de decimais
+JIS = JIS ## Altera letras ou katakana de largura média (byte único) numa cadeia de caracteres para caracteres de largura total (byte duplo)
+LEFT = ESQUERDA ## Devolve os caracteres mais à esquerda de um valor de texto
+LEFTB = ESQUERDAB ## Devolve os caracteres mais à esquerda de um valor de texto
+LEN = NÚM.CARACT ## Devolve o número de caracteres de uma cadeia de texto
+LENB = NÚM.CARACTB ## Devolve o número de caracteres de uma cadeia de texto
+LOWER = MINÚSCULAS ## Converte o texto em minúsculas
+MID = SEG.TEXTO ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada
+MIDB = SEG.TEXTOB ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada
+PHONETIC = FONÉTICA ## Retira os caracteres fonéticos (furigana) de uma cadeia de texto
+PROPER = INICIAL.MAIÚSCULA ## Coloca em maiúsculas a primeira letra de cada palavra de um valor de texto
+REPLACE = SUBSTITUIR ## Substitui caracteres no texto
+REPLACEB = SUBSTITUIRB ## Substitui caracteres no texto
+REPT = REPETIR ## Repete texto um determinado número de vezes
+RIGHT = DIREITA ## Devolve os caracteres mais à direita de um valor de texto
+RIGHTB = DIREITAB ## Devolve os caracteres mais à direita de um valor de texto
+SEARCH = PROCURAR ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas)
+SEARCHB = PROCURARB ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas)
+SUBSTITUTE = SUBST ## Substitui texto novo por texto antigo numa cadeia de texto
+T = T ## Converte os respectivos argumentos em texto
+TEXT = TEXTO ## Formata um número e converte-o em texto
+TRIM = COMPACTAR ## Remove espaços do texto
+UPPER = MAIÚSCULAS ## Converte texto em maiúsculas
+VALUE = VALOR ## Converte um argumento de texto num número
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config
new file mode 100644
index 0000000..e574c2b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = р
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #ПУСТО!
+DIV0 = #ДЕЛ/0!
+VALUE = #ЗНАЧ!
+REF = #ССЫЛ!
+NAME = #ИМЯ?
+NUM = #ЧИСЛО!
+NA = #Н/Д
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions
new file mode 100644
index 0000000..7adadbe
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from information provided by web-junior (http://www.web-junior.net/)
+##
+##
+
+
+##
+## Add-in and Automation functions Функции надстроек и автоматизации
+##
+GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы.
+
+
+##
+## Cube functions Функции Куб
+##
+CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации.
+CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе.
+CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента.
+CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов.
+CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel.
+CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества.
+CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба.
+
+
+##
+## Database functions Функции для работы с базами данных
+##
+DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных.
+DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных.
+DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных.
+DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию.
+DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных.
+DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных.
+DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию.
+DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных.
+DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных
+DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию.
+DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных
+DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных
+
+
+##
+## Date and time functions Функции даты и времени
+##
+DATE = ДАТА ## Возвращает заданную дату в числовом формате.
+DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат.
+DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца.
+DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года.
+EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты.
+EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев.
+HOUR = ЧАС ## Преобразует дату в числовом формате в часы.
+MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты.
+MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы.
+NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами.
+NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате.
+SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды.
+TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате.
+TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат.
+TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате.
+WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели.
+WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата.
+WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней.
+YEAR = ГОД ## Преобразует дату в числовом формате в год.
+YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами.
+
+
+##
+## Engineering functions Инженерные функции
+##
+BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x).
+BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x).
+BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x).
+BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x).
+BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное.
+BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное.
+BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное.
+COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число.
+CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую.
+DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное.
+DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное.
+DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное.
+DELTA = ДЕЛЬТА ## Проверяет равенство двух значений.
+ERF = ФОШ ## Возвращает функцию ошибки.
+ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки.
+GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения.
+HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное.
+HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное.
+HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное.
+IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа.
+IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа.
+IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах.
+IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число.
+IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа.
+IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел.
+IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа.
+IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа.
+IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа.
+IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа.
+IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень.
+IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел.
+IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа.
+IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа.
+IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа.
+IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел.
+IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел.
+OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное.
+OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное.
+OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное.
+
+
+##
+## Financial functions Финансовые функции
+##
+ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов.
+ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения.
+AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации.
+AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода.
+COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения.
+COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения.
+COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона.
+COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения.
+COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу.
+COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения.
+CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами.
+CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами.
+DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка.
+DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод.
+DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг.
+DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом.
+DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби.
+DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам.
+EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки.
+FV = БС ## Возвращает будущую стоимость инвестиции.
+FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов.
+INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг.
+IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период.
+IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств.
+ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции.
+MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей.
+MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки.
+NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку.
+NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада.
+NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования.
+ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом.
+ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом.
+ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом.
+ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом.
+PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета.
+PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период.
+PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов.
+PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка.
+PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения.
+PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции.
+RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период.
+RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг.
+SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период.
+SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел.
+TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку.
+TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека.
+TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку.
+VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса.
+XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер.
+XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими.
+YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов.
+YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки).
+YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения.
+
+
+##
+## Information functions Информационные функции
+##
+CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки.
+ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки.
+INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде.
+ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку.
+ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д.
+ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки.
+ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом.
+ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение.
+ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д.
+ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом.
+ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число.
+ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом.
+ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой.
+ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом.
+N = Ч ## Возвращает значение, преобразованное в число.
+NA = НД ## Возвращает значение ошибки #Н/Д.
+TYPE = ТИП ## Возвращает число, обозначающее тип данных значения.
+
+
+##
+## Logical functions Логические функции
+##
+AND = И ## Renvoie VRAI si tous ses arguments sont VRAI.
+FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ.
+IF = ЕСЛИ ## Выполняет проверку условия.
+IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления.
+NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное.
+OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА.
+TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА.
+
+
+##
+## Lookup and reference functions Функции ссылки и поиска
+##
+ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста.
+AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке.
+CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу.
+COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка.
+COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке.
+HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки
+HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете.
+INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива.
+INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением.
+LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве.
+MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве.
+OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки.
+ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой.
+ROWS = ЧСТРОК ## Возвращает количество строк в ссылке.
+RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).).
+TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив.
+VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце.
+
+
+##
+## Math and trigonometry functions Математические и тригонометрические функции
+##
+ABS = ABS ## Возвращает модуль (абсолютную величину) числа.
+ACOS = ACOS ## Возвращает арккосинус числа.
+ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа.
+ASIN = ASIN ## Возвращает арксинус числа.
+ASINH = ASINH ## Возвращает гиперболический арксинус числа.
+ATAN = ATAN ## Возвращает арктангенс числа.
+ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y.
+ATANH = ATANH ## Возвращает гиперболический арктангенс числа.
+CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению.
+COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов.
+COS = COS ## Возвращает косинус числа.
+COSH = COSH ## Возвращает гиперболический косинус числа.
+DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы.
+EVEN = ЧЁТН ## Округляет число до ближайшего четного целого.
+EXP = EXP ## Возвращает число e, возведенное в указанную степень.
+FACT = ФАКТР ## Возвращает факториал числа.
+FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа.
+FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения.
+GCD = НОД ## Возвращает наибольший общий делитель.
+INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого.
+LCM = НОК ## Возвращает наименьшее общее кратное.
+LN = LN ## Возвращает натуральный логарифм числа.
+LOG = LOG ## Возвращает логарифм числа по заданному основанию.
+LOG10 = LOG10 ## Возвращает десятичный логарифм числа.
+MDETERM = МОПРЕД ## Возвращает определитель матрицы массива.
+MINVERSE = МОБР ## Возвращает обратную матрицу массива.
+MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов.
+MOD = ОСТАТ ## Возвращает остаток от деления.
+MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью.
+MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел.
+ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого.
+PI = ПИ ## Возвращает число пи.
+POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень.
+PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов.
+QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении.
+RADIANS = РАДИАНЫ ## Преобразует градусы в радианы.
+RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1.
+RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами.
+ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста.
+ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов.
+ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения.
+ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения.
+SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле.
+SIGN = ЗНАК ## Возвращает знак числа.
+SIN = SIN ## Возвращает синус заданного угла.
+SINH = SINH ## Возвращает гиперболический синус числа.
+SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня.
+SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ).
+SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных.
+SUM = СУММ ## Суммирует аргументы.
+SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию.
+SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям.
+SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов.
+SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов.
+SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах.
+SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов.
+SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах.
+TAN = TAN ## Возвращает тангенс числа.
+TANH = TANH ## Возвращает гиперболический тангенс числа.
+TRUNC = ОТБР ## Отбрасывает дробную часть числа.
+
+
+##
+## Statistical functions Статистические функции
+##
+AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего.
+AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов.
+AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения.
+AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию.
+AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям.
+BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения.
+BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения.
+BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения.
+CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат.
+CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат.
+CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость.
+CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности.
+CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных.
+COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов.
+COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов.
+COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне
+COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию
+COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям.
+COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений
+CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию.
+DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений.
+EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение.
+FDIST = FРАСП ## Возвращает F-распределение вероятности.
+FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности.
+FISHER = ФИШЕР ## Возвращает преобразование Фишера.
+FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера.
+FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда.
+FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива.
+FTEST = ФТЕСТ ## Возвращает результат F-теста.
+GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение.
+GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение.
+GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x).
+GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое.
+GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом.
+HARMEAN = СРГАРМ ## Возвращает среднее гармоническое.
+HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение.
+INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии.
+KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных.
+LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных.
+LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда.
+LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда.
+LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение.
+LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение.
+MAX = МАКС ## Возвращает наибольшее значение в списке аргументов.
+MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения.
+MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел.
+MIN = МИН ## Возвращает наименьшее значение в списке аргументов.
+MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения.
+MODE = МОДА ## Возвращает значение моды множества данных.
+NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение.
+NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения.
+NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение.
+NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение.
+NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения.
+PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона.
+PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона.
+PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных.
+PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов.
+POISSON = ПУАССОН ## Возвращает распределение Пуассона.
+PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов.
+QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных.
+RANK = РАНГ ## Возвращает ранг числа в списке чисел.
+RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона.
+SKEW = СКОС ## Возвращает асимметрию распределения.
+SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии.
+SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных.
+STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение.
+STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке.
+STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения.
+STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности.
+STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения.
+STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии.
+TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента.
+TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента.
+TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом.
+TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных.
+TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента.
+VAR = ДИСП ## Оценивает дисперсию по выборке.
+VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения.
+VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности.
+VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения.
+WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла.
+ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста.
+
+
+##
+## Text functions Текстовые функции
+##
+ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые).
+BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ).
+CHAR = СИМВОЛ ## Возвращает знак с заданным кодом.
+CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста.
+CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке.
+CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один.
+DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат.
+EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений.
+FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра).
+FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра).
+FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков.
+JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые).
+LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения.
+LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения.
+LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке.
+LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке.
+LOWER = СТРОЧН ## Преобразует все буквы текста в строчные.
+MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции.
+MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции.
+PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки.
+PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную.
+REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте.
+REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте.
+REPT = ПОВТОР ## Повторяет текст заданное число раз.
+RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки.
+RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки.
+SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра).
+SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра).
+SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым.
+T = Т ## Преобразует аргументы в текст.
+TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст.
+TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы.
+UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные.
+VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число.
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config
new file mode 100644
index 0000000..f4dd188
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = kr
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #Skärning!
+DIV0 = #Division/0!
+VALUE = #Värdefel!
+REF = #Referens!
+NAME = #Namn?
+NUM = #Ogiltigt!
+NA = #Saknas!
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions
new file mode 100644
index 0000000..9af37d8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions
@@ -0,0 +1,408 @@
+##
+## Add-in and Automation functions Tilläggs- och automatiseringsfunktioner
+##
+GETPIVOTDATA = HÄMTA.PIVOTDATA ## Returnerar data som lagrats i en pivottabellrapport
+
+
+##
+## Cube functions Kubfunktioner
+##
+CUBEKPIMEMBER = KUBKPIMEDLEM ## Returnerar namn, egenskap och mått för en KPI och visar namnet och egenskapen i cellen. En KPI, eller prestandaindikator, är ett kvantifierbart mått, t.ex. månatlig bruttovinst eller personalomsättning per kvartal, som används för att analysera ett företags resultat.
+CUBEMEMBER = KUBMEDLEM ## Returnerar en medlem eller ett par i en kubhierarki. Används för att verifiera att medlemmen eller paret finns i kuben.
+CUBEMEMBERPROPERTY = KUBMEDLEMSEGENSKAP ## Returnerar värdet för en medlemsegenskap i kuben. Används för att verifiera att ett medlemsnamn finns i kuben, samt för att returnera den angivna egenskapen för medlemmen.
+CUBERANKEDMEMBER = KUBRANGORDNADMEDLEM ## Returnerar den n:te, eller rangordnade, medlemmen i en uppsättning. Används för att returnera ett eller flera element i en uppsättning, till exempelvis den bästa försäljaren eller de tio bästa eleverna.
+CUBESET = KUBINSTÄLLNING ## Definierar en beräknad uppsättning medlemmar eller par genom att skicka ett bestämt uttryck till kuben på servern, som skapar uppsättningen och sedan returnerar den till Microsoft Office Excel.
+CUBESETCOUNT = KUBINSTÄLLNINGANTAL ## Returnerar antalet objekt i en uppsättning.
+CUBEVALUE = KUBVÄRDE ## Returnerar ett mängdvärde från en kub.
+
+
+##
+## Database functions Databasfunktioner
+##
+DAVERAGE = DMEDEL ## Returnerar medelvärdet av databasposterna
+DCOUNT = DANTAL ## Räknar antalet celler som innehåller tal i en databas
+DCOUNTA = DANTALV ## Räknar ifyllda celler i en databas
+DGET = DHÄMTA ## Hämtar en enstaka post från en databas som uppfyller de angivna villkoren
+DMAX = DMAX ## Returnerar det största värdet från databasposterna
+DMIN = DMIN ## Returnerar det minsta värdet från databasposterna
+DPRODUCT = DPRODUKT ## Multiplicerar värdena i ett visst fält i poster som uppfyller villkoret
+DSTDEV = DSTDAV ## Uppskattar standardavvikelsen baserat på ett urval av databasposterna
+DSTDEVP = DSTDAVP ## Beräknar standardavvikelsen utifrån hela populationen av valda databasposter
+DSUM = DSUMMA ## Summerar talen i kolumnfält i databasposter som uppfyller villkoret
+DVAR = DVARIANS ## Uppskattar variansen baserat på ett urval av databasposterna
+DVARP = DVARIANSP ## Beräknar variansen utifrån hela populationen av valda databasposter
+
+
+##
+## Date and time functions Tid- och datumfunktioner
+##
+DATE = DATUM ## Returnerar ett serienummer för ett visst datum
+DATEVALUE = DATUMVÄRDE ## Konverterar ett datum i textformat till ett serienummer
+DAY = DAG ## Konverterar ett serienummer till dag i månaden
+DAYS360 = DAGAR360 ## Beräknar antalet dagar mellan två datum baserat på ett 360-dagarsår
+EDATE = EDATUM ## Returnerar serienumret för ett datum som infaller ett visst antal månader före eller efter startdatumet
+EOMONTH = SLUTMÅNAD ## Returnerar serienumret för sista dagen i månaden ett visst antal månader tidigare eller senare
+HOUR = TIMME ## Konverterar ett serienummer till en timme
+MINUTE = MINUT ## Konverterar ett serienummer till en minut
+MONTH = MÅNAD ## Konverterar ett serienummer till en månad
+NETWORKDAYS = NETTOARBETSDAGAR ## Returnerar antalet hela arbetsdagar mellan två datum
+NOW = NU ## Returnerar serienumret för dagens datum och aktuell tid
+SECOND = SEKUND ## Konverterar ett serienummer till en sekund
+TIME = KLOCKSLAG ## Returnerar serienumret för en viss tid
+TIMEVALUE = TIDVÄRDE ## Konverterar en tid i textformat till ett serienummer
+TODAY = IDAG ## Returnerar serienumret för dagens datum
+WEEKDAY = VECKODAG ## Konverterar ett serienummer till en dag i veckan
+WEEKNUM = VECKONR ## Konverterar ett serienummer till ett veckonummer
+WORKDAY = ARBETSDAGAR ## Returnerar serienumret för ett datum ett visst antal arbetsdagar tidigare eller senare
+YEAR = ÅR ## Konverterar ett serienummer till ett år
+YEARFRAC = ÅRDEL ## Returnerar en del av ett år som representerar antalet hela dagar mellan start- och slutdatum
+
+
+##
+## Engineering functions Tekniska funktioner
+##
+BESSELI = BESSELI ## Returnerar den modifierade Bessel-funktionen In(x)
+BESSELJ = BESSELJ ## Returnerar Bessel-funktionen Jn(x)
+BESSELK = BESSELK ## Returnerar den modifierade Bessel-funktionen Kn(x)
+BESSELY = BESSELY ## Returnerar Bessel-funktionen Yn(x)
+BIN2DEC = BIN.TILL.DEC ## Omvandlar ett binärt tal till decimalt
+BIN2HEX = BIN.TILL.HEX ## Omvandlar ett binärt tal till hexadecimalt
+BIN2OCT = BIN.TILL.OKT ## Omvandlar ett binärt tal till oktalt
+COMPLEX = KOMPLEX ## Omvandlar reella och imaginära koefficienter till ett komplext tal
+CONVERT = KONVERTERA ## Omvandlar ett tal från ett måttsystem till ett annat
+DEC2BIN = DEC.TILL.BIN ## Omvandlar ett decimalt tal till binärt
+DEC2HEX = DEC.TILL.HEX ## Omvandlar ett decimalt tal till hexadecimalt
+DEC2OCT = DEC.TILL.OKT ## Omvandlar ett decimalt tal till oktalt
+DELTA = DELTA ## Testar om två värden är lika
+ERF = FELF ## Returnerar felfunktionen
+ERFC = FELFK ## Returnerar den komplementära felfunktionen
+GESTEP = SLSTEG ## Testar om ett tal är större än ett tröskelvärde
+HEX2BIN = HEX.TILL.BIN ## Omvandlar ett hexadecimalt tal till binärt
+HEX2DEC = HEX.TILL.DEC ## Omvandlar ett hexadecimalt tal till decimalt
+HEX2OCT = HEX.TILL.OKT ## Omvandlar ett hexadecimalt tal till oktalt
+IMABS = IMABS ## Returnerar absolutvärdet (modulus) för ett komplext tal
+IMAGINARY = IMAGINÄR ## Returnerar den imaginära koefficienten för ett komplext tal
+IMARGUMENT = IMARGUMENT ## Returnerar det komplexa talets argument, en vinkel uttryckt i radianer
+IMCONJUGATE = IMKONJUGAT ## Returnerar det komplexa talets konjugat
+IMCOS = IMCOS ## Returnerar cosinus för ett komplext tal
+IMDIV = IMDIV ## Returnerar kvoten för två komplexa tal
+IMEXP = IMEUPPHÖJT ## Returnerar exponenten för ett komplext tal
+IMLN = IMLN ## Returnerar den naturliga logaritmen för ett komplext tal
+IMLOG10 = IMLOG10 ## Returnerar 10-logaritmen för ett komplext tal
+IMLOG2 = IMLOG2 ## Returnerar 2-logaritmen för ett komplext tal
+IMPOWER = IMUPPHÖJT ## Returnerar ett komplext tal upphöjt till en exponent
+IMPRODUCT = IMPRODUKT ## Returnerar produkten av komplexa tal
+IMREAL = IMREAL ## Returnerar den reella koefficienten för ett komplext tal
+IMSIN = IMSIN ## Returnerar sinus för ett komplext tal
+IMSQRT = IMROT ## Returnerar kvadratroten av ett komplext tal
+IMSUB = IMDIFF ## Returnerar differensen mellan två komplexa tal
+IMSUM = IMSUM ## Returnerar summan av komplexa tal
+OCT2BIN = OKT.TILL.BIN ## Omvandlar ett oktalt tal till binärt
+OCT2DEC = OKT.TILL.DEC ## Omvandlar ett oktalt tal till decimalt
+OCT2HEX = OKT.TILL.HEX ## Omvandlar ett oktalt tal till hexadecimalt
+
+
+##
+## Financial functions Finansiella funktioner
+##
+ACCRINT = UPPLRÄNTA ## Returnerar den upplupna räntan för värdepapper med periodisk ränta
+ACCRINTM = UPPLOBLRÄNTA ## Returnerar den upplupna räntan för ett värdepapper som ger avkastning på förfallodagen
+AMORDEGRC = AMORDEGRC ## Returnerar avskrivningen för varje redovisningsperiod med hjälp av en avskrivningskoefficient
+AMORLINC = AMORLINC ## Returnerar avskrivningen för varje redovisningsperiod
+COUPDAYBS = KUPDAGBB ## Returnerar antal dagar från början av kupongperioden till likviddagen
+COUPDAYS = KUPDAGARS ## Returnerar antalet dagar i kupongperioden som innehåller betalningsdatumet
+COUPDAYSNC = KUPDAGNK ## Returnerar antalet dagar från betalningsdatumet till nästa kupongdatum
+COUPNCD = KUPNKD ## Returnerar nästa kupongdatum efter likviddagen
+COUPNUM = KUPANT ## Returnerar kuponger som förfaller till betalning mellan likviddagen och förfallodagen
+COUPPCD = KUPFKD ## Returnerar föregående kupongdatum före likviddagen
+CUMIPMT = KUMRÄNTA ## Returnerar den ackumulerade räntan som betalats mellan två perioder
+CUMPRINC = KUMPRIS ## Returnerar det ackumulerade kapitalbeloppet som betalats på ett lån mellan två perioder
+DB = DB ## Returnerar avskrivningen för en tillgång under en angiven tid enligt metoden för fast degressiv avskrivning
+DDB = DEGAVSKR ## Returnerar en tillgångs värdeminskning under en viss period med hjälp av dubbel degressiv avskrivning eller någon annan metod som du anger
+DISC = DISK ## Returnerar diskonteringsräntan för ett värdepapper
+DOLLARDE = DECTAL ## Omvandlar ett pris uttryckt som ett bråk till ett decimaltal
+DOLLARFR = BRÅK ## Omvandlar ett pris i kronor uttryckt som ett decimaltal till ett bråk
+DURATION = LÖPTID ## Returnerar den årliga löptiden för en säkerhet med periodiska räntebetalningar
+EFFECT = EFFRÄNTA ## Returnerar den årliga effektiva räntesatsen
+FV = SLUTVÄRDE ## Returnerar det framtida värdet på en investering
+FVSCHEDULE = FÖRRÄNTNING ## Returnerar det framtida värdet av ett begynnelsekapital beräknat på olika räntenivåer
+INTRATE = ÅRSRÄNTA ## Returnerar räntesatsen för ett betalt värdepapper
+IPMT = RBETALNING ## Returnerar räntedelen av en betalning för en given period
+IRR = IR ## Returnerar internräntan för en serie betalningar
+ISPMT = RALÅN ## Beräknar räntan som har betalats under en specifik betalningsperiod
+MDURATION = MLÖPTID ## Returnerar den modifierade Macauley-löptiden för ett värdepapper med det antagna nominella värdet 100 kr
+MIRR = MODIR ## Returnerar internräntan där positiva och negativa betalningar finansieras med olika räntor
+NOMINAL = NOMRÄNTA ## Returnerar den årliga nominella räntesatsen
+NPER = PERIODER ## Returnerar antalet perioder för en investering
+NPV = NETNUVÄRDE ## Returnerar nuvärdet av en serie periodiska betalningar vid en given diskonteringsränta
+ODDFPRICE = UDDAFPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda första period
+ODDFYIELD = UDDAFAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda första period
+ODDLPRICE = UDDASPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda sista period
+ODDLYIELD = UDDASAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda sista period
+PMT = BETALNING ## Returnerar den periodiska betalningen för en annuitet
+PPMT = AMORT ## Returnerar amorteringsdelen av en annuitetsbetalning för en given period
+PRICE = PRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger periodisk ränta
+PRICEDISC = PRISDISK ## Returnerar priset per 100 kr nominellt värde för ett diskonterat värdepapper
+PRICEMAT = PRISFÖRF ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger ränta på förfallodagen
+PV = PV ## Returnerar nuvärdet av en serie lika stora periodiska betalningar
+RATE = RÄNTA ## Returnerar räntesatsen per period i en annuitet
+RECEIVED = BELOPP ## Returnerar beloppet som utdelas på förfallodagen för ett betalat värdepapper
+SLN = LINAVSKR ## Returnerar den linjära avskrivningen för en tillgång under en period
+SYD = ÅRSAVSKR ## Returnerar den årliga avskrivningssumman för en tillgång under en angiven period
+TBILLEQ = SSVXEKV ## Returnerar avkastningen motsvarande en obligation för en statsskuldväxel
+TBILLPRICE = SSVXPRIS ## Returnerar priset per 100 kr nominellt värde för en statsskuldväxel
+TBILLYIELD = SSVXRÄNTA ## Returnerar avkastningen för en statsskuldväxel
+VDB = VDEGRAVSKR ## Returnerar avskrivningen för en tillgång under en angiven period (med degressiv avskrivning)
+XIRR = XIRR ## Returnerar internräntan för en serie betalningar som inte nödvändigtvis är periodiska
+XNPV = XNUVÄRDE ## Returnerar det nuvarande nettovärdet för en serie betalningar som inte nödvändigtvis är periodiska
+YIELD = NOMAVK ## Returnerar avkastningen för ett värdepapper som ger periodisk ränta
+YIELDDISC = NOMAVKDISK ## Returnerar den årliga avkastningen för diskonterade värdepapper, exempelvis en statsskuldväxel
+YIELDMAT = NOMAVKFÖRF ## Returnerar den årliga avkastningen för ett värdepapper som ger ränta på förfallodagen
+
+
+##
+## Information functions Informationsfunktioner
+##
+CELL = CELL ## Returnerar information om formatering, plats och innehåll i en cell
+ERROR.TYPE = FEL.TYP ## Returnerar ett tal som motsvarar ett felvärde
+INFO = INFO ## Returnerar information om operativsystemet
+ISBLANK = ÄRREF ## Returnerar SANT om värdet är tomt
+ISERR = Ä ## Returnerar SANT om värdet är ett felvärde annat än #SAKNAS!
+ISERROR = ÄRFEL ## Returnerar SANT om värdet är ett felvärde
+ISEVEN = ÄRJÄMN ## Returnerar SANT om talet är jämnt
+ISLOGICAL = ÄREJTEXT ## Returnerar SANT om värdet är ett logiskt värde
+ISNA = ÄRLOGISK ## Returnerar SANT om värdet är felvärdet #SAKNAS!
+ISNONTEXT = ÄRSAKNAD ## Returnerar SANT om värdet inte är text
+ISNUMBER = ÄRTAL ## Returnerar SANT om värdet är ett tal
+ISODD = ÄRUDDA ## Returnerar SANT om talet är udda
+ISREF = ÄRTOM ## Returnerar SANT om värdet är en referens
+ISTEXT = ÄRTEXT ## Returnerar SANT om värdet är text
+N = N ## Returnerar ett värde omvandlat till ett tal
+NA = SAKNAS ## Returnerar felvärdet #SAKNAS!
+TYPE = VÄRDETYP ## Returnerar ett tal som anger värdets datatyp
+
+
+##
+## Logical functions Logiska funktioner
+##
+AND = OCH ## Returnerar SANT om alla argument är sanna
+FALSE = FALSKT ## Returnerar det logiska värdet FALSKT
+IF = OM ## Anger vilket logiskt test som ska utföras
+IFERROR = OMFEL ## Returnerar ett värde som du anger om en formel utvärderar till ett fel; annars returneras resultatet av formeln
+NOT = ICKE ## Inverterar logiken för argumenten
+OR = ELLER ## Returnerar SANT om något argument är SANT
+TRUE = SANT ## Returnerar det logiska värdet SANT
+
+
+##
+## Lookup and reference functions Sök- och referensfunktioner
+##
+ADDRESS = ADRESS ## Returnerar en referens som text till en enstaka cell i ett kalkylblad
+AREAS = OMRÅDEN ## Returnerar antalet områden i en referens
+CHOOSE = VÄLJ ## Väljer ett värde i en lista över värden
+COLUMN = KOLUMN ## Returnerar kolumnnumret för en referens
+COLUMNS = KOLUMNER ## Returnerar antalet kolumner i en referens
+HLOOKUP = LETAKOLUMN ## Söker i den översta raden i en matris och returnerar värdet för angiven cell
+HYPERLINK = HYPERLÄNK ## Skapar en genväg eller ett hopp till ett dokument i nätverket, i ett intranät eller på Internet
+INDEX = INDEX ## Använder ett index för ett välja ett värde i en referens eller matris
+INDIRECT = INDIREKT ## Returnerar en referens som anges av ett textvärde
+LOOKUP = LETAUPP ## Letar upp värden i en vektor eller matris
+MATCH = PASSA ## Letar upp värden i en referens eller matris
+OFFSET = FÖRSKJUTNING ## Returnerar en referens förskjuten i förhållande till en given referens
+ROW = RAD ## Returnerar radnumret för en referens
+ROWS = RADER ## Returnerar antalet rader i en referens
+RTD = RTD ## Hämtar realtidsdata från ett program som stöder COM-automation (Automation: Ett sätt att arbeta med ett programs objekt från ett annat program eller utvecklingsverktyg. Detta kallades tidigare för OLE Automation, och är en branschstandard och ingår i Component Object Model (COM).)
+TRANSPOSE = TRANSPONERA ## Transponerar en matris
+VLOOKUP = LETARAD ## Letar i den första kolumnen i en matris och flyttar över raden för att returnera värdet för en cell
+
+
+##
+## Math and trigonometry functions Matematiska och trigonometriska funktioner
+##
+ABS = ABS ## Returnerar absolutvärdet av ett tal
+ACOS = ARCCOS ## Returnerar arcus cosinus för ett tal
+ACOSH = ARCCOSH ## Returnerar inverterad hyperbolisk cosinus för ett tal
+ASIN = ARCSIN ## Returnerar arcus cosinus för ett tal
+ASINH = ARCSINH ## Returnerar hyperbolisk arcus sinus för ett tal
+ATAN = ARCTAN ## Returnerar arcus tangens för ett tal
+ATAN2 = ARCTAN2 ## Returnerar arcus tangens för en x- och en y- koordinat
+ATANH = ARCTANH ## Returnerar hyperbolisk arcus tangens för ett tal
+CEILING = RUNDA.UPP ## Avrundar ett tal till närmaste heltal eller närmaste signifikanta multipel
+COMBIN = KOMBIN ## Returnerar antalet kombinationer för ett givet antal objekt
+COS = COS ## Returnerar cosinus för ett tal
+COSH = COSH ## Returnerar hyperboliskt cosinus för ett tal
+DEGREES = GRADER ## Omvandlar radianer till grader
+EVEN = JÄMN ## Avrundar ett tal uppåt till närmaste heltal
+EXP = EXP ## Returnerar e upphöjt till ett givet tal
+FACT = FAKULTET ## Returnerar fakulteten för ett tal
+FACTDOUBLE = DUBBELFAKULTET ## Returnerar dubbelfakulteten för ett tal
+FLOOR = RUNDA.NED ## Avrundar ett tal nedåt mot noll
+GCD = SGD ## Returnerar den största gemensamma nämnaren
+INT = HELTAL ## Avrundar ett tal nedåt till närmaste heltal
+LCM = MGM ## Returnerar den minsta gemensamma multipeln
+LN = LN ## Returnerar den naturliga logaritmen för ett tal
+LOG = LOG ## Returnerar logaritmen för ett tal för en given bas
+LOG10 = LOG10 ## Returnerar 10-logaritmen för ett tal
+MDETERM = MDETERM ## Returnerar matrisen som är avgörandet av en matris
+MINVERSE = MINVERT ## Returnerar matrisinversen av en matris
+MMULT = MMULT ## Returnerar matrisprodukten av två matriser
+MOD = REST ## Returnerar resten vid en division
+MROUND = MAVRUNDA ## Returnerar ett tal avrundat till en given multipel
+MULTINOMIAL = MULTINOMIAL ## Returnerar multinomialen för en uppsättning tal
+ODD = UDDA ## Avrundar ett tal uppåt till närmaste udda heltal
+PI = PI ## Returnerar värdet pi
+POWER = UPPHÖJT.TILL ## Returnerar resultatet av ett tal upphöjt till en exponent
+PRODUCT = PRODUKT ## Multiplicerar argumenten
+QUOTIENT = KVOT ## Returnerar heltalsdelen av en division
+RADIANS = RADIANER ## Omvandlar grader till radianer
+RAND = SLUMP ## Returnerar ett slumptal mellan 0 och 1
+RANDBETWEEN = SLUMP.MELLAN ## Returnerar ett slumptal mellan de tal som du anger
+ROMAN = ROMERSK ## Omvandlar vanliga (arabiska) siffror till romerska som text
+ROUND = AVRUNDA ## Avrundar ett tal till ett angivet antal siffror
+ROUNDDOWN = AVRUNDA.NEDÅT ## Avrundar ett tal nedåt mot noll
+ROUNDUP = AVRUNDA.UPPÅT ## Avrundar ett tal uppåt, från noll
+SERIESSUM = SERIESUMMA ## Returnerar summan av en potensserie baserat på formeln
+SIGN = TECKEN ## Returnerar tecknet för ett tal
+SIN = SIN ## Returnerar sinus för en given vinkel
+SINH = SINH ## Returnerar hyperbolisk sinus för ett tal
+SQRT = ROT ## Returnerar den positiva kvadratroten
+SQRTPI = ROTPI ## Returnerar kvadratroten för (tal * pi)
+SUBTOTAL = DELSUMMA ## Returnerar en delsumma i en lista eller databas
+SUM = SUMMA ## Summerar argumenten
+SUMIF = SUMMA.OM ## Summerar celler enligt ett angivet villkor
+SUMIFS = SUMMA.OMF ## Lägger till cellerna i ett område som uppfyller flera kriterier
+SUMPRODUCT = PRODUKTSUMMA ## Returnerar summan av produkterna i motsvarande matriskomponenter
+SUMSQ = KVADRATSUMMA ## Returnerar summan av argumentens kvadrater
+SUMX2MY2 = SUMMAX2MY2 ## Returnerar summan av differensen mellan kvadraterna för motsvarande värden i två matriser
+SUMX2PY2 = SUMMAX2PY2 ## Returnerar summan av summan av kvadraterna av motsvarande värden i två matriser
+SUMXMY2 = SUMMAXMY2 ## Returnerar summan av kvadraten av skillnaden mellan motsvarande värden i två matriser
+TAN = TAN ## Returnerar tangens för ett tal
+TANH = TANH ## Returnerar hyperbolisk tangens för ett tal
+TRUNC = AVKORTA ## Avkortar ett tal till ett heltal
+
+
+##
+## Statistical functions Statistiska funktioner
+##
+AVEDEV = MEDELAVV ## Returnerar medelvärdet för datapunkters absoluta avvikelse från deras medelvärde
+AVERAGE = MEDEL ## Returnerar medelvärdet av argumenten
+AVERAGEA = AVERAGEA ## Returnerar medelvärdet av argumenten, inklusive tal, text och logiska värden
+AVERAGEIF = MEDELOM ## Returnerar medelvärdet (aritmetiskt medelvärde) för alla celler i ett område som uppfyller ett givet kriterium
+AVERAGEIFS = MEDELOMF ## Returnerar medelvärdet (det aritmetiska medelvärdet) för alla celler som uppfyller flera villkor.
+BETADIST = BETAFÖRD ## Returnerar den kumulativa betafördelningsfunktionen
+BETAINV = BETAINV ## Returnerar inversen till den kumulativa fördelningsfunktionen för en viss betafördelning
+BINOMDIST = BINOMFÖRD ## Returnerar den individuella binomialfördelningen
+CHIDIST = CHI2FÖRD ## Returnerar den ensidiga sannolikheten av c2-fördelningen
+CHIINV = CHI2INV ## Returnerar inversen av chi2-fördelningen
+CHITEST = CHI2TEST ## Returnerar oberoendetesten
+CONFIDENCE = KONFIDENS ## Returnerar konfidensintervallet för en populations medelvärde
+CORREL = KORREL ## Returnerar korrelationskoefficienten mellan två datamängder
+COUNT = ANTAL ## Räknar hur många tal som finns bland argumenten
+COUNTA = ANTALV ## Räknar hur många värden som finns bland argumenten
+COUNTBLANK = ANTAL.TOMMA ## Räknar antalet tomma celler i ett område
+COUNTIF = ANTAL.OM ## Räknar antalet celler i ett område som uppfyller angivna villkor.
+COUNTIFS = ANTAL.OMF ## Räknar antalet celler i ett område som uppfyller flera villkor.
+COVAR = KOVAR ## Returnerar kovariansen, d.v.s. medelvärdet av produkterna för parade avvikelser
+CRITBINOM = KRITBINOM ## Returnerar det minsta värdet för vilket den kumulativa binomialfördelningen är mindre än eller lika med ett villkorsvärde
+DEVSQ = KVADAVV ## Returnerar summan av kvadrater på avvikelser
+EXPONDIST = EXPONFÖRD ## Returnerar exponentialfördelningen
+FDIST = FFÖRD ## Returnerar F-sannolikhetsfördelningen
+FINV = FINV ## Returnerar inversen till F-sannolikhetsfördelningen
+FISHER = FISHER ## Returnerar Fisher-transformationen
+FISHERINV = FISHERINV ## Returnerar inversen till Fisher-transformationen
+FORECAST = PREDIKTION ## Returnerar ett värde längs en linjär trendlinje
+FREQUENCY = FREKVENS ## Returnerar en frekvensfördelning som en lodrät matris
+FTEST = FTEST ## Returnerar resultatet av en F-test
+GAMMADIST = GAMMAFÖRD ## Returnerar gammafördelningen
+GAMMAINV = GAMMAINV ## Returnerar inversen till den kumulativa gammafördelningen
+GAMMALN = GAMMALN ## Returnerar den naturliga logaritmen för gammafunktionen, G(x)
+GEOMEAN = GEOMEDEL ## Returnerar det geometriska medelvärdet
+GROWTH = EXPTREND ## Returnerar värden längs en exponentiell trend
+HARMEAN = HARMMEDEL ## Returnerar det harmoniska medelvärdet
+HYPGEOMDIST = HYPGEOMFÖRD ## Returnerar den hypergeometriska fördelningen
+INTERCEPT = SKÄRNINGSPUNKT ## Returnerar skärningspunkten för en linjär regressionslinje
+KURT = TOPPIGHET ## Returnerar toppigheten av en mängd data
+LARGE = STÖRSTA ## Returnerar det n:te största värdet i en mängd data
+LINEST = REGR ## Returnerar parametrar till en linjär trendlinje
+LOGEST = EXPREGR ## Returnerar parametrarna i en exponentiell trend
+LOGINV = LOGINV ## Returnerar inversen till den lognormala fördelningen
+LOGNORMDIST = LOGNORMFÖRD ## Returnerar den kumulativa lognormala fördelningen
+MAX = MAX ## Returnerar det största värdet i en lista av argument
+MAXA = MAXA ## Returnerar det största värdet i en lista av argument, inklusive tal, text och logiska värden
+MEDIAN = MEDIAN ## Returnerar medianen för angivna tal
+MIN = MIN ## Returnerar det minsta värdet i en lista med argument
+MINA = MINA ## Returnerar det minsta värdet i en lista över argument, inklusive tal, text och logiska värden
+MODE = TYPVÄRDE ## Returnerar det vanligaste värdet i en datamängd
+NEGBINOMDIST = NEGBINOMFÖRD ## Returnerar den negativa binomialfördelningen
+NORMDIST = NORMFÖRD ## Returnerar den kumulativa normalfördelningen
+NORMINV = NORMINV ## Returnerar inversen till den kumulativa normalfördelningen
+NORMSDIST = NORMSFÖRD ## Returnerar den kumulativa standardnormalfördelningen
+NORMSINV = NORMSINV ## Returnerar inversen till den kumulativa standardnormalfördelningen
+PEARSON = PEARSON ## Returnerar korrelationskoefficienten till Pearsons momentprodukt
+PERCENTILE = PERCENTIL ## Returnerar den n:te percentilen av värden i ett område
+PERCENTRANK = PROCENTRANG ## Returnerar procentrangen för ett värde i en datamängd
+PERMUT = PERMUT ## Returnerar antal permutationer för ett givet antal objekt
+POISSON = POISSON ## Returnerar Poisson-fördelningen
+PROB = SANNOLIKHET ## Returnerar sannolikheten att värden i ett område ligger mellan två gränser
+QUARTILE = KVARTIL ## Returnerar kvartilen av en mängd data
+RANK = RANG ## Returnerar rangordningen för ett tal i en lista med tal
+RSQ = RKV ## Returnerar kvadraten av Pearsons produktmomentkorrelationskoefficient
+SKEW = SNEDHET ## Returnerar snedheten för en fördelning
+SLOPE = LUTNING ## Returnerar lutningen på en linjär regressionslinje
+SMALL = MINSTA ## Returnerar det n:te minsta värdet i en mängd data
+STANDARDIZE = STANDARDISERA ## Returnerar ett normaliserat värde
+STDEV = STDAV ## Uppskattar standardavvikelsen baserat på ett urval
+STDEVA = STDEVA ## Uppskattar standardavvikelsen baserat på ett urval, inklusive tal, text och logiska värden
+STDEVP = STDAVP ## Beräknar standardavvikelsen baserat på hela populationen
+STDEVPA = STDEVPA ## Beräknar standardavvikelsen baserat på hela populationen, inklusive tal, text och logiska värden
+STEYX = STDFELYX ## Returnerar standardfelet för ett förutspått y-värde för varje x-värde i regressionen
+TDIST = TFÖRD ## Returnerar Students t-fördelning
+TINV = TINV ## Returnerar inversen till Students t-fördelning
+TREND = TREND ## Returnerar värden längs en linjär trend
+TRIMMEAN = TRIMMEDEL ## Returnerar medelvärdet av mittpunkterna i en datamängd
+TTEST = TTEST ## Returnerar sannolikheten beräknad ur Students t-test
+VAR = VARIANS ## Uppskattar variansen baserat på ett urval
+VARA = VARA ## Uppskattar variansen baserat på ett urval, inklusive tal, text och logiska värden
+VARP = VARIANSP ## Beräknar variansen baserat på hela populationen
+VARPA = VARPA ## Beräknar variansen baserat på hela populationen, inklusive tal, text och logiska värden
+WEIBULL = WEIBULL ## Returnerar Weibull-fördelningen
+ZTEST = ZTEST ## Returnerar det ensidiga sannolikhetsvärdet av ett z-test
+
+
+##
+## Text functions Textfunktioner
+##
+ASC = ASC ## Ändrar helbredds (dubbel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med halvt breddsteg (enkel byte)
+BAHTTEXT = BAHTTEXT ## Omvandlar ett tal till text med valutaformatet ß (baht)
+CHAR = TECKENKOD ## Returnerar tecknet som anges av kod
+CLEAN = STÄDA ## Tar bort alla icke utskrivbara tecken i en text
+CODE = KOD ## Returnerar en numerisk kod för det första tecknet i en textsträng
+CONCATENATE = SAMMANFOGA ## Sammanfogar flera textdelar till en textsträng
+DOLLAR = VALUTA ## Omvandlar ett tal till text med valutaformat
+EXACT = EXAKT ## Kontrollerar om två textvärden är identiska
+FIND = HITTA ## Hittar en text i en annan (skiljer på gemener och versaler)
+FINDB = HITTAB ## Hittar en text i en annan (skiljer på gemener och versaler)
+FIXED = FASTTAL ## Formaterar ett tal som text med ett fast antal decimaler
+JIS = JIS ## Ändrar halvbredds (enkel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med helt breddsteg (dubbel byte)
+LEFT = VÄNSTER ## Returnerar tecken längst till vänster i en sträng
+LEFTB = VÄNSTERB ## Returnerar tecken längst till vänster i en sträng
+LEN = LÄNGD ## Returnerar antalet tecken i en textsträng
+LENB = LÄNGDB ## Returnerar antalet tecken i en textsträng
+LOWER = GEMENER ## Omvandlar text till gemener
+MID = EXTEXT ## Returnerar angivet antal tecken från en text med början vid den position som du anger
+MIDB = EXTEXTB ## Returnerar angivet antal tecken från en text med början vid den position som du anger
+PHONETIC = PHONETIC ## Returnerar de fonetiska (furigana) tecknen i en textsträng
+PROPER = INITIAL ## Ändrar första bokstaven i varje ord i ett textvärde till versal
+REPLACE = ERSÄTT ## Ersätter tecken i text
+REPLACEB = ERSÄTTB ## Ersätter tecken i text
+REPT = REP ## Upprepar en text ett bestämt antal gånger
+RIGHT = HÖGER ## Returnerar tecken längst till höger i en sträng
+RIGHTB = HÖGERB ## Returnerar tecken längst till höger i en sträng
+SEARCH = SÖK ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler)
+SEARCHB = SÖKB ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler)
+SUBSTITUTE = BYT.UT ## Ersätter gammal text med ny text i en textsträng
+T = T ## Omvandlar argumenten till text
+TEXT = TEXT ## Formaterar ett tal och omvandlar det till text
+TRIM = RENSA ## Tar bort blanksteg från text
+UPPER = VERSALER ## Omvandlar text till versaler
+VALUE = TEXTNUM ## Omvandlar ett textargument till ett tal
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config
new file mode 100644
index 0000000..608a5f8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config
@@ -0,0 +1,24 @@
+##
+## PhpSpreadsheet
+##
+
+ArgumentSeparator = ;
+
+
+##
+## (For future use)
+##
+currencySymbol = YTL
+
+
+##
+## Excel Error Codes (For future use)
+
+##
+NULL = #BOŞ!
+DIV0 = #SAYI/0!
+VALUE = #DEĞER!
+REF = #BAŞV!
+NAME = #AD?
+NUM = #SAYI!
+NA = #YOK
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions
new file mode 100644
index 0000000..4c9584c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions
@@ -0,0 +1,416 @@
+##
+## PhpSpreadsheet
+##
+## Data in this file derived from https://www.excel-function-translation.com/
+##
+##
+
+
+##
+## Add-in and Automation functions Eklenti ve Otomasyon fonksiyonları
+##
+GETPIVOTDATA = ÖZETVERİAL ## Bir Özet Tablo raporunda saklanan verileri verir.
+
+
+##
+## Cube functions Küp işlevleri
+##
+CUBEKPIMEMBER = KÜPKPIÜYE ## Kilit performans göstergesi (KPI-Key Performance Indicator) adını, özelliğini ve ölçüsünü verir ve hücredeki ad ve özelliği gösterir. KPI, bir kurumun performansını izlemek için kullanılan aylık brüt kâr ya da üç aylık çalışan giriş çıkışları gibi ölçülebilen bir birimdir.
+CUBEMEMBER = KÜPÜYE ## Bir küp hiyerarşisinde bir üyeyi veya kaydı verir. Üye veya kaydın küpte varolduğunu doğrulamak için kullanılır.
+CUBEMEMBERPROPERTY = KÜPÜYEÖZELLİĞİ ## Bir küpte bir üyenin özelliğinin değerini verir. Küp içinde üye adının varlığını doğrulamak ve bu üyenin belli özelliklerini getirmek için kullanılır.
+CUBERANKEDMEMBER = KÜPÜYESIRASI ## Bir küme içindeki üyenin derecesini veya kaçıncı olduğunu verir. En iyi satış elemanı, veya en iyi on öğrenci gibi bir kümedeki bir veya daha fazla öğeyi getirmek için kullanılır.
+CUBESET = KÜPKÜME ## Kümeyi oluşturan ve ardından bu kümeyi Microsoft Office Excel'e getiren sunucudaki küpe küme ifadelerini göndererek hesaplanan üye veya kayıt kümesini tanımlar.
+CUBESETCOUNT = KÜPKÜMESAY ## Bir kümedeki öğelerin sayısını getirir.
+CUBEVALUE = KÜPDEĞER ## Bir küpten toplam değeri getirir.
+
+
+##
+## Database functions Veritabanı işlevleri
+##
+DAVERAGE = VSEÇORT ## Seçili veritabanı girdilerinin ortalamasını verir.
+DCOUNT = VSEÇSAY ## Veritabanında sayı içeren hücre sayısını hesaplar.
+DCOUNTA = VSEÇSAYDOLU ## Veritabanındaki boş olmayan hücreleri sayar.
+DGET = VAL ## Veritabanından, belirtilen ölçütlerle eşleşen tek bir rapor çıkarır.
+DMAX = VSEÇMAK ## Seçili veritabanı girişlerinin en yüksek değerini verir.
+DMIN = VSEÇMİN ## Seçili veritabanı girişlerinin en düşük değerini verir.
+DPRODUCT = VSEÇÇARP ## Kayıtların belli bir alanında bulunan, bir veritabanındaki ölçütlerle eşleşen değerleri çarpar.
+DSTDEV = VSEÇSTDSAPMA ## Seçili veritabanı girişlerinden oluşan bir örneğe dayanarak, standart sapmayı tahmin eder.
+DSTDEVP = VSEÇSTDSAPMAS ## Standart sapmayı, seçili veritabanı girişlerinin tüm popülasyonunu esas alarak hesaplar.
+DSUM = VSEÇTOPLA ## Kayıtların alan sütununda bulunan, ölçütle eşleşen sayıları toplar.
+DVAR = VSEÇVAR ## Seçili veritabanı girişlerinden oluşan bir örneği esas alarak farkı tahmin eder.
+DVARP = VSEÇVARS ## Seçili veritabanı girişlerinin tüm popülasyonunu esas alarak farkı hesaplar.
+
+
+##
+## Date and time functions Tarih ve saat işlevleri
+##
+DATE = TARİH ## Belirli bir tarihin seri numarasını verir.
+DATEVALUE = TARİHSAYISI ## Metin biçimindeki bir tarihi seri numarasına dönüştürür.
+DAY = GÜN ## Seri numarasını, ayın bir gününe dönüştürür.
+DAYS360 = GÜN360 ## İki tarih arasındaki gün sayısını, 360 günlük yılı esas alarak hesaplar.
+EDATE = SERİTARİH ## Başlangıç tarihinden itibaren, belirtilen ay sayısından önce veya sonraki tarihin seri numarasını verir.
+EOMONTH = SERİAY ## Belirtilen sayıda ay önce veya sonraki ayın son gününün seri numarasını verir.
+HOUR = SAAT ## Bir seri numarasını saate dönüştürür.
+MINUTE = DAKİKA ## Bir seri numarasını dakikaya dönüştürür.
+MONTH = AY ## Bir seri numarasını aya dönüştürür.
+NETWORKDAYS = TAMİŞGÜNÜ ## İki tarih arasındaki tam çalışma günlerinin sayısını verir.
+NOW = ŞİMDİ ## Geçerli tarihin ve saatin seri numarasını verir.
+SECOND = SANİYE ## Bir seri numarasını saniyeye dönüştürür.
+TIME = ZAMAN ## Belirli bir zamanın seri numarasını verir.
+TIMEVALUE = ZAMANSAYISI ## Metin biçimindeki zamanı seri numarasına dönüştürür.
+TODAY = BUGÜN ## Bugünün tarihini seri numarasına dönüştürür.
+WEEKDAY = HAFTANINGÜNÜ ## Bir seri numarasını, haftanın gününe dönüştürür.
+WEEKNUM = HAFTASAY ## Dizisel değerini, haftanın yıl içinde bulunduğu konumu sayısal olarak gösteren sayıya dönüştürür.
+WORKDAY = İŞGÜNÜ ## Belirtilen sayıda çalışma günü öncesinin ya da sonrasının tarihinin seri numarasını verir.
+YEAR = YIL ## Bir seri numarasını yıla dönüştürür.
+YEARFRAC = YILORAN ## Başlangıç_tarihi ve bitiş_tarihi arasındaki tam günleri gösteren yıl kesrini verir.
+
+
+##
+## Engineering functions Mühendislik işlevleri
+##
+BESSELI = BESSELI ## Değiştirilmiş Bessel fonksiyonu In(x)'i verir.
+BESSELJ = BESSELJ ## Bessel fonksiyonu Jn(x)'i verir.
+BESSELK = BESSELK ## Değiştirilmiş Bessel fonksiyonu Kn(x)'i verir.
+BESSELY = BESSELY ## Bessel fonksiyonu Yn(x)'i verir.
+BIN2DEC = BIN2DEC ## İkili bir sayıyı, ondalık sayıya dönüştürür.
+BIN2HEX = BIN2HEX ## İkili bir sayıyı, onaltılıya dönüştürür.
+BIN2OCT = BIN2OCT ## İkili bir sayıyı, sekizliye dönüştürür.
+COMPLEX = KARMAŞIK ## Gerçek ve sanal katsayıları, karmaşık sayıya dönüştürür.
+CONVERT = ÇEVİR ## Bir sayıyı, bir ölçüm sisteminden bir başka ölçüm sistemine dönüştürür.
+DEC2BIN = DEC2BIN ## Ondalık bir sayıyı, ikiliye dönüştürür.
+DEC2HEX = DEC2HEX ## Ondalık bir sayıyı, onaltılıya dönüştürür.
+DEC2OCT = DEC2OCT ## Ondalık bir sayıyı sekizliğe dönüştürür.
+DELTA = DELTA ## İki değerin eşit olup olmadığını sınar.
+ERF = HATAİŞLEV ## Hata işlevini verir.
+ERFC = TÜMHATAİŞLEV ## Tümleyici hata işlevini verir.
+GESTEP = BESINIR ## Bir sayının eşik değerinden büyük olup olmadığını sınar.
+HEX2BIN = HEX2BIN ## Onaltılı bir sayıyı ikiliye dönüştürür.
+HEX2DEC = HEX2DEC ## Onaltılı bir sayıyı ondalığa dönüştürür.
+HEX2OCT = HEX2OCT ## Onaltılı bir sayıyı sekizliğe dönüştürür.
+IMABS = SANMUTLAK ## Karmaşık bir sayının mutlak değerini (modül) verir.
+IMAGINARY = SANAL ## Karmaşık bir sayının sanal katsayısını verir.
+IMARGUMENT = SANBAĞ_DEĞİŞKEN ## Radyanlarla belirtilen bir açı olan teta bağımsız değişkenini verir.
+IMCONJUGATE = SANEŞLENEK ## Karmaşık bir sayının karmaşık eşleniğini verir.
+IMCOS = SANCOS ## Karmaşık bir sayının kosinüsünü verir.
+IMDIV = SANBÖL ## İki karmaşık sayının bölümünü verir.
+IMEXP = SANÜS ## Karmaşık bir sayının üssünü verir.
+IMLN = SANLN ## Karmaşık bir sayının doğal logaritmasını verir.
+IMLOG10 = SANLOG10 ## Karmaşık bir sayının, 10 tabanında logaritmasını verir.
+IMLOG2 = SANLOG2 ## Karmaşık bir sayının 2 tabanında logaritmasını verir.
+IMPOWER = SANÜSSÜ ## Karmaşık bir sayıyı, bir tamsayı üssüne yükseltilmiş olarak verir.
+IMPRODUCT = SANÇARP ## Karmaşık sayıların çarpımını verir.
+IMREAL = SANGERÇEK ## Karmaşık bir sayının, gerçek katsayısını verir.
+IMSIN = SANSIN ## Karmaşık bir sayının sinüsünü verir.
+IMSQRT = SANKAREKÖK ## Karmaşık bir sayının karekökünü verir.
+IMSUB = SANÇIKAR ## İki karmaşık sayının farkını verir.
+IMSUM = SANTOPLA ## Karmaşık sayıların toplamını verir.
+OCT2BIN = OCT2BIN ## Sekizli bir sayıyı ikiliye dönüştürür.
+OCT2DEC = OCT2DEC ## Sekizli bir sayıyı ondalığa dönüştürür.
+OCT2HEX = OCT2HEX ## Sekizli bir sayıyı onaltılıya dönüştürür.
+
+
+##
+## Financial functions Finansal fonksiyonlar
+##
+ACCRINT = GERÇEKFAİZ ## Dönemsel faiz ödeyen hisse senedine ilişkin tahakkuk eden faizi getirir.
+ACCRINTM = GERÇEKFAİZV ## Vadesinde ödeme yapan bir tahvilin tahakkuk etmiş faizini verir.
+AMORDEGRC = AMORDEGRC ## Yıpranma katsayısı kullanarak her hesap döneminin değer kaybını verir.
+AMORLINC = AMORLINC ## Her hesap dönemi içindeki yıpranmayı verir.
+COUPDAYBS = KUPONGÜNBD ## Kupon süresinin başlangıcından alış tarihine kadar olan süredeki gün sayısını verir.
+COUPDAYS = KUPONGÜN ## Kupon süresindeki, gün sayısını, alış tarihini de içermek üzere, verir.
+COUPDAYSNC = KUPONGÜNDSK ## Alış tarihinden bir sonraki kupon tarihine kadar olan gün sayısını verir.
+COUPNCD = KUPONGÜNSKT ## Alış tarihinden bir sonraki kupon tarihini verir.
+COUPNUM = KUPONSAYI ## Alış tarihiyle vade tarihi arasında ödenecek kuponların sayısını verir.
+COUPPCD = KUPONGÜNÖKT ## Alış tarihinden bir önceki kupon tarihini verir.
+CUMIPMT = AİÇVERİMORANI ## İki dönem arasında ödenen kümülatif faizi verir.
+CUMPRINC = ANA_PARA_ÖDEMESİ ## İki dönem arasında bir borç üzerine ödenen birikimli temeli verir.
+DB = AZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, sabit azalan bakiye yöntemini kullanarak verir.
+DDB = ÇİFTAZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, çift azalan bakiye yöntemi ya da sizin belirttiğiniz başka bir yöntemi kullanarak verir.
+DISC = İNDİRİM ## Bir tahvilin indirim oranını verir.
+DOLLARDE = LİRAON ## Kesir olarak tanımlanmış lira fiyatını, ondalık sayı olarak tanımlanmış lira fiyatına dönüştürür.
+DOLLARFR = LİRAKES ## Ondalık sayı olarak tanımlanmış lira fiyatını, kesir olarak tanımlanmış lira fiyatına dönüştürür.
+DURATION = SÜRE ## Belli aralıklarla faiz ödemesi yapan bir tahvilin yıllık süresini verir.
+EFFECT = ETKİN ## Efektif yıllık faiz oranını verir.
+FV = ANBD ## Bir yatırımın gelecekteki değerini verir.
+FVSCHEDULE = GDPROGRAM ## Bir seri birleşik faiz oranı uyguladıktan sonra, bir başlangıçtaki anaparanın gelecekteki değerini verir.
+INTRATE = FAİZORANI ## Tam olarak yatırım yapılmış bir tahvilin faiz oranını verir.
+IPMT = FAİZTUTARI ## Bir yatırımın verilen bir süre için faiz ödemesini verir.
+IRR = İÇ_VERİM_ORANI ## Bir para akışı serisi için, iç verim oranını verir.
+ISPMT = ISPMT ## Yatırımın belirli bir dönemi boyunca ödenen faizi hesaplar.
+MDURATION = MSÜRE ## Varsayılan par değeri 10.000.000 lira olan bir tahvil için Macauley değiştirilmiş süreyi verir.
+MIRR = D_İÇ_VERİM_ORANI ## Pozitif ve negatif para akışlarının farklı oranlarda finanse edildiği durumlarda, iç verim oranını verir.
+NOMINAL = NOMİNAL ## Yıllık nominal faiz oranını verir.
+NPER = DÖNEM_SAYISI ## Bir yatırımın dönem sayısını verir.
+NPV = NBD ## Bir yatırımın bugünkü net değerini, bir dönemsel para akışları serisine ve bir indirim oranına bağlı olarak verir.
+ODDFPRICE = TEKYDEĞER ## Tek bir ilk dönemi olan bir tahvilin değerini, her 100.000.000 lirada bir verir.
+ODDFYIELD = TEKYÖDEME ## Tek bir ilk dönemi olan bir tahvilin ödemesini verir.
+ODDLPRICE = TEKSDEĞER ## Tek bir son dönemi olan bir tahvilin fiyatını her 10.000.000 lirada bir verir.
+ODDLYIELD = TEKSÖDEME ## Tek bir son dönemi olan bir tahvilin ödemesini verir.
+PMT = DEVRESEL_ÖDEME ## Bir yıllık dönemsel ödemeyi verir.
+PPMT = ANA_PARA_ÖDEMESİ ## Verilen bir süre için, bir yatırımın anaparasına dayanan ödemeyi verir.
+PRICE = DEĞER ## Dönemsel faiz ödeyen bir tahvilin fiyatını 10.000.00 liralık değer başına verir.
+PRICEDISC = DEĞERİND ## İndirimli bir tahvilin fiyatını 10.000.000 liralık nominal değer başına verir.
+PRICEMAT = DEĞERVADE ## Faizini vade sonunda ödeyen bir tahvilin fiyatını 10.000.000 nominal değer başına verir.
+PV = BD ## Bir yatırımın bugünkü değerini verir.
+RATE = FAİZ_ORANI ## Bir yıllık dönem başına düşen faiz oranını verir.
+RECEIVED = GETİRİ ## Tam olarak yatırılmış bir tahvilin vadesinin bitiminde alınan miktarı verir.
+SLN = DA ## Bir malın bir dönem içindeki doğrusal yıpranmasını verir.
+SYD = YAT ## Bir malın belirli bir dönem için olan amortismanını verir.
+TBILLEQ = HTAHEŞ ## Bir Hazine bonosunun bono eşdeğeri ödemesini verir.
+TBILLPRICE = HTAHDEĞER ## Bir Hazine bonosunun değerini, 10.000.000 liralık nominal değer başına verir.
+TBILLYIELD = HTAHÖDEME ## Bir Hazine bonosunun ödemesini verir.
+VDB = DAB ## Bir malın amortismanını, belirlenmiş ya da kısmi bir dönem için, bir azalan bakiye yöntemi kullanarak verir.
+XIRR = AİÇVERİMORANI ## Dönemsel olması gerekmeyen bir para akışları programı için, iç verim oranını verir.
+XNPV = ANBD ## Dönemsel olması gerekmeyen bir para akışları programı için, bugünkü net değeri verir.
+YIELD = ÖDEME ## Belirli aralıklarla faiz ödeyen bir tahvilin ödemesini verir.
+YIELDDISC = ÖDEMEİND ## İndirimli bir tahvilin yıllık ödemesini verir; örneğin, bir Hazine bonosunun.
+YIELDMAT = ÖDEMEVADE ## Vadesinin bitiminde faiz ödeyen bir tahvilin yıllık ödemesini verir.
+
+
+##
+## Information functions Bilgi fonksiyonları
+##
+CELL = HÜCRE ## Bir hücrenin biçimlendirmesi, konumu ya da içeriği hakkında bilgi verir.
+ERROR.TYPE = HATA.TİPİ ## Bir hata türüne ilişkin sayıları verir.
+INFO = BİLGİ ## Geçerli işletim ortamı hakkında bilgi verir.
+ISBLANK = EBOŞSA ## Değer boşsa, DOĞRU verir.
+ISERR = EHATA ## Değer, #YOK dışındaki bir hata değeriyse, DOĞRU verir.
+ISERROR = EHATALIYSA ## Değer, herhangi bir hata değeriyse, DOĞRU verir.
+ISEVEN = ÇİFTTİR ## Sayı çiftse, DOĞRU verir.
+ISLOGICAL = EMANTIKSALSA ## Değer, mantıksal bir değerse, DOĞRU verir.
+ISNA = EYOKSA ## Değer, #YOK hata değeriyse, DOĞRU verir.
+ISNONTEXT = EMETİNDEĞİLSE ## Değer, metin değilse, DOĞRU verir.
+ISNUMBER = ESAYIYSA ## Değer, bir sayıysa, DOĞRU verir.
+ISODD = TEKTİR ## Sayı tekse, DOĞRU verir.
+ISREF = EREFSE ## Değer bir başvuruysa, DOĞRU verir.
+ISTEXT = EMETİNSE ## Değer bir metinse DOĞRU verir.
+N = N ## Sayıya dönüştürülmüş bir değer verir.
+NA = YOKSAY ## #YOK hata değerini verir.
+TYPE = TİP ## Bir değerin veri türünü belirten bir sayı verir.
+
+
+##
+## Logical functions Mantıksal fonksiyonlar
+##
+AND = VE ## Bütün bağımsız değişkenleri DOĞRU ise, DOĞRU verir.
+FALSE = YANLIŞ ## YANLIŞ mantıksal değerini verir.
+IF = EĞER ## Gerçekleştirilecek bir mantıksal sınama belirtir.
+IFERROR = EĞERHATA ## Formül hatalıysa belirttiğiniz değeri verir; bunun dışındaki durumlarda formülün sonucunu verir.
+NOT = DEĞİL ## Bağımsız değişkeninin mantığını tersine çevirir.
+OR = YADA ## Bağımsız değişkenlerden herhangi birisi DOĞRU ise, DOĞRU verir.
+TRUE = DOĞRU ## DOĞRU mantıksal değerini verir.
+
+
+##
+## Lookup and reference functions Arama ve Başvuru fonksiyonları
+##
+ADDRESS = ADRES ## Bir başvuruyu, çalışma sayfasındaki tek bir hücreye metin olarak verir.
+AREAS = ALANSAY ## Renvoie le nombre de zones dans une référence.
+CHOOSE = ELEMAN ## Değerler listesinden bir değer seçer.
+COLUMN = SÜTUN ## Bir başvurunun sütun sayısını verir.
+COLUMNS = SÜTUNSAY ## Bir başvurudaki sütunların sayısını verir.
+HLOOKUP = YATAYARA ## Bir dizinin en üst satırına bakar ve belirtilen hücrenin değerini verir.
+HYPERLINK = KÖPRÜ ## Bir ağ sunucusunda, bir intranette ya da Internet'te depolanan bir belgeyi açan bir kısayol ya da atlama oluşturur.
+INDEX = İNDİS ## Başvurudan veya diziden bir değer seçmek için, bir dizin kullanır.
+INDIRECT = DOLAYLI ## Metin değeriyle belirtilen bir başvuru verir.
+LOOKUP = ARA ## Bir vektördeki veya dizideki değerleri arar.
+MATCH = KAÇINCI ## Bir başvurudaki veya dizideki değerleri arar.
+OFFSET = KAYDIR ## Verilen bir başvurudan, bir başvuru kaydırmayı verir.
+ROW = SATIR ## Bir başvurunun satır sayısını verir.
+ROWS = SATIRSAY ## Bir başvurudaki satırların sayısını verir.
+RTD = RTD ## COM otomasyonunu destekleyen programdan gerçek zaman verileri alır.
+TRANSPOSE = DEVRİK_DÖNÜŞÜM ## Bir dizinin devrik dönüşümünü verir.
+VLOOKUP = DÜŞEYARA ## Bir dizinin ilk sütununa bakar ve bir hücrenin değerini vermek için satır boyunca hareket eder.
+
+
+##
+## Math and trigonometry functions Matematik ve trigonometri fonksiyonları
+##
+ABS = MUTLAK ## Bir sayının mutlak değerini verir.
+ACOS = ACOS ## Bir sayının ark kosinüsünü verir.
+ACOSH = ACOSH ## Bir sayının ters hiperbolik kosinüsünü verir.
+ASIN = ASİN ## Bir sayının ark sinüsünü verir.
+ASINH = ASİNH ## Bir sayının ters hiperbolik sinüsünü verir.
+ATAN = ATAN ## Bir sayının ark tanjantını verir.
+ATAN2 = ATAN2 ## Ark tanjantı, x- ve y- koordinatlarından verir.
+ATANH = ATANH ## Bir sayının ters hiperbolik tanjantını verir.
+CEILING = TAVANAYUVARLA ## Bir sayıyı, en yakın tamsayıya ya da en yakın katına yuvarlar.
+COMBIN = KOMBİNASYON ## Verilen sayıda öğenin kombinasyon sayısını verir.
+COS = COS ## Bir sayının kosinüsünü verir.
+COSH = COSH ## Bir sayının hiperbolik kosinüsünü verir.
+DEGREES = DERECE ## Radyanları dereceye dönüştürür.
+EVEN = ÇİFT ## Bir sayıyı, en yakın daha büyük çift tamsayıya yuvarlar.
+EXP = ÜS ## e'yi, verilen bir sayının üssüne yükseltilmiş olarak verir.
+FACT = ÇARPINIM ## Bir sayının faktörünü verir.
+FACTDOUBLE = ÇİFTFAKTÖR ## Bir sayının çift çarpınımını verir.
+FLOOR = TABANAYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar.
+GCD = OBEB ## En büyük ortak böleni verir.
+INT = TAMSAYI ## Bir sayıyı aşağıya doğru en yakın tamsayıya yuvarlar.
+LCM = OKEK ## En küçük ortak katı verir.
+LN = LN ## Bir sayının doğal logaritmasını verir.
+LOG = LOG ## Bir sayının, belirtilen bir tabandaki logaritmasını verir.
+LOG10 = LOG10 ## Bir sayının 10 tabanında logaritmasını verir.
+MDETERM = DETERMİNANT ## Bir dizinin dizey determinantını verir.
+MINVERSE = DİZEY_TERS ## Bir dizinin dizey tersini verir.
+MMULT = DÇARP ## İki dizinin dizey çarpımını verir.
+MOD = MODÜLO ## Bölmeden kalanı verir.
+MROUND = KYUVARLA ## İstenen kata yuvarlanmış bir sayı verir.
+MULTINOMIAL = ÇOKTERİMLİ ## Bir sayılar kümesinin çok terimlisini verir.
+ODD = TEK ## Bir sayıyı en yakın daha büyük tek sayıya yuvarlar.
+PI = Pİ ## Pi değerini verir.
+POWER = KUVVET ## Bir üsse yükseltilmiş sayının sonucunu verir.
+PRODUCT = ÇARPIM ## Bağımsız değişkenlerini çarpar.
+QUOTIENT = BÖLÜM ## Bir bölme işleminin tamsayı kısmını verir.
+RADIANS = RADYAN ## Dereceleri radyanlara dönüştürür.
+RAND = S_SAYI_ÜRET ## 0 ile 1 arasında rastgele bir sayı verir.
+RANDBETWEEN = RASTGELEARALIK ## Belirttiğiniz sayılar arasında rastgele bir sayı verir.
+ROMAN = ROMEN ## Bir normal rakamı, metin olarak, romen rakamına çevirir.
+ROUND = YUVARLA ## Bir sayıyı, belirtilen basamak sayısına yuvarlar.
+ROUNDDOWN = AŞAĞIYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar.
+ROUNDUP = YUKARIYUVARLA ## Bir sayıyı daha büyük sayıya, sıfırdan ıraksayarak yuvarlar.
+SERIESSUM = SERİTOPLA ## Bir üs serisinin toplamını, formüle bağlı olarak verir.
+SIGN = İŞARET ## Bir sayının işaretini verir.
+SIN = SİN ## Verilen bir açının sinüsünü verir.
+SINH = SİNH ## Bir sayının hiperbolik sinüsünü verir.
+SQRT = KAREKÖK ## Pozitif bir karekök verir.
+SQRTPI = KAREKÖKPİ ## (* Pi sayısının) kare kökünü verir.
+SUBTOTAL = ALTTOPLAM ## Bir listedeki ya da veritabanındaki bir alt toplamı verir.
+SUM = TOPLA ## Bağımsız değişkenlerini toplar.
+SUMIF = ETOPLA ## Verilen ölçütle belirlenen hücreleri toplar.
+SUMIFS = SUMIFS ## Bir aralıktaki, birden fazla ölçüte uyan hücreleri ekler.
+SUMPRODUCT = TOPLA.ÇARPIM ## İlişkili dizi bileşenlerinin çarpımlarının toplamını verir.
+SUMSQ = TOPKARE ## Bağımsız değişkenlerin karelerinin toplamını verir.
+SUMX2MY2 = TOPX2EY2 ## İki dizideki ilişkili değerlerin farkının toplamını verir.
+SUMX2PY2 = TOPX2AY2 ## İki dizideki ilişkili değerlerin karelerinin toplamının toplamını verir.
+SUMXMY2 = TOPXEY2 ## İki dizideki ilişkili değerlerin farklarının karelerinin toplamını verir.
+TAN = TAN ## Bir sayının tanjantını verir.
+TANH = TANH ## Bir sayının hiperbolik tanjantını verir.
+TRUNC = NSAT ## Bir sayının, tamsayı durumuna gelecek şekilde, fazlalıklarını atar.
+
+
+##
+## Statistical functions İstatistiksel fonksiyonlar
+##
+AVEDEV = ORTSAP ## Veri noktalarının ortalamalarından mutlak sapmalarının ortalamasını verir.
+AVERAGE = ORTALAMA ## Bağımsız değişkenlerinin ortalamasını verir.
+AVERAGEA = ORTALAMAA ## Bağımsız değişkenlerinin, sayılar, metin ve mantıksal değerleri içermek üzere ortalamasını verir.
+AVERAGEIF = EĞERORTALAMA ## Verili ölçütü karşılayan bir aralıktaki bütün hücrelerin ortalamasını (aritmetik ortalama) hesaplar.
+AVERAGEIFS = EĞERLERORTALAMA ## Birden çok ölçüte uyan tüm hücrelerin ortalamasını (aritmetik ortalama) hesaplar.
+BETADIST = BETADAĞ ## Beta birikimli dağılım fonksiyonunu verir.
+BETAINV = BETATERS ## Belirli bir beta dağılımı için birikimli dağılım fonksiyonunun tersini verir.
+BINOMDIST = BİNOMDAĞ ## Tek terimli binom dağılımı olasılığını verir.
+CHIDIST = KİKAREDAĞ ## Kikare dağılımın tek kuyruklu olasılığını verir.
+CHIINV = KİKARETERS ## Kikare dağılımın kuyruklu olasılığının tersini verir.
+CHITEST = KİKARETEST ## Bağımsızlık sınamalarını verir.
+CONFIDENCE = GÜVENİRLİK ## Bir popülasyon ortalaması için güvenirlik aralığını verir.
+CORREL = KORELASYON ## İki veri kümesi arasındaki bağlantı katsayısını verir.
+COUNT = BAĞ_DEĞ_SAY ## Bağımsız değişkenler listesinde kaç tane sayı bulunduğunu sayar.
+COUNTA = BAĞ_DEĞ_DOLU_SAY ## Bağımsız değişkenler listesinde kaç tane değer bulunduğunu sayar.
+COUNTBLANK = BOŞLUKSAY ## Aralıktaki boş hücre sayısını hesaplar.
+COUNTIF = EĞERSAY ## Verilen ölçütlere uyan bir aralık içindeki hücreleri sayar.
+COUNTIFS = ÇOKEĞERSAY ## Birden çok ölçüte uyan bir aralık içindeki hücreleri sayar.
+COVAR = KOVARYANS ## Eşleştirilmiş sapmaların ortalaması olan kovaryansı verir.
+CRITBINOM = KRİTİKBİNOM ## Birikimli binom dağılımının bir ölçüt değerinden küçük veya ölçüt değerine eşit olduğu en küçük değeri verir.
+DEVSQ = SAPKARE ## Sapmaların karelerinin toplamını verir.
+EXPONDIST = ÜSTELDAĞ ## Üstel dağılımı verir.
+FDIST = FDAĞ ## F olasılık dağılımını verir.
+FINV = FTERS ## F olasılık dağılımının tersini verir.
+FISHER = FISHER ## Fisher dönüşümünü verir.
+FISHERINV = FISHERTERS ## Fisher dönüşümünün tersini verir.
+FORECAST = TAHMİN ## Bir doğrusal eğilim boyunca bir değer verir.
+FREQUENCY = SIKLIK ## Bir sıklık dağılımını, dikey bir dizi olarak verir.
+FTEST = FTEST ## Bir F-test'in sonucunu verir.
+GAMMADIST = GAMADAĞ ## Gama dağılımını verir.
+GAMMAINV = GAMATERS ## Gama kümülatif dağılımının tersini verir.
+GAMMALN = GAMALN ## Gama fonksiyonunun (?(x)) doğal logaritmasını verir.
+GEOMEAN = GEOORT ## Geometrik ortayı verir.
+GROWTH = BÜYÜME ## Üstel bir eğilim boyunca değerler verir.
+HARMEAN = HARORT ## Harmonik ortayı verir.
+HYPGEOMDIST = HİPERGEOMDAĞ ## Hipergeometrik dağılımı verir.
+INTERCEPT = KESMENOKTASI ## Doğrusal çakıştırma çizgisinin kesişme noktasını verir.
+KURT = BASIKLIK ## Bir veri kümesinin basıklığını verir.
+LARGE = BÜYÜK ## Bir veri kümesinde k. en büyük değeri verir.
+LINEST = DOT ## Doğrusal bir eğilimin parametrelerini verir.
+LOGEST = LOT ## Üstel bir eğilimin parametrelerini verir.
+LOGINV = LOGTERS ## Bir lognormal dağılımının tersini verir.
+LOGNORMDIST = LOGNORMDAĞ ## Birikimli lognormal dağılımını verir.
+MAX = MAK ## Bir bağımsız değişkenler listesindeki en büyük değeri verir.
+MAXA = MAKA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri içermek üzere, en büyük değeri verir.
+MEDIAN = ORTANCA ## Belirtilen sayıların orta değerini verir.
+MIN = MİN ## Bir bağımsız değişkenler listesindeki en küçük değeri verir.
+MINA = MİNA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri de içermek üzere, en küçük değeri verir.
+MODE = ENÇOK_OLAN ## Bir veri kümesindeki en sık rastlanan değeri verir.
+NEGBINOMDIST = NEGBİNOMDAĞ ## Negatif binom dağılımını verir.
+NORMDIST = NORMDAĞ ## Normal birikimli dağılımı verir.
+NORMINV = NORMTERS ## Normal kümülatif dağılımın tersini verir.
+NORMSDIST = NORMSDAĞ ## Standart normal birikimli dağılımı verir.
+NORMSINV = NORMSTERS ## Standart normal birikimli dağılımın tersini verir.
+PEARSON = PEARSON ## Pearson çarpım moment korelasyon katsayısını verir.
+PERCENTILE = YÜZDEBİRLİK ## Bir aralık içerisinde bulunan değerlerin k. frekans toplamını verir.
+PERCENTRANK = YÜZDERANK ## Bir veri kümesindeki bir değerin yüzde mertebesini verir.
+PERMUT = PERMÜTASYON ## Verilen sayıda nesne için permütasyon sayısını verir.
+POISSON = POISSON ## Poisson dağılımını verir.
+PROB = OLASILIK ## Bir aralıktaki değerlerin iki sınır arasında olması olasılığını verir.
+QUARTILE = DÖRTTEBİRLİK ## Bir veri kümesinin dörtte birliğini verir.
+RANK = RANK ## Bir sayılar listesinde bir sayının mertebesini verir.
+RSQ = RKARE ## Pearson çarpım moment korelasyon katsayısının karesini verir.
+SKEW = ÇARPIKLIK ## Bir dağılımın çarpıklığını verir.
+SLOPE = EĞİM ## Doğrusal çakışma çizgisinin eğimini verir.
+SMALL = KÜÇÜK ## Bir veri kümesinde k. en küçük değeri verir.
+STANDARDIZE = STANDARTLAŞTIRMA ## Normalleştirilmiş bir değer verir.
+STDEV = STDSAPMA ## Bir örneğe dayanarak standart sapmayı tahmin eder.
+STDEVA = STDSAPMAA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder.
+STDEVP = STDSAPMAS ## Standart sapmayı, tüm popülasyona bağlı olarak hesaplar.
+STDEVPA = STDSAPMASA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar.
+STEYX = STHYX ## Regresyondaki her x için tahmini y değerinin standart hatasını verir.
+TDIST = TDAĞ ## T-dağılımını verir.
+TINV = TTERS ## T-dağılımının tersini verir.
+TREND = EĞİLİM ## Doğrusal bir eğilim boyunca değerler verir.
+TRIMMEAN = KIRPORTALAMA ## Bir veri kümesinin içinin ortalamasını verir.
+TTEST = TTEST ## T-test'le ilişkilendirilmiş olasılığı verir.
+VAR = VAR ## Varyansı, bir örneğe bağlı olarak tahmin eder.
+VARA = VARA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder.
+VARP = VARS ## Varyansı, tüm popülasyona dayanarak hesaplar.
+VARPA = VARSA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar.
+WEIBULL = WEIBULL ## Weibull dağılımını hesaplar.
+ZTEST = ZTEST ## Z-testinin tek kuyruklu olasılık değerini hesaplar.
+
+
+##
+## Text functions Metin fonksiyonları
+##
+ASC = ASC ## Bir karakter dizesindeki çift enli (iki bayt) İngilizce harfleri veya katakanayı yarım enli (tek bayt) karakterlerle değiştirir.
+BAHTTEXT = BAHTTEXT ## Sayıyı, ß (baht) para birimi biçimini kullanarak metne dönüştürür.
+CHAR = DAMGA ## Kod sayısıyla belirtilen karakteri verir.
+CLEAN = TEMİZ ## Metindeki bütün yazdırılamaz karakterleri kaldırır.
+CODE = KOD ## Bir metin dizesindeki ilk karakter için sayısal bir kod verir.
+CONCATENATE = BİRLEŞTİR ## Pek çok metin öğesini bir metin öğesi olarak birleştirir.
+DOLLAR = LİRA ## Bir sayıyı YTL (yeni Türk lirası) para birimi biçimini kullanarak metne dönüştürür.
+EXACT = ÖZDEŞ ## İki metin değerinin özdeş olup olmadığını anlamak için, değerleri denetler.
+FIND = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır).
+FINDB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır).
+FIXED = SAYIDÜZENLE ## Bir sayıyı, sabit sayıda ondalıkla, metin olarak biçimlendirir.
+JIS = JIS ## Bir karakter dizesindeki tek enli (tek bayt) İngilizce harfleri veya katakanayı çift enli (iki bayt) karakterlerle değiştirir.
+LEFT = SOL ## Bir metin değerinden en soldaki karakterleri verir.
+LEFTB = SOLB ## Bir metin değerinden en soldaki karakterleri verir.
+LEN = UZUNLUK ## Bir metin dizesindeki karakter sayısını verir.
+LENB = UZUNLUKB ## Bir metin dizesindeki karakter sayısını verir.
+LOWER = KÜÇÜKHARF ## Metni küçük harfe çevirir.
+MID = ORTA ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir.
+MIDB = ORTAB ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir.
+PHONETIC = SES ## Metin dizesinden ses (furigana) karakterlerini ayıklar.
+PROPER = YAZIM.DÜZENİ ## Bir metin değerinin her bir sözcüğünün ilk harfini büyük harfe çevirir.
+REPLACE = DEĞİŞTİR ## Metnin içindeki karakterleri değiştirir.
+REPLACEB = DEĞİŞTİRB ## Metnin içindeki karakterleri değiştirir.
+REPT = YİNELE ## Metni belirtilen sayıda yineler.
+RIGHT = SAĞ ## Bir metin değerinden en sağdaki karakterleri verir.
+RIGHTB = SAĞB ## Bir metin değerinden en sağdaki karakterleri verir.
+SEARCH = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir).
+SEARCHB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir).
+SUBSTITUTE = YERİNEKOY ## Bir metin dizesinde, eski metnin yerine yeni metin koyar.
+T = M ## Bağımsız değerlerini metne dönüştürür.
+TEXT = METNEÇEVİR ## Bir sayıyı biçimlendirir ve metne dönüştürür.
+TRIM = KIRP ## Metindeki boşlukları kaldırır.
+UPPER = BÜYÜKHARF ## Metni büyük harfe çevirir.
+VALUE = SAYIYAÇEVİR ## Bir metin bağımsız değişkenini sayıya dönüştürür.