Although this question already has partial answers on StackOverflow, those answers are not associated with questions that have the proper name of the process / concept (bijective (base-k) numeration) in the title or among the tags. I anticipate that many answers will essentially be links to those existing answers.
This question is partially answered in How to list from A to Z in PHP, and then on to AA, AB, AC, etc
Bijective base-26 numeration can be used to compute column ID's in the scheme used in many spreadsheet programs, such as LibreOffice Calc, Lotus-123, VisiCalc(I think), ProCalc 3D, and others.
The following is R pseudocode (I'm not yet including the "raw" R code for the dependencies) for one solution. The return is an integer vector (little endian) whose elements are conceptually mapped to the arbitrary symbols used for the representation of the bijective numeration:
bijective.numeral <- function(n, symbols=26L) {
if (!is_among.contiguous.integers(n)) return (NULL)
if (n < 0) return(iNA)
if (n == 0) return(integer())
intermediate <- pseudo.log(n, symbols) %|% integer
# PREALLOCATE A VECTOR LONG ENOUGH FOR THE RESULT
m <- 0L
while (n) {
m <- 1L + m
intermediate[[m]] <- 1:symbols %[mod% n
n <- n %|% pred %/% symbols }
intermediate[1:m] }
LETTERS[16384 %|% bijective.numeral] %|% rev %|% `%//%`
# [1] "XFD"