首先定义
Public xlApp As Excel.Application
Public xlBook As Excel.Workbook Public xlSheet As Excel.Worksheet然后创建对象
xlApp = CreateObject("Excel.Application") '创建EXCEL对象
xlBook = xlApp.Workbooks.Open("文件路径") '打开已经存在的EXCEL工件簿文件
xlSheet = xlBook.Worksheets("sheet1")