µù¥U
µn¿ý
º¶
½×¾Âª©³W
¸T¤î¦Cªí
»¡©ú
¦a¹Ï
¼Æ¦ì®Ñ»
¨p¤H®ø®§ (0)
¤½¦@®ø®§ (0)
½×¾Â¥ô°È (0)
¨t²Î®ø®§ (0)
¦n¤Í®ø®§ (0)
©«¤l®ø®§ (0)
³Â»¶®a±Ú°Q½×ª©ª©
»
Excelµ{¦¡°Ï
» ¤å¦rÀÉ¥HÂл\©Î¶K¤W¤è¦¡¶×¤JEXCEL«ü©wÄæ¦ì
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
µo©«
[µo°Ý]
¤å¦rÀÉ¥HÂл\©Î¶K¤W¤è¦¡¶×¤JEXCEL«ü©wÄæ¦ì
imp
µoµu®ø®§
¥[¬°¦n¤Í
imp
·í«eÂ÷½u
UID
8364
©«¤l
4
¥DÃD
2
ºëµØ
0
¿n¤À
12
ª÷¿ú
12
ÂI¦W
0
§@·~¨t²Î
win xp
³nÅ骩¥»
sp3
¾\ŪÅv
10
©Ê§O
¨k
¨Ó¦Û
»O¤¤
¦b½u®É¶¡
23 ¤p®É
µù¥U®É¶¡
2012-2-24
³Ì«áµn¿ý
2014-3-27
¤p¾Ç¥Í
©«¤l
4
¥DÃD
2
ºëµØ
0
¿n¤À
12
ÂI¦W
0
§@·~¨t²Î
win xp
³nÅ骩¥»
sp3
¾\ŪÅv
10
©Ê§O
¨k
¨Ó¦Û
»O¤¤
µù¥U®É¶¡
2012-2-24
³Ì«áµn¿ý
2014-3-27
1
#
¸õÂà¨ì
»
˧Ǭݩ«
¥´¦L
¦rÅé¤j¤p:
t
T
µoªí©ó 2014-3-26 16:43
|
¥u¬Ý¸Ó§@ªÌ
[µo°Ý]
¤å¦rÀÉ¥HÂл\©Î¶K¤W¤è¦¡¶×¤JEXCEL«ü©wÄæ¦ì
½Ð°Ýn±N¤å¦rÀɤº®e¶×¤J¦Ü«ü©wÄæ¦ì¤¤¡A¦]«ü©wÄæ¦ì¬Ò¦³¹ïÀ³pºâ¤½¦¡¡A¬G»Ýn¥H¶K¤W©ÎÂл\ªº¤è¦¡¶×¤J¦Ó¤£¬O¥H´¡¤J¤è¦¡¶×¤J¸ê®Æ¡]³o¼Ë«áÄòpºâ¤½¦¡·|¶Ã±¼¡^¡A½Ð°Ý¤U±¤º®en¦p¦óקï¤~¯à¹F¦¨©O¡H¡H
Sub OpenFile()
Dim strFilt As String
Dim strTitle As String
Dim strFname As Variant
Dim i As Integer
Dim strMsg As String
strFilt = "¤å¦rÀÉ®×,*.txt,"
strTitle = "¥´¶}Excel¤å¥ó"
strFname = Application.GetOpenFilename(FileFilter:=strFilt, Title:=strTitle, MultiSelect:=True)
If Not IsArray(strFname) Then
MsgBox "¨S¿ï¾Ü¤å¥ó¡I"
Else
For i = LBound(strFname) To UBound(strFname)
strMsg = strMsg & strFname(i) & vbCrLf
With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & strFname(i), Destination:=Range("$S$2"))
.Name = "18"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 950
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.TextFileFixedColumnWidths = Array(14)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
Columns("S:AG").Select
Range("S2").Activate
Selection.ColumnWidth = 3
End With
Next
MsgBox "¿ï¾Üªº¤å¥ó¬O¡G" & vbCrLf & strMsg
End If
End Sub
½Æ»s¥N½X
¦¬ÂÃ
¤À¨É
huijuang
µoµu®ø®§
¥[¬°¦n¤Í
huijuang
·í«eÂ÷½u
UID
16605
©«¤l
49
¥DÃD
3
ºëµØ
0
¿n¤À
74
ª÷¿ú
74
ÂI¦W
0
§@·~¨t²Î
windows
³nÅ骩¥»
XP
¾\ŪÅv
20
©Ê§O
¨k
¨Ó¦Û
¶³ªL
¦b½u®É¶¡
32 ¤p®É
µù¥U®É¶¡
2014-2-13
³Ì«áµn¿ý
2020-9-18
¤¤¾Ç¥Í
©«¤l
49
¥DÃD
3
ºëµØ
0
¿n¤À
74
ÂI¦W
0
§@·~¨t²Î
windows
³nÅ骩¥»
XP
¾\ŪÅv
20
©Ê§O
¨k
¨Ó¦Û
¶³ªL
µù¥U®É¶¡
2014-2-13
³Ì«áµn¿ý
2020-9-18
2
#
µoªí©ó 2014-3-28 10:51
|
¥u¬Ý¸Ó§@ªÌ
Sub test()
'¶}±Òtest.txtªºÀÉ®×
Open "c:\temp\test.txt" For Input As #1
i = 1
Do While Not EOF(1)
Input #1, a, b 'Ū¨útest.txtªº¸ê®Æ¡Aµù¡G³o¸Ìªº¸ê®Æ¨C¦æ¥u¦³2Ó¸ê®Æ¡A©Ò¥H¬O¥u¦³a,b
Range("a1").Offset(i - 1, 0) = a '±N¸ê®Æ©ñ¨ìa1¶}©l¥H¤U
Range("b1").Offset(i - 1, 0) = b '±N¸ê®Æ©ñ¨ìb1¶}©l¥H¤U
i = i + 1
Loop
Q:
Close #1 '§âtest.txtÃö±¼¡A³o¸Ì¨SÃöªº¸Ü¡A¤§«á¶}±Ò·|¥X²{¿ù»~
End Sub
½Æ»s¥N½X
°Ê©À¦¨¦]¿n¦]¦¨ªG by huijuang
TOP
ÀR«ä¦Û¦b :
¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªkn¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
EXCEL±MÄÝ°Q½×°Ï
Excel£¸¯ë°Ï
Excelµ{¦¡°Ï
¶i¶¥À³¥Î±M°Ï
OFFICE ¨t¦C
Word
PowerPoint
Access
Office¤£¤À°Ï
µ{¦¡»y¨¥
VB »P VB.Net
C »P C#
Java »P J#
µ{¦¡³]p¤£¤À°Ï
¸ê®Æ®w
ORACLE
My SQL
MS SQL
ºô¶³]p
ASP »P ASP.NET
PHP
PHP+MySQL ¤Jªù¹ê§@
JavaScript
FLASH / ActionScript
HTM/ HTML/ CSS
ºô¶³]p¤£¤À°Ï
¹q¸£»P§@·~¨t²Î
¹q¸£¦UºØµwÅé°Q½×
¤@¯ë¹q¸£³nÅé°Q½×
½×¾Â¨Æ°È
ºÞ²z¤½§i
§ë¶D¤Ï¬M
·s¤â´ú¸Õ
·R ¡E ¥Í¬¡
¤½¯q§G§iÄæ
¥Í¬¡»P·P°Ê
[¦¬Âæ¹¥DÃD]
[Ãöª`¦¹¥DÃDªº·s¦^´_]
[³q¹L QQ¡BMSN ¤À¨Éµ¹ªB¤Í]
¥Ó½Ð¤Í±¡Ãì±µ
Facebook¯»µ·