- file = "z.xlsx"
-
- currentpath = createobject("Scripting.FileSystemObject").GetFolder(".").Path
-
- Set Excel = CreateObject("Excel.Application")
- Excel.Visible = false
- set wb = Excel.Workbooks.Open(currentpath + "\" + file)
- set ws = wb.worksheets(1)
- text = ws.Cells(2,1).text
- wb.close()
- Excel.Quit
-
- wScript.echo text
复制代码
|