xlsx转csv 身份证、手机号 变成科学记数法
siyue1314 opened this issue · 1 comments
siyue1314 commented
viest commented
可以通过 setType
设置每列的类型,示例:
$config = ['path' => '/path'];
$excel = new \Vtiful\Kernel\Excel($config);
$fp = fopen('/path/file.csv', 'w');
$excel->openFile('filename.xlsx')
->openSheet()
->setType([
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_STRING,
])
->putCsv($fp);