- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-7-22 18:24 ½s¿è
¦^´_ 1# ilikeiceblue
¦p¦ó§ì¨ú¦hÓÀɮ׳sÄò¶×¤J,¥i·j°Q½×°Ï´M¬Ý¬Ý.- Sub Ex_¶×¤J¤å¦rÀÉ()
- Dim Fs As Object, d, s, i As Integer, ii As Integer
- txt = "d:\TEST\TEST.TXT" '¤å¦rÀɥؿý
- Set Fs = CreateObject("Scripting.FileSystemObject").OpenTextFile(txt, 1)
- d = Split(Fs.readall, Chr(10)) 'Chr(10) ¤À³Î¬°°}¦C
- Fs.Close 'Ãö³¬¤å¦rÀÉ
- With ActiveSheet
- .Cells.Clear '²M°£©Ò¦³¸ê®Æ
- For i = 1 To UBound(d) '°}¦Cªº²Ä2¤¸¯À¶}©l
- If Len(d(i)) = 0 Or i = UBound(d) Then 'Len(d(i)) = 0->ªÅ¥Õ¦C(nªº¬O¤W¤@Ó¤¸¯À)
- s = d(IIf(i < UBound(d), i - 1, i)) 'i = UBound(d) ->°}¦Cªº³Ì«á¤¸¯À
- s = Split(s, " ") '" " ¤À³Î¬°°}¦C
- '61566.1459848279 36804.0605 7070 62 ¦¹¦r¦ê¥H¨âªÅ®æ¤À¹j
- ii = Application.CountA(.[a:a]) 'pºâAÄ檺¸ê®Æ¼Æ
- ii = IIf(ii = 0, i, ii + 1) '¨S¦³=²Ä1¦C,¦³¸ê®Æ¶·©¹¤U¤@¦C
- .Cells(ii, "a").Resize(1, UBound(s) + 1) = s
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|