4 Commits

Author SHA1 Message Date
oleibman ebdbdd41ba Option To Display Numbers With Less Precision
Fix #4626. Previous changes had increased the precision of floating point numbers when cast to string, making for greater accuracy after save and load operations, without affecting the values displayed by Excel. Although the results of the cast are now more accurate computationally, they can appear unexpected to humans. A new boolean parameter `lessFloatPrecision` (defaulting to false) is added to `StringHelper::convertToString`, to `NumberFormat::toFormattedString` and `NumberFormat\Formatter::toFormattedString`, and to the entire `Worksheet::toArray` family of functions. When the new parameter is set to true, the result can be less surprising to humans. It should not, however, be used in subsequent computations.

In the case of the NumberFormat functions, the new parameter will be considered only when the NumberFormat for the cell in question is `General` or equivalent. Setting an actual numeric format for the cell is probably a better solution than using the new parameter.
2025-09-10 00:32:26 -07:00
oleibman e2d68f75e7 Documentation Update
Fix #4365.
2025-02-15 00:18:15 -08:00
Christian Weiske 1c931e2870 Documentation and example for rangeToArrayYieldRows()
Related: https://github.com/PHPOffice/PhpSpreadsheet/pull/3906
2024-06-17 11:29:36 +02:00
MarkBaker 868f6d4abe Documentation about Iterating through Cells 2024-03-07 12:37:40 +01:00