split 转换 csv 输入空行如何解决
文本内是:d:\ra091222.ibl 773 IVYNET13100 999 2009-12-22 00:06:53 60.21.254.172 68.106.3.150 80 GET HTTP/1.1 200 0 46 572 273 2 /db3.rar - -
d:\ra091222.ibl 774 IVYNET13100 999 2009-12-22 00:06:53 60.21.254.172 68.106.3.150 80 GET HTTP/1.1 200 0 31 572 273 2 /db3.rar - -
。。。。。
现在想转换成csv文件格式,用逗号隔开
Dim stra As String, i As Long
Dim tArray() As String
stra = Text1.Text
tArray = Split(stra, " - -")
For i = 0 To UBound(tArray)
Open "log.csv" For Append As #1
tArray(i) = Replace((tArray(i)), " ", ",")
Print #1, tArray(i)
Close #1
为什么输入一行数据,会再输入一行空行,再输下一行数据
[ 本帖最后由 woa 于 2009-12-23 19:50 编辑 ]