Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Get excel column letter from number

by duelafn (Parson)
on Jul 26, 2016 at 13:10 UTC ( [id://1168562]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168562]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2026-03-16 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.