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()
9494 ? (new StyleBuilder )->setFormat ($ column ['exportFormat ' ])->build ()
9595 : null ;
9696
97- $ value = is_numeric ($ value ) ? (float ) $ value : $ value ;
97+ $ value = $ this -> isNumeric ($ value ) ? (float ) $ value : $ value ;
9898
9999 $ cells ->push (WriterEntityFactory::createCell ($ value , $ format ));
100100 }
@@ -117,4 +117,18 @@ protected function wantsDateFormat(Column $column): bool
117117
118118 return in_array ($ column ['exportFormat ' ], config ('datatables-export.date_formats ' , []));
119119 }
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+ }
120134}
You can’t perform that action at this time.
0 commit comments