convert column number to 'Excel' column name
Arguments
- x
integer
vector- useLetters
character
vector of single-digit characters to use as digits in the resulting column name. Note that these characters can be of almost any length, with any content.- zeroVal
character
single-digit to be used wheneverx==0
, or as a prefix for negative values. In theory there should be no negative input values, but this basic mechanism is used to handle the possibility.- ...
Additional arguments are ignored.
Details
The purpose is to convert an integer
column number into a valid 'Excel'
column name, using LETTERS
starting at A.
This function implements an arbitrary number of digits, which may or
may not be compatible with each version of 'Excel'. 18,278 columns
would be the maximum for three digits, "A" through "ZZZ".
This function is useful when referencing 'Excel' columns via another
interface such as via openxlsx. It is also used by makeNames()
when the numberStyle="letters"
, in order to provide letter suffix values.
One can somewhat manipulate the allowed column names via the useLetters
argument, which by default uses the entire 26-letter Western alphabet.
See also
Other jam practical functions:
breakDensity()
,
call_fn_ellipsis()
,
checkLightMode()
,
check_pkg_installed()
,
color_dither()
,
exp2signed()
,
getAxisLabel()
,
isFALSEV()
,
isTRUEV()
,
jargs()
,
kable_coloring()
,
lldf()
,
log2signed()
,
middle()
,
minorLogTicks()
,
newestFile()
,
printDebug()
,
reload_rmarkdown_cache()
,
renameColumn()
,
rmInfinite()
,
rmNA()
,
rmNAs()
,
rmNULL()
,
setPrompt()