- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
½Ð°Ý¦p¦ó±N¦sÀɦpªí®æ¤@¼Ë¦p¤U¹Ï¤@¼Ë¡AÁÂÁÂ
wufonna µoªí©ó 2014-9-19 20:40 - Sub Trans()
- Dim myRng As Range
- Dim i%, j%
- Dim MyTxt$, filename$
- Dim aLen()
-
- aLen = Array(8, 16, 16, 16, 16, 16, 16)
- Set myRng = Range("A1").CurrentRegion '©w¸qn§ì¨úªº½d³ò
-
- '©w¸qÀɦW¬°®É¶¡
- filename = ThisWorkbook.Path & "\" & Format(Now(), "yyyymmddhhmmss") & ".txt"
- '¶}±ÒÀÉ®×¼g¤J¡AY¸ô®|¤¤¥¼¦³¸ÓÀÉ®×·|create¤@Ó
- Open filename For Output As #1
- '²Ä¤@¦C¤£§ì¶i¨Ó¡A¤@ª½¨ú¨ì³Ì«á¤@¦C
- With myRng
- For i = 1 To .Rows.Count
- MyTxt = ""
- For j = 1 To 7
- MyTxt = MyTxt & Left(.Cells(i, j) & Space(16), aLen(j - 1) - Len(.Cells(i, j)) * -(i = 1))
- Next
- Print #1, MyTxt
- Next
- End With
- Close #1
- MsgBox ("¦sÀɦ¨¥\! ")
- End Sub
½Æ»s¥N½X
testtxt-a.zip (14.25 KB)
|
|