code: public static String toAlpha(long i, boolean uppercase) {
          final int A = (uppercase ? 'A' : 'a') - 1;
          if (i < 0)
              throw new IllegalArgumentException(
                      "Argument must be non-negative, was " + i);
          if (i == Long.MAX_VALUE)
              throw new IllegalArgumentException(
                      "Argument must be smaller than Long.MAX_VALUE");
          i++;
          StringBuilder sb = new StringBuilder();
          while (i > 0) {
              long d = i%26;
              if (d == 0) d = 26;
              sb.append((char)(A + d));
              i = (i-d)/26;
          }
          return sb.reverse().toString();
      }
docs: Like {@link #toAlpha(long)}, but allows to choose lower case.
  @param i number to convert
  @param uppercase whether output will be in upper case
  @return aplha-index of {@code i}