Private Sub Form_Load() Dim data As String, buffer As String, Split As String Dim n As Long n = 0 Split = "," '你想要的分割符 Open "C:\Users\Admin\Desktop\1.txt" For Input As #1 Do While Not EOF(1) n = n + 1 Line Input #1, buffer If n Mod 4 = 0 Then data = data + buffer + vbCrLf Else data = data + buffer + Split End If Loop If Right(data, 1) = Split Then data = Left(data, Len(data) - 1) '对结果进行优化处理 Debug.Print data Close #1 End Sub
[此贴子已经被作者于2022-5-15 08:47编辑过]