Dim xlsApp As Excel.Application
Dim xlsBook As Excel.Workbook
Private Sub Command1_Click()
Dim I, J As Integer
Dim A(500, 2)
Set xlsApp = Excel.Application
xlsApp.Visible = False
'假设Excel文件在:D:\Book1.xls
Set xlsBook = xlsApp.Workbooks.Open("D:\Book1.xls")
For I = 1 To 500
For J = 1 To 2
A(I - 1, J - 1) = xlsapp.cells(I, J)
Next J
Next I
'以下是退出Excel
xlsBook.Close (False)
xlsApp.Quit
Set xlsApp = Nothing
'=================================
'Excel中的500×2的数据已读入到数组A()中,以下可以添加你要运算的代码。
'=================================
End Sub
你看看链接中的例子,你的问题应该也能解决
http://social.msdn.microsoft.com/Forums/zh-CN/vbasiczhchs/thread/be4a2dd5-4397-4741-9548-d10d651244b7