¥Hado¤è¦¡¡A±NcsvÀÉ©ñ¶i°}¦C¤¤¥X¿ù¡H(·í¤¤¦³^¤å¦r¥À)
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 2# joey0415
´£¨Ñ§A°Ñ¦Ò¡G- Sub CSV_Import()
- Dim ws As Worksheet, strFile As String
- Sheets("ÀɮצWºÙ").Select
- Cells.Clear
-
- Set ws = ActiveSheet 'set to current worksheet name
- ' strFile = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Please select text file...")
- ' §A¤]¥i¥Hª½±µ«ü©wÀɮצWºÙ
- strFile = ThisWorkbook.Path & "\9962.csv"
- With ws.QueryTables.Add(Connection:="TEXT;" & strFile, Destination:=ws.Range("A1"))
- .TextFileParseType = xlDelimited
- .TextFileCommaDelimiter = True
- .Refresh
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 1# joey0415 - Sub CSV_Import()
- Dim ws As Worksheet, strFile As String, i As Long
- Dim arr
-
- Sheets("ÀɮצWºÙ").Select
- Cells.Clear
-
- Set ws = ActiveSheet 'set to current worksheet name
- ' strFile = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Please select text file...")
- ' §A¤]¥i¥Hª½±µ«ü©wÀɮצWºÙ
- strFile = ThisWorkbook.Path & "\9962.csv"
- With ws.QueryTables.Add(Connection:="TEXT;" & strFile, Destination:=ws.Range("A1"))
- .TextFileParseType = xlDelimited
- .TextFileCommaDelimiter = True
- .Refresh
- End With
-
- arr = Range("A1:E" & Range("A" & Rows.Count).End(xlUp).Row)
- For i = LBound(arr, 2) To UBound(arr, 1)
- Debug.Print arr(i, 1) & ","; arr(i, 2) & ", " & arr(i, 3) & ", " & arr(i, 4) & ", " & arr(i, 5) & ";"
- Next i
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|