Excel ColIndex 转 ColString

xiaoxiao2021-02-28  105

Public Function excelColIndexToStr(ByVal iCol As Integer) As String         If iCol < 1 Then             Return ""         End If         Dim sColStr As String = ""         While iCol > 0             iCol -= 1             sColStr = Chr((iCol Mod 26) + Asc("A")) & sColStr             iCol = (iCol - (iCol Mod 26)) \ 26         End While         Return sColStr     End Function
转载请注明原文地址: https://www.6miu.com/read-47717.html

最新回复(0)