Here you can find the source of intToColumnName(int column)
public static String intToColumnName(int column)
//package com.java2s; public class Main { public static String intToColumnName(int column) { // log.debug("intToColumnName("+column+")"); StringBuffer s = new StringBuffer(); column++;/*from w ww .j av a 2s . c o m*/ while (column > 26) { int c = column % 26; column = column / 26; if (c == 0) { s.insert(0, 'Z'); column--; } else { s.insert(0, (char) (c + 'A' - 1)); } } s.insert(0, (char) (column + 'A' - 1)); // log.debug(" " + s + " => " + columnNameToInt(s.toString())); return s.toString(); } }