- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 279
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-12-26
|
¦^´_ 7# kulisung - Sub ex()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- Set d2 = CreateObject("Scripting.Dictionary")
- fs = ThisWorkbook.Path & "\test.log" '¤å¦rÀɥؿý
- Open fs For Input As #1
- Do While Not EOF(1)
- Line Input #1, mystr
- If InStr(mystr, "- ") > 0 Then
- ElseIf InStr(mystr, "Time:") > 0 Then
- no = Trim(Replace(mystr, "Time:", ""))
- d(no) = ""
- ElseIf InStr(mystr, ":") > 0 Then
- n = Split(mystr, ":")(0)
- d2(n) = ""
- d1(no & Chr(10) & n) = IIf(d1(no & Chr(10) & n) = "", Trim(Replace(mystr, n & ":", "")), d1(no & Chr(10) & n) & Chr(10) & Trim(Replace(mystr, n & ":", "")))
- Else
- d1(no & Chr(10) & n) = d1(no & Chr(10) & n) & Chr(10) & mystr
- End If
- Loop
- Close #1
- [A1] = "Time"
- [B1].Resize(, d2.Count) = d2.keys
- r = 1
- For Each ky In d.keys
- r = r + 1
- Cells(r, 1) = ky
- For k = 1 To d2.Count
- Cells(r, k + 1) = d1(ky & Chr(10) & Cells(1, k + 1))
- Next
- Next
- End Sub
½Æ»s¥N½X |
|