Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
您可以使用xlrds 辅助函数:
xlrd
import xlrd print xlrd.colname(56) # BE
xlwt奇怪的是 - or中似乎没有直接等价物xlwt.Utils(尽管它确实具有用于转换单元格和名称的各种辅助函数)
xlwt
xlwt.Utils
按照问题的标题 - 您可以使用:
>>> xlwt.Utils.rowcol_to_cell(5, 2) 'C6'