码迷,mamicode.com
首页 > Web开发 > 详细

exception ‘PHPExcel_Calculation_Exception‘ with message ‘粉丝数据!C2679 -> Formula Error: Operator ‘=‘ has no operands

时间:2018-02-02 14:06:59      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:car   title   with   bsp   row   ons   exce   cal   pos   

导致问题原因可能是导出字段中包含有  ‘=’  ,解决办法:在字段前拼上一个半单引号。

 if(strpos($lists[$i-2][‘nickname‘],‘=‘) === 0){
        $lists[$i-2][‘nickname‘] = "‘".$lists[$i-2][‘nickname‘];
}

 

//csv的标题头
                        $headTitle = array(
                                ‘开卡场馆‘,
                                ‘卡号‘,
                                ‘会员姓名‘,
                                ‘开卡类型‘,
                                ‘累计消费‘,
                                ‘会员余额‘,
                                ‘开卡时间‘,
                                ‘操作员‘,
                                ‘推荐人‘,
                        );
                        //遍历写入每一行数据
                        foreach ($data[‘list‘] as $row)
                        {
                                // 将数据 严格 按照标题来排序
                                $have_order_row = array();
                                $have_order_row[] = $row["stadium_name"];
                                $have_order_row[] = $row["card_num"];
                                //$have_order_row[] = $row["member_name"];
                                $have_order_row[] = strpos($row["member_name"],‘=‘) === 0 ? "‘" . $row["member_name"] : $row["member_name"];
                                $have_order_row[] = $row["is_wxcard_str"];
                                $have_order_row[] = $row["consume_money"];
                                $have_order_row[] = $row["reality_money"];
                                $have_order_row[] = $row["time_str"];
                                $have_order_row[] = $row["operator_name"];
                                $have_order_row[] = $row["introducer_name"];
                                $bodyData[] = $have_order_row;
                        }

 

exception ‘PHPExcel_Calculation_Exception‘ with message ‘粉丝数据!C2679 -> Formula Error: Operator ‘=‘ has no operands

标签:car   title   with   bsp   row   ons   exce   cal   pos   

原文地址:https://www.cnblogs.com/zhuiluoyu/p/8404462.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!