|
4#
楼主 |
发表于 2008-9-25 15:48:03
|
只看该作者
Dim fso,myfile,Allstr
Set fso=CreateObject("scripting.FileSystemObject")
If fso.FileExists("C:\text.txt") then
Set myfile = fso.openTextFile("C:\text.txt",1,false)
Else
ReadLine = "文件不存在"
End If
Allstr=myfile.ReadAll()
myfile.Close()
set myfile = nothing
set fso = Nothing
Dim MyArray, Msg,str1
MyArray = Split(Allstr, ",", -1, 1)
MsgBox UBound(MyArray)
For i = 0 To UBound(MyArray)
str1=str1+MyArray(i) & Chr(13) & Chr(10)
Next
dim fso1, f
set fso1 =CreateObject("scripting.FileSystemObject")
set f = fso1.OpenTextFile("C:\test1.txt", 2, true)
f.Write(str1)
f.Close()
set f = nothing
set fso1 = nothing
??????????????????? |
|