ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±Ð±N.txtÂন¦Û©w®æ¦¡ªºEXCELÀÉ

½Ð±Ð±N.txtÂন¦Û©w®æ¦¡ªºEXCELÀÉ

­n±Nªþ¥óªºTEST.TXTÀɮסAÂনªþ¥óªºTEST.XLSÀÉ®×(¤é´Á¸ò®É¶¡¤À¶}©ñ)¡AÀ³¸Ó«ç¼Ë¼g¡A¦A¤TÁÂÁ¤j¤j!
TEST.rar (3.48 KB)

¦^´_ 1# cdkee
  1. Sub Ex()
  2.     Dim E As Range
  3.     Workbooks.OpenText Filename:="d:\test\test.txt", DataType:=xlDelimited, Tab:=True
  4.     With ActiveWorkbook.Sheets(1)
  5.         For Each E In .Range("B:B").SpecialCells(xlCellTypeConstants)
  6.             E = "'" & E
  7.         Next   '°j°é ¬°«O«ù®É¶¡®æ¦¡ ¥[¤W'¤å¦r®æ¦¡
  8.         .Cells.Replace ";", " "
  9.         .SaveAs "d:\test\test.xls"   '¦sÀÉ
  10.     End With
  11. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ cdkee ©ó 2010-10-8 02:13 ½s¿è

¦^´_ 2# GBKEE


    ·PÁª©¤j±Ð±Â¡A¸òª©¤jªº¡A¥X¿ù»~'1004'
¥H¤U¬O³Q¾É¤Jªº¨ä¤¤¤@¦æ¡A¬O©ñ¦bA1®æ¡A¥¼¯à¤À¶}©ñ¤JA1¦ÜG1®æ¡C
20100614 094400; 20084; 20084; 20084; 20084; 571
¤é´Á¤Î®É¶¡®æ¦¡¤]¥¼¯àÂàÅܦ¨¥H¤U¦Û©w®æ¦¡¡C
6/14/2010     09:44:00    20084    20084    20084    20084    571

TOP

¦^´_ 3# cdkee
©êºp¤W¦¸¦^´_¤£½TÃD·N§ó¥¿¦p¤U  §AªºÀɮצn¹³»PªÑ²¼¦³Ãö?
  1. Sub Ex()
  2.     Dim E As Range
  3.     Workbooks.OpenText Filename:="d:\test\test.txt" ', DataType:=xlDelimited, Tab:=True
  4.     With ActiveWorkbook.Sheets(1)
  5.         For Each E In .Range("A:A").SpecialCells(xlCellTypeConstants)
  6.             With E
  7.                 .Value = Mid(E, 5, 2) & "/" & Mid(E, 7, 2) & "/" & Mid(E, 1, 4)
  8.                  .NumberFormatLocal = "M/D/YYYY"
  9.                 .Offset(, 1) = Mid(.Offset(, 1), 1, 2) & ":" & Mid(.Offset(, 1), 3, 2) & ":" & Mid(.Offset(, 1), 5, 2)
  10.                 .Offset(, 1).NumberFormatLocal = "HH:MM:SS"
  11.             End With
  12.         Next
  13.         .Cells.Replace ";", " "
  14.         .SaveAs "d:\test\test.xls"   '¦sÀÉ
  15.     End With
  16. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ cdkee ©ó 2010-10-8 08:15 ½s¿è

¦^´_ 4# GBKEE


    ¦­¦wGBKEEª©¤j!¦¨¥\¤F!·PÁ¼ö¤ßªº±Ð¾É!
µ¹ª©¤j»¡¬ï¤F¡A¥¿¬O³á!¦ý¤p½ú¤£¦hª±ªÑ²¼!¥u¬O«O¦u¬£...«¢«¢!
ª©¤j¹ïVBA¬Û·í±M·~¡A¬O±Ð±Â¶Ü?
¥H¤U¬O¤p½ú§@¤F¾ã±ßµL¥ð¡A¤]¥u¬O©U§£¤@°ï!µ¹ª©¤j¨Ó­Ó«¢«¢¯º¦­À\~
txt to xls.rar (24.67 KB)

TOP

¤p½ú¯uªº²Ö·¥...¥ý­n¦^¥h¥ð®§!¦A¦¸·PÁÂ!¯¬ª©¤j¦³­Ó«¢«¢¯º¦­±á!

TOP

½Ð°Ý ­Y¥Lªº ¸ê®Æ®æ¦¡¥H","¬°°Ï¹j¦Ó¤£¬O¥Î"TAB"Áä,¬O§_¤]¥i¥H?ÁÂÁÂ
SEA

TOP

¦^´_ 7# sea08
¸Õ¸Õ¬Ý : ¤@¦¸¥u¯à­åªR¤@ºØ¦r¤¸
Workbooks.OpenText Filename:="d:\test\test.txt", OtherChar:=","

TOP

§ä¤F¦n¤[¡A­è¦n¦³»Ý­n~ÁöµM¬O©«~¨ÌµM·PÁÂ!

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD