Files
PhpSpreadsheet/tests/data/Calculation/TextData/CONCAT.php
T
oleibman ad2194d737 CONCATENATE Changes, and Csv/Html/Ods Support
The CONCATENATE function has been treated as equivalent to CONCAT. This is not how it is treated in Excel; it is closer to (and probably identical to) the ampersand concatenate operator. The difference manifests itself when any of the arguments is an array (typically a cell range). Code is added to support this difference.

Support for array results is added to Csv Writer, Html Writer, and Ods Reader and Writer. I have not figured out how to get it to work with Xls.
2024-06-14 08:30:18 -07:00

40 lines
791 B
PHP

<?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Cell\DataType;
return [
[
'ABCDEFGHIJ',
'ABCDE',
'FGHIJ',
],
[
'123',
1,
2,
3,
],
[
'Boolean-TRUE',
'Boolean',
'-',
true,
],
'no arguments' => ['exception'],
'result just fits' => [
// Note use Armenian character below to make sure chars, not bytes
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5) . 'ABCDE',
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),
'ABCDE',
],
'result too long' => [
'#CALC!',
str_repeat('Ԁ', DataType::MAX_STRING_LENGTH - 5),
'abc',
'=A2',
],
'propagate DIV0' => ['#DIV/0!', '1', '=2/0', '3'],
];