Add support for remaining types

This commit is contained in:
Robin van der Vliet
2025-11-13 19:03:21 +01:00
parent 536c63e100
commit 07d68b3bc8
2 changed files with 31 additions and 0 deletions
@@ -7,6 +7,9 @@ use PhpOffice\PhpSpreadsheet\Cell\Cell;
class Info
{
/**
* @internal
*/
public static bool $infoSupported = true;
/**
@@ -27,10 +30,14 @@ class Info
}
return match (is_string($typeText) ? strtolower($typeText) : $typeText) {
'directory' => '/',
'numfile' => $cell?->getWorksheetOrNull()?->getParent()?->getSheetCount() ?? 1,
'origin' => '$A:$A$1',
'osversion' => 'PHP ' . PHP_VERSION,
'recalc' => 'Automatic',
'release' => PHP_VERSION,
'system' => 'PHP',
'memavail', 'memused', 'totmem' => ExcelError::NA(),
default => ExcelError::VALUE(),
};
}
@@ -3,10 +3,18 @@
declare(strict_types=1);
return [
[
'/',
'directory',
],
[
1,
'numfile',
],
[
'$A:$A$1',
'origin',
],
[
'PHP ' . PHP_VERSION,
'osversion',
@@ -19,10 +27,26 @@ return [
'Automatic',
'RECALC',
],
[
PHP_VERSION,
'release',
],
[
'PHP',
'system',
],
[
'#N/A',
'memavail',
],
[
'#N/A',
'memused',
],
[
'#N/A',
'totmem',
],
[
'#VALUE!',
'1',