Commit 3fe786cf authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 24228 - Файл с формулами портится после экспорта в XLSX.

изменена функция преобразования числа в строку.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56265 954022d7-b5bf-4e40-9824-e11837661b57
parent 6c9c04f1
......@@ -674,19 +674,16 @@ function CellAddressUtils(){
var sResult = this._aColnumToColstr[num];
if(!sResult){
// convert 1 to A, 2 to B, ..., 27 to AA etc.
if(num == 0) return "";
var val;
sResult = "";
var n = num - 1;
if (n >= 702) {
val = (Math.floor(n / 676) - 1) % 26;
sResult += String.fromCharCode(val + 65);
}
if (n >= 26) {
val = (Math.floor(n / 26) - 1) % 26;
sResult += String.fromCharCode(val + 65);
if(num > 0){
var columnNumber = num;
var currentLetterNumber;
while(columnNumber > 0){
currentLetterNumber = (columnNumber - 1) % 26;
sResult = String.fromCharCode(currentLetterNumber + 65) + sResult;
columnNumber = (columnNumber - (currentLetterNumber + 1)) / 26;
}
}
sResult += String.fromCharCode( (n % 26) + 65);
this._aColnumToColstr[num] = sResult;
}
return sResult;
......
Markdown is supported
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