¨Ï¥Î Line Input #1, mystr ¤¤¤å¦r·|Åܦ¨¶Ã½X,½Ð°Ý¦³¤èªk§JªA¶Ü?
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
¨Ï¥Î Line Input #1, mystr ¤¤¤å¦r·|Åܦ¨¶Ã½X,½Ð°Ý¦³¤èªk§JªA¶Ü?
½Ð°Ý¦U¦ì¦³¹J¨ì¹L³o¼Ëªº°ÝÃD¶Ü?
Open myfile For Input as #1
Line input #1, mystr
Close #1
Y mystr ¦³¤¤¤å½X,³£·|Åܦ¨¤@³s¦êªº?¸¹,½Ð°Ý¥i¥H§JªA¶Ü?
|
|
V98
|
|
|
|
|
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
HsiehªO¥D:
§Úªº¤å¦rÀɬO±qVB²£¥Í¥X¨Óªº,±q°O¨Æ¥»¤¤¥i¥H¬Ý¨ì§¹¾ãªº¤å¦rÀÉ,¦ý¬O±qExcelŪ¶i¨Ó¹J¨ì¤¤¤å¦r·|Åܦ¨¶Ã½X.
myinx = 0
Open muti_f For Input As #1
Do Until EOF(1)
Line Input #1, mystr
myinx = myinx +1
mylist(myinx) = mystr
muti_count = muti_count + 1
Loop
Close #1
·|¬O³]©wªº°ÝÃD¶Ü? |
|
V98
|
|
|
|
|
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
HsiehªO¥D§A¦n:
¤£ª¾¹DVB¤¤ªº½s½Xªº¤è¦¡¬°¦ó,¦ý¬O¦pªG¬OUnicodeªº¸Ü,¦p¦óÂà´«¦¨Ansi ©O? |
|
V98
|
|
|
|
|
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-3-19 20:18 ½s¿è
¦^´_ 6# Hsieh
HsiehªO¥D§A¦n:
°ÝÃD¸Ñ¨M¤F,§ÚªºVBì©l³]©w¬O(UTF-8),ÁöµM³o¼Ë¥i¥H¦ý¬O¬O¤£¬O¨C¦¸³£n°µ³o¼ËªºÂà´«©O?
¥t¥~¦b Line Input ³oÃä¸Ñ¨M¤F,¦ý¬O·|¦b滙¤JÀɮרºÃä·|¥X°ÝÃD,³oÃä¾A¦X¥Î(UTF-8),¤£µM·|¶Ã½X.¶×¤JÀɮתºµ{¦¡¦p¤U:
With ActiveSheet.QueryTables.Add(Connection:=input_file, Destination:=Range("$A$1"))
.Name = "ªíÀY"
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SaveData = True
.AdjustColumnWidth = True
.TextFilePlatform = 65001
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)
.TextFileFixedColumnWidths = Array(2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
³o¤@¬qµ{¦¡±µ¨ü(UTF-8),¦ÓLine Input¨ºÃä«h±µ¨ü(ANSI)³Â·Ð§a,¤£¹LÁ`¬O§â°ÝÃD§ä¥X¨Ó¤F,ÁÂÁ§A!!
¥t¥~§A¬O§_ª¾¹DVB¥i¦³±±¨î¿é¥X½Xªº¤èªk¶Ü?ÁÂÁÂ!!
|
|
V98
|
|
|
|
|
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-3-19 23:16 ½s¿è
¦^´_ 6# Hsieh
HsiehªO¥D:
§Q¥Î Line Input # 滙¤JÀÉ®×,¬O¤£¬O¤Ó¦Ñ¦¡¤F,¥H«e¦n¹³¶Ã½X§xÂZ«Ü¦h¤H,±qOffice 2007 ¥H«á¦n¹³³Q§ïµ½¤F,¹³¥Î ActiveSheet.QueryTables.Add 滙¶i¨ÓªºÀÉ®×´N没°ÝÃD,·|¥Î Line input #, ¬O¦]¬°¨º¬O¤¤¶¡Àɪø«×¤£©T©w,¦Ó¥B¤£¬Onª½±µ¥á¨ì Worksheet ¥h, ©Ò¥H¥Î Line input #, ¤£ª¾¹D¦³没¨ä¥L¤èªk¥i¥H滙¤JÀÉ®×(¹³Åª´`§ÇÀɨº¼Ë), ¦Ó¥B¥i¥H±µ¨ü UTF-8 ªº? ÁÂÁÂ!! |
|
V98
|
|
|
|
|