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

[µo°Ý] ±Nexcel¤¤ªº¤é´Á¶×¥X¦¨«ü©w®æ¦¡ªºtxtÀÉ®×

[µo°Ý] ±Nexcel¤¤ªº¤é´Á¶×¥X¦¨«ü©w®æ¦¡ªºtxtÀÉ®×

½Ð°Ý§Ú¦³2­ÓexcelÀÉ®× ·Q­n¶×¥X¦¨ ansi ®æ¦¡ªºtxtÀÉ
¸Õ¤F¨â¤Ñ³£¤£¯à¦¨¥\  ¦]¬°¦baÄ檺¦a¤è ¬O¥H"¤é´Á ®É¶¡"ªº®æ¦¡¦s©ñ
¦p¡G          2014/01/31  09:45:00 PM
§Ú­n¿é¥X¦¨ "2014/01/31 09:45"³o¼Ëªº®æ¦¡

§Ú¥Î¿ý¥¨¶°µM«á¸ê®Æ­åªR§â¤é´ÁÂন¤å¦r ³Ì«á¿é¥Xªº¤å¦rÀÉ«oÅܦ¨¡G
               "1/31/2014 1:45:0"
¤£ª¾¬O¨º¸Ì¥X¤F¿ù? ¥t¥~¿é¥XtxtÀɪº®É­Ô ¯à¤£¯à¥u¿é¥X·í¤Ñªº¸ê®Æ ¬Q¤Ñ¥H«eªº¤£­n?

¥H¤U¬O§Úªº¥¨¶°¡G

Sub Macro2()
'

' §Ö³tÁä: Ctrl+Shift+Q
'
   
Dim AA, BB, CC, DD, EE, FF, GG As String
Dim a As Integer
   
  
Workbooks.Open Filename:="C:\Documents and Settings\Administrator\®à­±\1.csv"
    Columns("B:B").Select
    Selection.Insert Shift:=xlToRight
    Columns("A:A").Select
    Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
        FieldInfo:=Array(Array(0, 2), Array(17, 1))

Open "c:\txtmin5\tw100.txt" For Output As #1
For a = [a65536].End(xlUp).Row - 60 To [a65536].End(xlUp).Row

    AA = Cells(a, 1)
    BB = Cells(a, 3)
    CC = Cells(a, 4)
    DD = Cells(a, 5)
    EE = Cells(a, 6)
    FF = Cells(a, 7)
   
   
        mystr = AA & " " & BB & " " & CC & " " & DD & " " & EE & " " & FF
        
    Print #1, mystr
   
Next a
   
Close #1

ActiveWindow.Close

End Sub

ªþÀɬO¥¼³B²zªºÀɮ׸ò­n¿é¥XtxtÀɪº¥Ø¼Ð®æ¦¡ 1.rar (6.52 KB)
³Â·Ð¤j®a¤F ÁÂÁÂ

¦^´_ 1# ach594
AA = Format(Cells(a, 1).value, "yyyy/mm/dd hh:mm")
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD