当前位置:网站首页>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;
}
边栏推荐
- Redis分片集群
- Mongodb database
- 阿里云服务的网络解决方案
- Numpy learning
- [shader realizes shadow projection effect _shader effect Chapter 8]
- Idea2021 failed to start. Could not find main class com/intellij/idea/main
- Raspberry pie 3b ffmpeg RTMP streaming
- Efcore's solution of multi tenant zero script, table and database read-write separation under SaaS system
- Memcached data cache database (improve efficiency)
- Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
猜你喜欢

第3章业务功能开发(查询线索)

Chapter 3 business function development (modifying clues, data echo and modifying data)

25 Ph.D. degrees revoked

Idea failed to start the project yamlexception Chinese file encoding format

Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection

Chapter 3 business function development (query clues)

ArcGIS Pro脚本工具(10)——从图层生成.stylx样式符号

Review the second time, 220614, video, day03_ Data warehouse design,

@Use of data annotation (instead of get and set methods in entity classes)

Apartment repair reporting system (idea, SSM, MySQL)
随机推荐
Swift初始化器及可选链
[dark horse programmer] redis learning notes 005: enterprise level solutions
Raspberry pie creation self start service
一次简单的SQL注入靶场练习
Implementation of depth first and breadth first traversal of binary tree
"Unable to recognize" yarn "item as cmdlet, function, script file
ArcGIS Pro scripting tool (10) -- generate.Stylx style symbols from layers
My creation anniversary
@Autowired注解的实现原理
Chapter 3 business function development (realize the real-time response of the select all button)
Data warehouse ODS, DWD floor, 220616, HM,
C#入门系列(三十) -- 异常处理
JVM specification Oracle official website
Network solutions for Alibaba cloud services
Review the second time, 220614, video, day03_ Data warehouse design,
Rk3399 development board i2c4 attaching EEPROM instance
Bigdecimel in words
[shader realizes shadow projection effect _shader effect Chapter 8]
Ensembles in RNA counts data in TCGA_ ID to gene_ Method of ID
[ten thousand words long text] Based on LSM tree thought Net 6.0 C # realize kV database (case version)