VBS怎么读取EXCEL中工作表的数目

2025-04-08 09:32:58
推荐回答(1个)
回答1:

Set oexcel=CreateObject("excel.application")
Set obook=oexcel.Workbooks.Open("c:\test\excel.xls")
Set osheet=obook.Sheets("sheet1")
'显示第一个工作表A1单元格数据

msgbox osheet.cells(1,1)
Set obook=Nothing
Set osheet=Nothing
oexcel.Quit