- ©«¤l
- 12
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 16
- ÂI¦W
- 0
- §@·~¨t²Î
- execl
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2015-12-20
- ³Ì«áµn¿ý
- 2021-3-8
|
¥»©«³Ì«á¥Ñ fusahe ©ó 2018-9-20 20:39 ½s¿è
Sub test()
Dim r%, i%
Dim arr, brr
Dim mypath$, myname$
mypath = ThisDocument.Path & ""
myname = "k1a.txt"
If Dir(mypath & myname) = "" Then
MsgBox mypath & myname & "¤£¦s¦b¡I"
Exit Sub
End If
Open mypath & myname For Input As #1
arr = Split(StrConv(InputB(LOF(2), 1), vbUnicode), vbCrLf)
Close #1
ReDim brr(0 To UBound(arr), 0 To 3)
For i = 0 To UBound(arr)
ss = Trim(arr(i))
crr = Split(ss, Chr(9))
For j = 0 To UBound(crr)
brr(i, j) = crr(j)
Next
Next
m = 2
n = 1
With ThisDocument
With .Tables(1)
For i = 0 To UBound(brr)
For j = 0 To UBound(brr, 2)
.Cell(m, n + j).Range.Text = brr(i, j)
Next
m = m + 2
If m > .Rows.Count Then
n = n + 4
m = 1
End If
If n > 5 Then
Exit Sub
End If
Next
End With
End With
End Sub
³oÓµ{¦¡½X¥u¯à¶×¤J¤@Óªí®æ,²Ä¤G¶´N¤£¦æ,¯à§_ק令¥Hk1a.doc¬°½d¥»,½Æ»s½d¥»¬°k1b.doc¨Ã±N¸ê®Æ¶×¤J¥Ñ¥ªÏ¥¥kªí®æ,¥H¸ê®Æ¦h¤Ö¨M©w¦h¤Öªí®æ. |
|