控制编码
Dim dlg As new OpenFileDialog
dlg.Filter = "文本文件|*.txt"
Tables("代发工资数据").StopRedraw
If dlg.ShowDialog = DialogResult.OK Then
Dim strs As String = FileSys.ReadAllText(dlg.FileName, Encoding.Default)
strs = strs.Replace(vblf,"")
Dim rs() As String = strs.Split(vbcr)
For i As Integer = 0 To rs.Length - 1
Dim cs() As String = rs(i).Split("^")
If cs.Length > 9 Then
Dim dr As DataRow = DataTables("代发工资数据").Addnew()
dr("项目") = cs(0)
dr("单位代码") = cs(1)
dr("单位名称") = cs(2)
dr("新应发项") = cs(9)
End If
Next
End If
Tables("代发工资数据").ResumeRedraw