package cn.stylefeng.workflow.api.util;

public class ExcelColumnUtil {

    public static String toExcelColumn(int number) {
        StringBuilder columnName = new StringBuilder();
        while (number > 0) {

            number--;

            int remainder = number % 26;
            char letter = (char) ('A' + remainder);
            columnName.insert(0, letter);

            number = (number - remainder) / 26;
        }
        return columnName.toString();
    }

}
