- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 257
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-27
|
¦^´_ 12# luke - Sub nn()
- Dim A As Range
- Set fso = CreateObject("Scripting.FileSystemObject")
- fd = ThisWorkbook.Path & "\"
- For Each A In Range("E2:E5")
- fn = fd & A & "\"
- fs = fn & A.Offset(, -2) & "\"
- If fso.FolderExists(fn) = False Then MkDir fn
- If fso.FolderExists(fs) = False Then MkDir fs
- fso.copyfile fd & "P01\" & A.Offset(, -3) & ".csv", fn & A.Offset(, -2) & ".csv", True
- fso.copyfile fd & "P01\" & A.Offset(, -3) & ".cbk", fn & A.Offset(, -2) & ".cbk", True
- Open fn & A.Offset(, -2) & ".csv" For Binary As #1
- n = FileLen(fd & "P01\" & A.Offset(, -3) & ".csv")
- Seek #1, n - 9
- For i = 1 To 8
- Put #1, , Asc(Mid(A.Offset(, -2), i, 1))
- Next
- Close #1
- Open fn & A.Offset(, -2) & ".cbk" For Binary As #1
- n = FileLen(fd & "P01\" & A.Offset(, -3) & ".cbk")
- Seek #1, n - 9
- For i = 1 To 8
- Put #1, , Asc(Mid(A.Offset(, -2), i, 1))
- Next
- Close #1
- Next
- End Sub
½Æ»s¥N½X |
|