试试这样
If sheet(i ,1).Text = "已缴合计" Then Dim aa As String = sheet(i, 10).text aa = aa.Replace(vbcrlf, chr(11)) aa = aa.replace(chr(13), chr(11)) aa = aa.replace(chr(10), chr(11)) dr("第一行") = aa End If