blade number format by comma
number_format(10000, 2, '.', ',');
// 10,000.00
blade number format by comma
number_format(10000, 2, '.', ',');
// 10,000.00
Laravel Excel numbers formatted as text still appearing as number
I found a workaround by using setCellValueExplicit()
eg:
$sheet->setColumnFormat(array( //se formatea la columna a texto
'C' => \PHPExcel_Style_NumberFormat::FORMAT_TEXT,
'I' => 'dd-mm-yyyy hh:mm'
));
$sheet->setCellValueExplicit('C10', $object->card_number, \PHPExcel_Cell_DataType::TYPE_STRING);
Hope this helps ;)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us