dowbwrr3590709 2017-07-14 09:24
浏览 53
已采纳

从PHP读取csv列的颜色

I'm trying to read only colum with red label in a csv file. Is there a php function to do this or a symfony bundle? Now I'm reading csv file with fgetcsv function:

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;

        }
    }
}

But it doesn't read the label's color.Is there a way to read the color on the csv files?

  • 写回答

2条回答 默认 最新

  • duandu8202 2017-07-14 09:27
    关注

    CSV files have no formatting.

    .xls or .odt files have formatting, but CSV definitely not - only data are saved in there. Look at the file with a text editor.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了