| 发表于:2007-12-27 16:44:20 楼主 |
set xlapp = createobject("excel.application") set xlbook = xlapp.workbooks.open(.foundfiles(myindex + 1)) xlapp.visible = false set xlsheet = xlbook.sheets.item(1) xlsheet.activate 用上面的代码打开一系列的excel文件(.xls)可是却取不出数据来,但是这样写的话就可以了: workbooks.open .foundfiles(myindex + 1) 'application.visible = false 为什么呀!哪位朋友知道的话就告知一下吧,因为我的程序中其实是用第一种写法要好些的,只是不知道哪错了就是读不出数据来. |
|
|
|
|