- ©«¤l
- 11
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 120
- ÂI¦W
- 0
- §@·~¨t²Î
- vista
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-6-22
- ³Ì«áµn¿ý
- 2011-3-29
|
¥»©«³Ì«á¥Ñ huang40 ©ó 2010-9-7 11:39 ½s¿è
¨ä¹ê°ÝÃD«Ü³æ¯Â(©ÎªÌ§Ú¦Û¥H¬°«Ü³æ¯Â)
¦bTEST1¤£¯à°õ¦æªº¥Dµ{¦¡¥h«o¦bTEST2¥i¥H°õ¦æ
¨º°ÝÃD·|¬O¥X¦bþ©O
Sub Test1()
Application.DisplayAlerts = False
dirPath = ThisWorkbook.Path & "\"
csvName = Dir(dirPath & "*.csv")
Do While csvName <> ""
Workbooks.Open (dirPath & csvName)
'
'(¥Dµ{¦¡)
'
ActiveWorkbook.Close savechanges:=False
csvName = Dir
Loop
Sub Test2()
Application.DisplayAlerts = False
Sheets(1).Activate
Columns("V").Clear
dirPath = ThisWorkbook.Path & "\"
csvName = Dir(dirPath & "*.csv")
n = 0
Do While csvName <> ""
n = n + 1
Cells(n, 22) = csvName
csvName = Dir
Loop
MsgBox "ÀÉ®×¼Æ=" & n
For i = 1 To n
csvfile = Sheets(1).Cells(i, 22)
Workbooks.Open (dirPath & csvfile)
'
'(¥Dµ{¦¡)
'
ActiveWorkbook.Close savechanges:=False
next i
End Sub |
|