物极必反,孙守刚,吉泽章
function filenum(filename,i)
dim st,s
set st= createobject("adodb.stream")
st.type = 2 '流类型为文本
st.mode = 3 '模式为读写
st.open
st.lineseparator=13
st.loadfromfile filename
do while not st.eos
s = split(st.readtext(), vbcrlf)
loop
'msgbox ubound(s) total
filenum=s(i)
st.close
end function
msgbox filenum("file.txt",2)
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
相关文章:
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
-
-
网友评论