- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
¦^´_ 3# kkooo15
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, a, FN, T$, T1$, R&, C&, s&
FN = "D:\test.txt"
Open FN For Output As #1
Arr = Sheets(1).[a1].CurrentRegion
For R = 1 To UBound(Arr)
If R = 1 Then a = Array(12, 80, 8, 7, 16, 18, 3) Else a = Array(80, 7, 40, 16, 18, 12, 40, 5, 20, 8, 18, 40)
For C = 2 To UBound(Arr, 2)
T = Arr(R, C - 1): T1 = Arr(R, C): If T = "" Then GoTo 99
Ept = a(s) - Len(T)
If Ept > 0 Then For j = 1 To Ept: Arr(R, 1) = Arr(R, 1) & " ": Next
Arr(R, 1) = Arr(R, 1) & T1
s = s + 1
99: Next C
s = 0: Print #1, Arr(R, 1)
Next R
Close #1
End Sub |
-
-
test.zip
(221 Bytes)
|