Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-01-27 07:20 GMT
Find Nodes?
    Voting Booth?