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 '返回选择区域列数
症状如图: 上图中,行号列与checkbox 列融合了.解决方法是在datagrid 的 onLoadSuccess 事件中加入如下代码: var opts = $(this).datagrid('options'); if(opts.rownumbers){ var dgPanel = $(this).datagrid('getPanel'); var tdRownumber = dgPanel.find('.datagrid-header-rownumber').parent(); var
SELECT *, Row_Number() OVER (partition by deptid ORDER BY salary desc) rank FROM employee Row_Number()显示行号,加上partition by还能分组排序显示行号.就这么一句sql,每次忘记这个Row_Number()回头一看就什么都明白了.