How to convert a column number (e.g. 127) into an Excel column (e.g. AA)

前端 未结 30 2615
鱼传尺愫
鱼传尺愫 2020-11-22 00:35

How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.

Excel 2007 has a possible range o

30条回答
  •  轮回少年
    2020-11-22 01:08

    if you just want it for a cell formula without code, here's a formula for it:

    IF(COLUMN()>=26,CHAR(ROUND(COLUMN()/26,1)+64)&CHAR(MOD(COLUMN(),26)+64),CHAR(COLUMN()+64))
    

提交回复
热议问题