Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Get Excel column name for given decimal number

by dasgar (Priest)
on Mar 26, 2020 at 21:19 UTC ( #11114689=note: print w/replies, xml ) Need Help??


in reply to Get Excel column name for given decimal number

You might be interested in the int2LATIN function from the Number::Latin module.

Alternatively, since you are using Win32::OLE to control Excel directly, there are methods for specifying a cell by using integers to specify a row and column. I don't remember the details and there are some situations where that method isn't available. That's why I consider Number::Latin to be indispensable when using Win32::OLE to control Excel.

Using your example of column number 703 (aka column AAA):

C:\>perl -E"use Number::Latin; say int2LATIN(703);" AAA C:\>perl -E"use Number::Latin; say latin2int('AAA');" 703

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-09-19 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?