问题描述
我正在将xlxs文件导入到集合中。但是,单元格中的值是变化的,例如
3614226905352
更改为3.614226905369E12
20
至20.0
500
至500.0
$90.00
至90.0
///Controller
$import = new ImportFilterService();
Excel::import($import,$file->getRealPath());
class ImportFilterService implements ToCollection
{
public function collection(Collection $rows)
{
foreach ($rows as $key => $item) {
dd($item);
}
}
}
我尝试实施WithCustomValueBinder
public function bindValue(Cell $cell,$value){
}
但是,在调用bindValue
方法时,$ value已经被更改。
有什么想法如何确保xlxs文件或xls文件保留原始单元格值?
P.S。使用Rap2hpoutre FastExcel
时我没有这个问题。但是,该库不适用于xls
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)