- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
- Sub yy()
- '¤Þ¥ÎMicrosoft Scripting Runtime
- Application.ScreenUpdating = False
-
- Dim fso As Scripting.FileSystemObject
- Dim myTxt As Scripting.TextStream
- Dim myfile As String, myname$
- Dim i As Long, j%
-
- ActiveSheet.Cells.Clear
- myfile = Application.GetOpenFilename("text files (*.txt),*.txt", , "°O¨Æ¥»¤å¥ó") '¿ï¾Ü¤å¥ó¦W
- Set fso = New Scripting.FileSystemObject
- Set myTxt = fso.OpenTextFile(Filename:=myfile, IOMode:=ForReading)
- With myTxt
- i = 1: j = 1: myname = "sheet" & j
- Do Until .AtEndOfStream
- Sheets(myname).Cells(i, 1) = .ReadLine
-
- i = i + 1
- If i = 65530 Then
- j = j + 1
- If j > 3 Then
- Sheets.Add after:=Sheets(myname)
- End If
- myname = "sheet" & j
- i = 1
- End If
- Loop
- .Close
- End With
- End Sub
½Æ»s¥N½X ¨S¤å¥ó¥i´ú¸Õ¡A§A¦Û¤v´ú¸Õ¤@¤U§a |
|