2
That old Excel cell formatting question is causing me problems now. I use the Laravel framework and to export the data I use the Laravel Excel.
I’m formatting the cell to type text and yet Excel keeps rounding the values and changing the end to 0000. Follow my example.
Passing the cell to text type.
$sheet->setColumnFormat(array(
'B' => '@'));
Result in spreadsheet.
7,256E+18 => 7256001273850860000 // valor que sai na célula no excel
7256001273850860168 // valor que era para ser gerado
If anyone can help, I really appreciate it. Thanks..
Good morning man, I think you misunderstood my question. My problem is when I will export the data from the system. I use the Laravel framework and for data export the Laravel Excel. However when I export the data this problem occurs.
– Luiz Gustavo Costa Ceolin
But your code is not wrong, the problem is in excel, so you have to format the field before sending the value, or pass the value as if it were a string operation. @Luizgustavocostaceolin
– Wictor Chaves