Inspired by github pull-6, use a StringBuilder for quicker string appending
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bff0813e48
commit
95fb311279
@ -420,7 +420,7 @@ public class CellReference {
|
||||
// treat it as the 0th one
|
||||
int excelColNum = col + 1;
|
||||
|
||||
String colRef = "";
|
||||
StringBuilder colRef = new StringBuilder(2);
|
||||
int colRemain = excelColNum;
|
||||
|
||||
while(colRemain > 0) {
|
||||
@ -430,10 +430,10 @@ public class CellReference {
|
||||
|
||||
// The letter A is at 65
|
||||
char colChar = (char)(thisPart+64);
|
||||
colRef = colChar + colRef;
|
||||
colRef.append(colChar);
|
||||
}
|
||||
|
||||
return colRef;
|
||||
return colRef.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user