蓝老师,地址确实有数字。按您提示的方法我用在了“开户行及账号”列,拆分为“开户行”、“银行账号”两列。成功了代码如下'字符串分拆,一列分成两列
If e.DataCol.Name = "开户行及账号" Then '发生变化列
If e.DataRow.IsNull("开户行及账号") Then '是否为空
e.DataRow("开户行") = Nothing '如果为空,则清除
e.DataRow("银行账号") = Nothing '如果为空,则清除
Else
Dim dr As DataRow = e.DataRow
Dim s As String = dr("开户行及账号")
Dim p As String = "\d+"
Dim r As New System.Text.RegularExpressions.Regex(p)
Dim str() As String = r.Split(s)
dr("开户行") = str(0) '否则从开户行及账号列中提取开户行
dr("银行账号") = s.Replace(str(0),"")'否则从开户行及账号列中提取银行账号
End If
End If