Search code examples
phpexcellaravelmaatwebsite-excel

Laravel Excel Maatwebsite/Excel showing +12


Hmm you know guys why is this have a +12 ? Not showing a full text this is just a string in my PHP code. thanks a lot.

enter image description here


Solution

  • Finally found my answer here, just use DataType::TYPE_STRING, this now showing the data that I need.

    use PhpOffice\PhpSpreadsheet\Cell\DataType;
    
    
    $sheet->getCell("Y")->setValue($data["ref_num"])->setDataType(DataType::TYPE_STRING);
    

    enter image description here