我是靠谱客的博主 迅速飞机,这篇文章主要介绍adodb.stream读文件到数组的代码,现在分享给大家,希望可以做个参考。

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)

最后

以上就是迅速飞机最近收集整理的关于adodb.stream读文件到数组的代码的全部内容,更多相关adodb.stream读文件到数组内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(172)

评论列表共有 0 条评论

立即
投稿
返回
顶部