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

[µo°Ý]§âExcel¸ê®Æ¬YÄæ¸ê®Æ¦s¨ì¥t¤@­Ó Txt ÀÉ®×

¦^´_ 1# cr123a
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, i As Integer
  4.     Set Rng = ActiveWorkbook.Sheets(1).Range("D1:D20")
  5.     i = 1
  6.     Do While Application.CountA(Rng.Columns(1)) > 0    '­pºâ½d³ò²Ä¤@Ä椺¦³¸ê®Æªº¦C¼Æ
  7.         With Workbooks.Add(1)
  8.             Rng.Copy .Sheets(1).Range("A1")
  9.             .SaveAs Filename:="D:\test\HABC-00" & i & ".tex", FileFormat:=xlUnicodeText, CreateBackup:=False
  10.             .Close True
  11.         End With
  12.         i = i + 1
  13.         Set Rng = Rng.Offset(20)  '©¹¤U¦ì²¾20¦C
  14.     Loop
  15. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD