PHPOffice/PhpSpreadsheet · error · PhpOffice\PhpSpreadsheet\Calculation\Exception
#NUM!
#NUM!
Error message
#NUM!
What it means
Error "#NUM!" thrown in PHPOffice/PhpSpreadsheet.
Source
Thrown at src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php:26
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
class CashFlowValidations extends FinancialValidations
{
public static function validateRate(mixed $rate): float
{
$rate = self::validateFloat($rate);
return $rate;
}
public static function validatePeriodType(mixed $type): int
{
$rate = self::validateInt($type);
if (
$type !== FinancialConstants::PAYMENT_END_OF_PERIOD
&& $type !== FinancialConstants::PAYMENT_BEGINNING_OF_PERIOD
) {
throw new Exception(ExcelError::NAN());
}
return $rate;
}
public static function validatePresentValue(mixed $presentValue): float
{
return self::validateFloat($presentValue);
}
public static function validateFutureValue(mixed $futureValue): float
{
return self::validateFloat($futureValue);
}
}
View on GitHub (pinned to 65b080eef4)
When it happens
Trigger: Thrown at src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php:26 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of PHPOffice/PhpSpreadsheet@65b080eef4 (2026-08-17).
Data as JSON: /api/errors/f4278a403e411e40.
Report an issue: GitHub.