- ©«¤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¦ó¼Æȸê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æȶ¡Åܦ¨¥H³r¸¹¤À¶}°Ï¹j?
¬O§_¶·¥ÎVBA¨Ó³]©w?
°ÝÃD1 ¤W±¼Æȸê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æȶ¡Åܦ¨¥H³r¸¹¤À¶}°Ï¹j¡A¦p¤U
1,2,3,4,5,6,7,8,9
°ÝÃD2 ¤W±¼Æȸê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æȶ¡Åܦ¨¥H³r¸¹¤ÎªÅ®æ(¥i³]©w)¤À¶}°Ï¹j¡A¦p¤U
1, 2, 3, 4,5,6,7,8,9
honching99 µoªí©ó 2011-9-25 23:33
°ÝÃD1 - ½Ð¦s¦¨ *.CSV Àɮ׮榡§Y¥i
°ÝÃD2 - ¤£ª¾§A¨Ò¤l¤¤¨CÓÀx¦s®æ¤¤¼Æ¦r«e±ªºªÅ®æ¼Æ¶q¬O§_¦³¤°»ò³W«ß?
©³¤U°²³]ªÅ®æ¼Æ¬°Àx¦s®æÈ´î 1- Sub nn()
- Dim iCols$
- Dim sStr$
- Dim lJ As Long
- Dim rTarget As Range
-
- Open ThisWorkbook.Path & "\123.txt" For Output As #1
- Set rTarget = Sheet1.Range("a1")
- Do Until rTarget = ""
- sStr = ""
- With rTarget
- iCols = .Parent.Cells(.Offset(0, 0).Row, Columns.Count).End(xlToLeft).Column
- For lJ = 0 To iCols - 1
- sStr = sStr & Space(.Offset(0, lJ) - 1) & .Offset(0, lJ) & ","
- Next lJ
- sStr = Left(sStr, Len(sStr) - 1)
- Print #1, sStr
- End With
- Set rTarget = rTarget.Offset(1, 0)
- Loop
- Close (1)
- End Sub
½Æ»s¥N½X |
|