以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]为什么这代码只有第一行值没有换行,其他行都有换行?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=142569)

--  作者:zto001
--  发布时间:2019/10/31 9:34:00
--  [求助]为什么这代码只有第一行值没有换行,其他行都有换行?
[求助]为什么这代码只有第一行值没有换行,其他行都有换行?

其他行的值就像下面这样

其他行值”


Dim 内容 As WinForm.TextBox = e.Form.Controls("内容")

Dim txt As String=内容.value
Dim txts() As String = txt .split(Chr(13)&Chr(10))
For I As Integer = 0 To txts.Length - 1

    If txts(I).Contains( Chr(13)&Chr(10))
        txts(I)=txts(I).Replace(Chr(13)&Chr(10),"")
    End If
    Dim 行 As Row=Tables("导入表").AddNew()
    行("运单编号")= txts(I)
    行.Save
Next

--  作者:有点蓝
--  发布时间:2019/10/31 9:39:00
--  
去掉换行符?

Dim txt As String= e.Form.Controls("内容").text
Dim 行 As Row=Tables("导入表").AddNew()
    行("运单编号")= txts.replace(vbcr,"").replace(vblf,"")
    行.Save