I'm automating formula's using pythons XLWT library. I have column indexs, eg, 1,2,3,99, etc and would like to convert to A,B,C,D, AA,AB, etc.
Is there anything built into xlwt for this? Or should I just write my own function?
You can use xlrd
s helper function:
import xlrd
print xlrd.colname(56)
# BE
Strangely - there doesn't appear to be a direct equivalent in xlwt
or xlwt.Utils
(although this does have various helper functions for conversion of cells and names)
Going by the question's title - you can use:
>>> xlwt.Utils.rowcol_to_cell(5, 2)
'C6'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With