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

[µo°Ý] ¦p¦ó¼Æ­È¸ê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æ­È¶¡Åܦ¨¥H³r¸¹¤À¶}°Ï¹j?

[µo°Ý] ¦p¦ó¼Æ­È¸ê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æ­È¶¡Åܦ¨¥H³r¸¹¤À¶}°Ï¹j?

¦p¦ó¼Æ­È¸ê®ÆÀx¦s¦¨txt¤å¦rÀɮɡA¼Æ­È¶¡Åܦ¨¥H³r¸¹¤À¶}°Ï¹j?
¬O§_¶·¥ÎVBA¨Ó³]©w?

¦^´_ 2# luhpro


    ·PÁ±z´£¨Ñ¤è¦V¡AÁöµMÁ٧ˤ£¤ÓÀ´¡A¦ýÁÙ¬O¬Û·í·PÁÂ!!!

TOP

¦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
  1. Sub nn()
  2.   Dim iCols$
  3.   Dim sStr$
  4.   Dim lJ As Long
  5.   Dim rTarget As Range
  6.   
  7.   Open ThisWorkbook.Path & "\123.txt" For Output As #1
  8.     Set rTarget = Sheet1.Range("a1")
  9.       Do Until rTarget = ""
  10.         sStr = ""
  11.         With rTarget
  12.           iCols = .Parent.Cells(.Offset(0, 0).Row, Columns.Count).End(xlToLeft).Column
  13.           For lJ = 0 To iCols - 1
  14.             sStr = sStr & Space(.Offset(0, lJ) - 1) & .Offset(0, lJ) & ","
  15.           Next lJ
  16.           sStr = Left(sStr, Len(sStr) - 1)
  17.           Print #1, sStr
  18.         End With
  19.         Set rTarget = rTarget.Offset(1, 0)
  20.       Loop
  21.   Close (1)
  22. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD