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

filesys.createTextFile(¦p¦ó¥Îwrite¤~¯à¼g¨ìB1Àx¦s®æ)

filesys.createTextFile(¦p¦ó¥Îwrite¤~¯à¼g¨ìB1Àx¦s®æ)

·PÁ¦U¦ì¤j¤j¤w¸g¼g¥X¨Ó¥i¥H¥ÎLF´«¦æ¤F
¦ý¬O...­n¦p¦ó¼g¦bB1ªº¦ì¸mªü?
§Ú¼g§¹ªºµ{¦¡·|Åܦ¨A1:A193³£¦³­È
¦ý­ì¥»ªºSHEET1¬OA1:G7³£¦³­È
¨ä¥L¬OA8:A193
write­n¦p¦ó¼g¤~¯à¼g¦bB1ªü?

Sub Macro1()
'

'

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

    rec = 1

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

    Do While I <= OO


    AB = ThisWorkbook.Sheets("Sheet1").Cells(rec, 1).Value

      rec = rec + 1
      I = rec
      a.write AB & Chr(10)
                  
    Loop
   
   
        a.Close
'
End Sub
PKKO

§Ú¦b¤½¥qµLªk¤WÀÉ

°²³]§Ú­ì¥»¶}±ÒªºexcelÀɦW¬°(­ì©l)
§Ú·Q±N­ì©lªºEXCEL¡GA1:G10 & A11:A193¥þ³¡½Æ»s¨ì¥t¥~¤@­ÓÀÉ®×(·sÀÉ®×)
¦ý§Úµo²{¥u¯à±N­ì©lªºDATA¿é¥X¨ì·sÀɮתºAÄæ¡A
ÁöµM¥i¥H±N­ì©lªºBÄæ½Æ»s¡A¦ý¤´µM¥u¯à¿é¥X¨ì·sÀɮתºAÄæ¦ÓµLªk¥Î¦bBÄæ

²³æÁ¿¡G·sÀɮתºBÄæ³£¬OªÅ¥Õªº¡A¥u¦³AÄ榳DATA
PKKO

TOP

¤W­Óªþ¥ó¨Ó¬Ý¬Ý
ss

TOP

¦^´_ 2# sunnyso


§Ú¬ÝÀ´¤F§A¼gªºªF¦è
¨º­Ó¥u¥Nªí§â§ÚSHEET1ªºAÄæ©Î¬OA~NÄæ¼g¤J
¦ý¬O¿é¥XªºÀÉ®×ÁÙ¬O¥u·|¦bAÄæ¦Ó¤w¤£·|¿é¥X¨ìBÄæ...
PKKO

TOP

¦^´_ 2# sunnyso


    ¬Ý¤£¤ÓÀ´­C¡A­n¦p¦ó¼g¤J§Úªº¥¨¶°¤ºªü?
    §ä¤£¨ì´¡¤Jªº¦a¤è= =
Sub Macro1()
'

'

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

    rec = 1

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

    Do While I <= OO


    AB = ThisWorkbook.Sheets("Sheet1").Cells(rec, 1).Value

      rec = rec + 1
      I = rec
      a.write AB & Chr(10)
                  
    Loop

   
        a.Close
'
End Sub
PKKO

TOP

cells(rec,1) where 1 means column A.
2 - column B
ss

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD