当前位置:网站首页>PHP reports an error: classes\phpexcel\cell php Line(594) Invalid cell coordinate ESIGN1
PHP reports an error: classes\phpexcel\cell php Line(594) Invalid cell coordinate ESIGN1
2022-07-25 08:34:00 【Summer is already slightly cool】
One 、 explain
Invalid cell coordinate ESIGN1:
Cell coordinates ESIGN1 Invalid
At first, I was a little confused when I saw this problem , Only step by step
echo 1;die();Print , Finally found the problem , Four or five cellsE, It was written asESIGN1. Maybe I copied a word beforeSIGN1stay E Back , Embarrassed ~hold
ESIGN1Change toEThat's itCode screenshot

Two 、 Content
1、 Before the change
/** * @param int $count The number of columns * @return array One dimensional array of column names */
public static function getCol($count)
{
$columnFlag = [
0 => 'Z', 1 => 'A', 2 => 'B', 3 => 'C', 4 => 'D', 5 => 'ESIGN1', 6 => 'F', 7 => 'G', 8 => 'H',
9 => 'I', 10 => 'J', 11 => 'K', 12 => 'L', 13 => 'M', 14 => 'N', 15 => 'O', 16 => 'P', 17 => 'Q',
18 => 'R', 19 => 'S', 20 => 'T', 21 => 'U', 22 => 'V', 23 => 'W', 24 => 'X', 25 => 'Y', 26 => 'Z'
];
if ($count == 0) {
return [];
}
$column = [];
for ($index = 1; $index <= $count; $index++) {
if ($index <= 26) {
$column[] = $columnFlag[$index];
} else {
$value = floor($index / 26);
if ($index % 26 == 0) {
$value -= 1;
}
$column[] = $columnFlag[$value] . $columnFlag[floor($index % 26)];
}
}
return $column;
}
2、 After modification
// test
public function test()
{
var_export(self::getCol(99));
}
/** * @param int $count The number of columns * @return array One dimensional array of column names */
public static function getCol($count)
{
$columnFlag = [
0 => 'Z', 1 => 'A', 2 => 'B', 3 => 'C', 4 => 'D', 5 => 'E', 6 => 'F', 7 => 'G', 8 => 'H',
9 => 'I', 10 => 'J', 11 => 'K', 12 => 'L', 13 => 'M', 14 => 'N', 15 => 'O', 16 => 'P', 17 => 'Q',
18 => 'R', 19 => 'S', 20 => 'T', 21 => 'U', 22 => 'V', 23 => 'W', 24 => 'X', 25 => 'Y', 26 => 'Z'
];
if ($count == 0) {
return [];
}
$column = [];
for ($index = 1; $index <= $count; $index++) {
if ($index <= 26) {
$column[] = $columnFlag[$index];
} else {
$value = floor($index / 26);
if ($index % 26 == 0) {
$value -= 1;
}
$column[] = $columnFlag[$value] . $columnFlag[floor($index % 26)];
}
}
return $column;
}
边栏推荐
猜你喜欢

Raspberrypico analytic PWM

Foundation 31: Selenium positioning dynamic ID element

Source code of pet adoption management system implemented by ssm+jsp+mysql

Mongodb database

技术面②Mysql中的索引(index)类型有哪些并简要介绍一下?什么时候需要创建索引?什么时候不需要创建索引?为什么创建索引后查询速度会提高?

Teach you to understand the computer optometry sheet

Huawei device remote login (Telnet, SSH) configuration

SSM+JSP+MYSQL实现的宠物领养收养管理系统源码

Refreshing mobile terminal personal center page

How to set up a personal website for free
随机推荐
Advanced C language (XIII) - Example Analysis of dynamic memory management
Foundation 32: page element positioning method XPath --- axis positioning method
刷题《剑指Offer》day02
Hotel room management system based on jsp+servlet+mysql
【万字长文】使用 LSM-Tree 思想基于.Net 6.0 C# 实现 KV 数据库(案例版)
ArcGIS Pro脚本工具(10)——从图层生成.stylx样式符号
@Use of Autowired
Idea2021 failed to start. Could not find main class com/intellij/idea/main
Refreshing mobile terminal personal center page
How can hospitals achieve efficient and low-cost operation and maintenance? Is there any software that can meet it?
Eureka forced offline service
Raspberry connects EC20 for PPP dialing
ip命令使用详解
CM4 development cross compilation tool chain production
【5G NR】3GPP常用协议整理
A powerful port scanning tool (nmap)
JVM specification Oracle official website
CentOS 8.2 MySQL installation (xshell6)
A simple hotel background management system based on jsp+servlet+mysql
[dark horse programmer] redis learning notes 004: master-slave replication + sentinel mode + cluster