You means your number is $num = 012345678;
and you are trying to export CSV file its exports 12345678 right..?
so now you can use this method
$num = 0123456789;
foreach($listings as $listing){
'number' => '="'.str_replace('"', '\"', $num).'"',
}
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
use \PhpSpreadsheet\Cell\StringValueBinder
class QuestionnaireExport extends StringValueBinder implements FromCollection, WithCustomValueBinder
2条答案
按热度按时间u91tlkcl1#
yrefmtwq2#
我得到了一个解决方案,并张贴在这里帮助别人。
它做了一个技巧&导出Excel在原始格式没有删除0的最后。