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

createTextFile¦p¦ó¦s¦¨¬Û¦P®É¶¡®æ¦¡?

createTextFile¦p¦ó¦s¦¨¬Û¦P®É¶¡®æ¦¡?

¦U¦ì¤j¤j
§Ú¦b½×¾Â¤W¾Ç¨ì¦p¦ó±NÀɮצs¦¨LF´«¦æªºÀÉ®×
¦ý¬O...®É¶¡®æ¦¡«o¸ò­ì¥»¤£¤@¼Ë
                                     D1Àx¦s®æ¡õ    E1Àx¦s®æ¡õ
(­ì¥»)=>                12/12/2012        11:23:57
(¦sÀɧ¹²¦¤§«á)=>2012/7/24        0.742708333
°ÝÃD¦p¤U¡õ
1.­ì¥»ªºD1¤é´Á®æ¦¡¬Û¤Ï
2.­ì¥»ªºE1®É¶¡Åܦ¨­ì©l½X
¦]¬°¦sÀɧ¹²¦¬OLF´«¦æªºÀɮסA§ÚµLªk¦A¶i¦æ§ó§ï®æ¦¡....
¦³¤H¦³¿ìªk¶Ü?¨Ò¦p¡G¥ÎCH(X)¤§Ãþªº?ÁÙ¬O¦³¬Æ»ò¤èªk©O= =

¤U¤è¬O§Úªº¥¨¶°¤º®e

Set filesys = CreateObject("Scripting.FileSystemObject")
   
   Set a = filesys.createTextFile("C:\Documents and Settings\bobchiou\®à­±" & "\_10X\" & Filename & "_8_2.tpl", True)

    rec = 1

    OO = ThisWorkbook.Sheets("Sheet1").Range("J3")


    Do While I <= OO

    AB = ThisWorkbook.Sheets("Sheet1").Cells(rec, 1).Value
    CD = ThisWorkbook.Sheets("Sheet1").Cells(rec, 2).Value
    EF = ThisWorkbook.Sheets("Sheet1").Cells(rec, 3).Value
    GH = ThisWorkbook.Sheets("Sheet1").Cells(rec, 4).Value
    IJ = ThisWorkbook.Sheets("Sheet1").Cells(rec, 5).Value
    KL = ThisWorkbook.Sheets("Sheet1").Cells(rec, 6).Value
    MN = ThisWorkbook.Sheets("Sheet1").Cells(rec, 7).Value
   
   
      rec = rec + 1
      I = rec
      
    If I <= 11 Then
    a.write AB & Chr(9) & CD & Chr(9) & EF & Chr(9) & GH & Chr(9) & IJ & Chr(9) & KL & Chr(9) & MN & Chr(10)
    ElseIf I > 11 Then
    a.write AB & Chr(10)
    End If
                  
    Loop

   
        a.Close
PKKO

¦^´_ 2# Hsieh


    ¤w¸gOKÅo~·PÁ¤j¤j
PKKO

TOP

¦^´_ 2# Hsieh


    ·P®¦
¤j¤j¹ê¦b¼F®`
©ú¤Ñ¤W¯Z¸Õ¸Õ¬Ý
PKKO

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-8-28 08:54 ½s¿è

¦^´_ 1# PKKO

¥ÎÀx¦s®æªºTextÄÝ©Ê¡A¤£­n¥ÎValueÄÝ©Ê
¦p:
AB = ThisWorkbook.Sheets("Sheet1").Cells(rec, 1).Value
§ï¦¨
AB = ThisWorkbook.Sheets("Sheet1").Cells(rec, 1).Text
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD