分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

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

发布时间:2023-09-06 01:40责任编辑:苏小强关键词:PHP

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

 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

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved