Dim xlsApp As Object
Dim xlsWb As Object
Dim xlsWs As Object
Set xlsApp = CreateObject("Excel.Application")
Set xlsWb = xlsApp.Workbooks.Open(FileName)'要打开的文档路径
Set xlsWs = xlsWb.Worksheets(1)
xlsWs.cells(1, 1)="哇哈哈"'(行,列),注意:行和列都可用数字表示(1,A)等同于(1,1)
----注意了,下面是补充部分的回答-----
xlsWs.cells(1, 1)就是你要读取的数据啊,msgbox xlsWs.cells(1, 1) 看看
关闭文档:xlsWb.Close
退出Excel:xlsapp.Quit
阅读(730) | 评论(0) | 转发(0) |