Commit 439ce045 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B8149ExcelExportcutoffatColumnAA' into 'master'

Fixes #8149 Excel Export cutoff at Column AA

See merge request !136
parents e00853d2 963075bb
Pipeline #1786 passed with stage
in 2 minutes and 24 seconds
...@@ -173,24 +173,16 @@ class Excel { ...@@ -173,24 +173,16 @@ class Excel {
} }
/** /**
* Increment the alpha string. If 'Z' is reached on the last position, it appends 'A'. * Increment the alpha string. i.e. count using A-Z as base.
* 'A' > 'B' * 'A' > 'B'
* 'Z' > 'ZA' * 'Z' > 'AA'
* 'ZA' > 'ZB' * 'AA' > 'AB'
* 'AGTC' > 'AGTD'
* *
* @param $column * @param $column
* @return string - incremented column. * @return string - incremented column.
*/ */
private function nextColumn($column) { private function nextColumn($column) {
$len = strlen($column); return ++$column;
$c = $column[$len - 1];
if ($c == 'Z') {
$column .= 'A';
} else {
$c = ++$c;
$column[$len - 1] = $c;
}
return $column;
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment