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(){ ...@@ -674,19 +674,16 @@ function CellAddressUtils(){
var sResult = this._aColnumToColstr[num]; var sResult = this._aColnumToColstr[num];
if(!sResult){ if(!sResult){
// convert 1 to A, 2 to B, ..., 27 to AA etc. // convert 1 to A, 2 to B, ..., 27 to AA etc.
if(num == 0) return "";
var val;
sResult = ""; sResult = "";
var n = num - 1; if(num > 0){
if (n >= 702) { var columnNumber = num;
val = (Math.floor(n / 676) - 1) % 26; var currentLetterNumber;
sResult += String.fromCharCode(val + 65); while(columnNumber > 0){
} currentLetterNumber = (columnNumber - 1) % 26;
if (n >= 26) { sResult = String.fromCharCode(currentLetterNumber + 65) + sResult;
val = (Math.floor(n / 26) - 1) % 26; columnNumber = (columnNumber - (currentLetterNumber + 1)) / 26;
sResult += String.fromCharCode(val + 65); }
} }
sResult += String.fromCharCode( (n % 26) + 65);
this._aColnumToColstr[num] = sResult; this._aColnumToColstr[num] = sResult;
} }
return 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