mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-15 04:26:25 +00:00
Add support for remaining types
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user