我正试图读取csv文件中只带有红色标签的列。有没有一个PHP函数来做到这一点或symfony包? 现在我在读csv文件与fgetcsv功能:从PHP读取csv列的颜色
foreach($request->files->get('importFile') as $file) {
if (($handle = fopen($file->getRealPath(), "r")) !== FALSE) {
// get the rest of the rows
$data = array();
$i = 0;
while ($row = fgetcsv($handle, 0, ';')) {
if($i>1) {
$data[] = $row;
$i++;
}
print_r($data);die;
}
}
}
但它不读取标签的color.Is有没有办法读了CSV文件中的颜色?
您不能在csv中设置任何行的颜色,因为csv只是基于文本的 –