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条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?