You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). Thia is a
9
9
10
10
### Added
11
11
12
-
-Nothing yet.
12
+
-Option to display numbers with less precision. [Issue #4626](https://github.com/PHPOffice/PhpSpreadsheet/issues/4626)[PR #4640](https://github.com/PHPOffice/PhpSpreadsheet/pull/4640)
Copy file name to clipboardExpand all lines: docs/topics/Looping the Loop.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,9 @@ It can return the raw cell value (which isn't particularly useful if the cell co
57
57
| $calculateFormulas | boolean | false | Flag to indicate if formula values should be calculated before returning. |
58
58
| $formatData | boolean | false | Flag to request that values should be formatting before returning. |
59
59
| $returnCellRef | boolean | false | False - Return a simple enumerated array of rows and columns (indexed by number counting from zero)<br />True - Return rows and columns indexed by their actual row and column IDs. |
| $reduceArrays | boolean | false | True - If calculated value is an array, reduce it to top leftmost value. |
62
+
| $lessFloatPrecision | boolean | false | True - PhpSpreadsheet 5.2+ - Floats, if formatted, will display as a more human-friendly but possibly less accurate value. |
Copy file name to clipboardExpand all lines: src/PhpSpreadsheet/Worksheet/Worksheet.php
+31-12Lines changed: 31 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2938,12 +2938,15 @@ public function fromArray(array $source, mixed $nullValue = null, string $startC
2938
2938
}
2939
2939
2940
2940
/**
2941
+
* @param bool $calculateFormulas Whether to calculate cell's value if it is a formula.
2941
2942
* @param null|bool|float|int|RichText|string $nullValue value to use when null
2943
+
* @param bool $formatData Whether to format data according to cell's style.
2944
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
* True - Return rows and columns indexed by their actual row and column IDs
2979
2983
* @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.
2980
2984
* True - Don't return values for rows/columns that are defined as hidden.
2985
+
* @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.
2986
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
2981
2987
*
2982
2988
* @return mixed[][]
2983
2989
*/
@@ -2988,12 +2994,13 @@ public function rangeToArray(
@@ -3012,6 +3019,8 @@ public function rangeToArray(
3012
3019
* True - Return rows and columns indexed by their actual row and column IDs
3013
3020
* @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.
3014
3021
* True - Don't return values for rows/columns that are defined as hidden.
3022
+
* @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.
3023
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
3015
3024
*
3016
3025
* @return mixed[][]
3017
3026
*/
@@ -3022,14 +3031,15 @@ public function rangesToArray(
@@ -3049,6 +3059,8 @@ public function rangesToArray(
3049
3059
* True - Return rows and columns indexed by their actual row and column IDs
3050
3060
* @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.
3051
3061
* True - Don't return values for rows/columns that are defined as hidden.
3062
+
* @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.
3063
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
3052
3064
*
3053
3065
* @return Generator<array<mixed>>
3054
3066
*/
@@ -3059,7 +3071,8 @@ public function rangeToArrayYieldRows(
@@ -3226,6 +3239,8 @@ private function validateNamedRange(string $definedName, bool $returnNullIfInval
3226
3239
* True - Return rows and columns indexed by their actual row and column IDs
3227
3240
* @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.
3228
3241
* True - Don't return values for rows/columns that are defined as hidden.
3242
+
* @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.
3243
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
3229
3244
*
3230
3245
* @return mixed[][]
3231
3246
*/
@@ -3236,7 +3251,8 @@ public function namedRangeToArray(
@@ -3262,6 +3278,8 @@ public function namedRangeToArray(
3262
3278
* True - Return rows and columns indexed by their actual row and column IDs
3263
3279
* @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden.
3264
3280
* True - Don't return values for rows/columns that are defined as hidden.
3281
+
* @param bool $reduceArrays If true and result is a formula which evaluates to an array, reduce it to the top leftmost value.
3282
+
* @param bool $lessFloatPrecision If true, formatting unstyled floats will convert them to a more human-friendly but less computationally accurate value
0 commit comments