用ADO的SAVE,或者事先制作一个EXCEL模板,将他们导出。

解决方案 »

  1.   

    建立一个ADO连接到EXCEL,将记录一条一条的写进去,不过很笨呀。
      

  2.   

    TO: fraser01(王晓栋) 
    可否说明一个ADO的SAVE的用法及做法呢?
      

  3.   

    Dim xlApp As Excel.Application
    Dim xlBook As Excel.Workbook
    Dim xlSheet As Excel.Worksheet
        Screen.MousePointer = vbHourglass
        Set xlApp = CreateObject("Excel.Application")
        Set xlBook = xlApp.Workbooks.Add
        Set xlSheet = xlBook.Worksheets(1)
        'Begin fill data to sheet
        Dim i As Long
        Dim j As Integer
        With flx
            For i = 0 To .Rows - 1
                For j = 0 To .Cols - 1
                    xlSheet.Cells(i + 1, j + 1).Value = .TextMatrix(i, j)
                Next j
            Next i
        End With
        xlApp.Visible = True
        Screen.MousePointer = vbDefault
        Set xlSheet = Nothing
        Set xlBook = Nothing
        Set xlApp = Nothing