public static void main(String[] args){ Scanner scanner = new Scanner(System.in); System.out.println(excel(40)); } public static String excel(int columnNumber) { String result = ""; while(columnNumber>0) { int current=(columnNumber-1)%26; columnNumber=(columnNumber-1)/26; char character; character = (char) ('A' + current); result = character + result; } return result; }
10-15
1593
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-17