不是用控件,而是引用Excel对象库给你一个操作Excel的例子:Dim Excel As Excel.Application
Dim ExcelWBk As Excel.Workbook
Dim ExcelWS As Excel.WorksheetPrivate Sub StartExcel()
On Error GoTo err:
Set Excel = GetObject(, "Excel.Application")
Exit Sub
err:
Set Excel = CreateObject("Excel.Application") 
End SubPrivate Sub CreateWorkSheet()
Set ExcelWBk = Excel.Workbooks.Add 
Set ExcelWS = ExcelWBk.Worksheets(1) 
End SubPrivate Sub PopulateWorkSheet()
Dim col As Integer
Dim row As Integer
Randomize Timer ' Random, To generate random number.....
For col = 1 To 5 ' coloumn
   For row = 1 To 20 ' row
      ExcelWS.Cells(row, col) = Rnd() * 100 
   Next row
Next colEnd SubPrivate Sub FormatWorkSheet()
ExcelWS.Range("A1:E20").NumberFormat = "0.00"
End SubPrivate Sub SaveWorkSheet()
ExcelWBk.SaveAs "c:\windows\desktop\Demo.xls"
End SubPrivate Sub CloseWorkSheet()
ExcelWBk.Close
Excel.Quit
MsgBox "You can find the saved Excel Sheet on your desktop"
End Sub