I need a java method that takes in an integer and then increments it and gives you the respective alpha character. Something like this:
public String getAlpha(Integer number) {
...
}
So if I pass the number value equal 0 then it should increment and return the letter a. If I pass it 25 then it should return the letter z. If I pass it the number 26 then it should return aa. If I pass it the number 27 then it should return ab and so on.
The alpha’s pretty much simulate the way excel sheet columns are represented, all I need to do is get the alpha value from a method by passing it a number. There is no set limit except the String that gets returned from getAlpha must be a maximum of 15 chars and a minimum of 1 char.
I believe this will do what you want, I don’t know if it can be done more efficiently: