mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
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
5a067c6b97
commit
106b8f3da8
@ -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…
x
Reference in New Issue
Block a user