
CODE: [Copy to clipboard]set ws=createobject("wscript.shell")
path=ws.currentdirectory
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(path & "\111.xls")
h=1
do until objExcel.Cells(h,2).Value="" '这里的2表示B列(遇到单元格为空值时就会退出...)
s=s & objExcel.Cells(h,2).Value & vbcrlf
h=h+1
loop
objExcel.Quit
msgbox s
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |