- ©«¤l
- 104
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 114
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2021-6-21
- ³Ì«áµn¿ý
- 2021-8-24
|
¶}±Ò¦hÓcsvÅã¥Ü¶Ã½X
Sub Openfile()
fileToOpen = Application _
.GetOpenFilename("Excel Files(*.csv*), *.csv*", MultiSelect:=True)
num = 0
linenumber = 0
For num1 = 1 To UBound(fileToOpen)
num = num + 1
If fileToOpen(num) <> "False" Then
Open fileToOpen(num) For Input As #1 ' Open file for input
Do While Not EOF(1) ' Loop until end of file
linenumber = linenumber + 1
Line Input #1, line
arrayOfElements = Split(line, ",")
elementnumber = 0
For Each element In arrayOfElements
elementnumber = elementnumber + 1
Cells(linenumber, elementnumber).Value = element
Next
Loop
End If
Close #1 ' Close file.
Next num1
End Sub
³o¬O§Úªºµ{¦¡½X¡A¶}¥X¨Óªº³£¬O¶Ã½X
¥Î¤F¿ý¼v¥¨¶°
µo²{¸òTextFilePlatform¦³Ãö
¦³¤j¯«¥i¥HÀ°§Ú¶Ü |
|