File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public function handle()
94
94
? (new StyleBuilder )->setFormat ($ column ['exportFormat ' ])->build ()
95
95
: null ;
96
96
97
- $ value = is_numeric ($ value ) ? (float ) $ value : $ value ;
97
+ $ value = $ this -> isNumeric ($ value ) ? (float ) $ value : $ value ;
98
98
99
99
$ cells ->push (WriterEntityFactory::createCell ($ value , $ format ));
100
100
}
@@ -117,4 +117,18 @@ protected function wantsDateFormat(Column $column): bool
117
117
118
118
return in_array ($ column ['exportFormat ' ], config ('datatables-export.date_formats ' , []));
119
119
}
120
+
121
+ /**
122
+ * @param mixed $value
123
+ * @return bool
124
+ */
125
+ protected function isNumeric ($ value ): bool
126
+ {
127
+ // Skip numeric style if value has leading zeroes.
128
+ if (Str::startsWith ($ value , '0 ' )) {
129
+ return false ;
130
+ }
131
+
132
+ return is_numeric ($ value );
133
+ }
120
134
}
You can’t perform that action at this time.
0 commit comments