|
参与一下。。。- Sub ykcbf() '//2025.1.30
- Dim arr
- Application.ScreenUpdating = False
- Set d = CreateObject("Scripting.Dictionary")
- p = ThisWorkbook.Path & ""
- arr = Sheets("Sheet1").Range("a1").CurrentRegion
- For i = 1 To UBound(arr)
- If arr(i, 1) <> Empty Then
- st = Split(arr(i, 1), "/")
- s = st(1)
- If Not d.exists(s) Then Set d(s) = CreateObject("Scripting.Dictionary")
- d(s)(i) = arr(i, 1)
- End If
- Next
- For Each k In d.keys
- f = p & k & ".txt"
- Open f For Output As #1
- For Each kk In d(k).keys
- st = d(k)(kk)
- Print #1, st
- Next
- Close #1
- Next
- Set d = Nothing
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|