Dim intFieldCount As Integer ' 字段数
Dim strFields As String ' 所有字段名
Dim i As Integer
Dim exlApplication As Object ' Excel 实例
Dim exlBook As Object ' Excel 工作区
Dim exlSheet As Object ' Excel 当前要操作的工作表
On Error GoTo LocalErr
Me.MousePointer = vbHourglass
'// 创建 ADO 记录集对象
Set adoRt = CreateObject(ADODB.Recordset)
With adoRt
.ActiveConnection = adoConn
.CursorLocation = 3 'adUseClient
.CursorType = 3 'adOpenStatic
.LockType = 1 'adLockReadOnly
.Source = strSQL
.Open
If .EOF And .BOF Then
ExportTempletToExcel = False










