in reply to Re: Get excel column letter from number
in thread Get excel column letter from number
Simple and elegant given that Excel has a max column of "XFD". I'd modify this to cache the column names and throw a fit if we go too far (eventually, the column cap will be increased or removed):
sub ltr_cached { state $ltr_cache = ["A".."ZZZ"]; return ($$ltr_cache[$_[0]] or die "column too big: $_[0]") }
Good Day,
Dean
|
---|
In Section
Cool Uses for Perl