Dim data As String = FileSys.ReadAllText(ProjectPath & "test.txt")
Dim fdr As DataRow
For Each str As String In data.Split(chr(13))
str = str.Replace(chr(10), "")
If str.length > 10 AndAlso str.SubString(4,1) = "-" AndAlso str.SubString(7,1) = "-" Then
Dim d As Date = str.SubString(0, 10)
fdr = DataTables("表A").Find("日期 = #" & d & "#")
If fdr Is Nothing Then
fdr = DataTables("表A").AddNew
fdr("日期") = str.SubString(0, 10)
End If
fdr("内容") += str & vbcrlf
Else
fdr("内容") += str & vbcrlf
End If
Next