1. '列号转字母(列名) Function Num2Name(ByVal ColumnNum As Long) As String On Error Resume Next Num2Name = "" '超出范围返回空,如调用Num2Name(100000) Num2Name = Replace(Cells(1, ColumnNum).Address(0, 0), "1", "") 'Cell.Address用来返回单元格的地址,参数(0,0)
Private Sub Worksheet_SelectionChange(ByVal Target As Range) '可以直接sub(),不然选择就会触发vba Dim rows_count As Integer Dim rows_id As Integer Dim column_count As Integer Dim column_id As Integer column_count = Selection.Columns.Count '返回选择区域列数
1. 将 互换 Excel 列号(数字/字母) Public Function excelColumn_numLetter_interchange(numOrLetter) As String Dim i, j, idx As Integer Dim letterArray letterArray = Array("A", "B", "C", "D", "E", "F", "G
zexcel_cell_column 类型是INT4 FUNCTION ZGET_EXCEL_COL. *"---------------------------------------------------------------------- *"*"本地接口: *" IMPORTING *" REFERENCE(I_COL) TYPE I *" EXPORTING *" REFERENCE(E_COL) TYPE C *&quo