|
- Sub wayy()
- Dim wj As String
- Range("A2:L65536").ClearContents
- s = 0: s1 = 1
- For Each wj In Array("重点.txt", "指定.txt", "普通.txt")
- s = s + 1
- s2 = 0
- Open ThisWorkbook.Path & "" & wj For Input As #s
- Do While Not (EOF(s))
- Line Input #s, n
- s2 = s2 + 1
- If s2 > 1 Then
- Y = Split(n, ",")
- If UBound(Y) > 1 Then '非空行
- s1 = s1 + 1
- For i = 0 To UBound(Y)
- Cells(s1, i + 1) = Y(i)
- Cells(s1, 21) = Right(wj, 12)
- Next i
- End If
- End If
- Loop
- Close #s
- Next
- End Sub
复制代码 这样试一下。 |
|