From 66f0fb12d8713cb4745d69d4e92e0dbb544b14c3 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Tue, 26 Oct 2010 14:22:31 +0000 Subject: [PATCH] Minor performance tweaks git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@62813 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Cell.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index feaa7657..dc24dec9 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -658,7 +658,10 @@ class PHPExcel_Cell if ($pColumnIndex < 26) { return chr(65 + $pColumnIndex); } - return PHPExcel_Cell::stringFromColumnIndex((int)($pColumnIndex / 26) -1).chr(65 + $pColumnIndex%26) ; + if ($pColumnIndex < 702) { + return chr(64 + ($pColumnIndex / 26)).chr(65 + $pColumnIndex % 26); + } + return chr(64 + (($pColumnIndex - 26) / 676)).chr(65 + ((($pColumnIndex - 26) % 676) / 26)).chr(65 + $pColumnIndex % 26); } /**