// suport AA->ZZ,A=65,Z=90
List<String> list = new ArrayList<String>(128);
String num="78";
String start = "AA";
String end = "EE";
list.add(start+num);
char start1 = start.charAt(0);
char start2 = start.charAt(1);
char end1 = end.charAt(0);
char end2 = end.charAt(1);
while (end1 >= start1 || end2 > start2) {
if ((++start2) == ('Z' + 1)) {
start1++;
start2 = 'A';
}
list.add(start1+""+start2+num);
// System.out.println(start1+""+start2);
}
list.add(end+num);
//String exp=StringUtils.join(',');
StringBuffer exp= new StringBuffer();
for(String c:list){
exp.append(",").append(c);
}
在网上没有找到更好的方法,如有想法,欢迎指正。