Sub Main ()Dim ExcelApp Comme Excel.Application
Dim ExcelWkBook Comme Excel.Workbook
Dim ExcelWkSheet Comme Excel.Worksheet
Dim XLArray (10) As String
ExcelApp = New Microsoft.Office.Interop.Excel.Application
ExcelWkBook = ExcelApp.Workbooks.Open ("C: ExcelFileToRead.xlsx")
ExcelWkSheet = ExcelWkBook.Worksheets ("Sheet1")
XLArray (0) = ExcelWkSheet.Cells (1, 1) .value
XLArray (1) = ExcelWkSheet.Cells (1, 2) .value
XLArray (2) = ExcelWkSheet.Cells (2, 1) .value
XLArray (3) = ExcelWkSheet.Cells (2, 2) .value
MsgBox (XLArray (0))
MsgBox (XLArray (1))
MsgBox (XLArray (2))
MsgBox (XLArray (3))
ExcelWkBook.Close ()
ExcelApp.Quit ()
End Sub