呃……代码这样写。测试有效。
For Each dr As DataRow In DataTables("表A").DataRows
Dim data As String = dr("第一列")
Dim catchs As New System.Text.RegularExpressions.Regex("[\u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396]+(/\u5428){1}")
Dim mc As System.Text.RegularExpressions.MatchCollection = catchs.Matches(data)
If mc.Count <> 0 Then
Dim val As String = mc(0).Value.SubString(0, mc(0).Value.IndexOf("/")) '得到的大写数值
Dim chs As String = "零壹贰叁肆伍陆柒捌玖"
Dim nbs As String = "0123456789"
Dim num As Double = 0
Select Case val.Length
Case 1
num = nbs(chs.IndexOf(val)).ToString() * 100
Case Else
If val(0) = "零" Then
For i As Integer = 1 To val.Length - 1
num = num + nbs(chs.IndexOf(val(i))).ToString() * 10 ^ (2-i)
Next
Else
For i As Integer = 0 To val.Length - 1
num = num + nbs(chs.IndexOf(val(i))).ToString() * 10 ^ (val.Length-i)
Next
End If
End Select
dr("第二列") = num
End If
Next
[此贴子已经被作者于2012-10-24 12:00:46编辑过]