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

[µo°Ý]½Ð°Ý¿é¥X¦¨.TXTÀɮɥi¥H«ü©w¦bTXTÀɤ¤ªº¦ì¸m¶Ü?

[µo°Ý]½Ð°Ý¿é¥X¦¨.TXTÀɮɥi¥H«ü©w¦bTXTÀɤ¤ªº¦ì¸m¶Ü?

½Ð°Ý®æ¬°¤j¤j¡G
EXCEL¿é¥X¦¨.TXTÀɮɡA¥i¥H«ü©w¨C¤@Ä檺¸ê®Æ¶}ÀY±q­þ¤@­Ó¦ì¸m¶}©l¶Ü?

¦]¬°¿é¥X³øªí»Ý¨D¡A©Ò¦³¸ê®Æ¦C¤¤¡A¨C¤@Ä檺¸ê®Æ¶}ÀYªº¦ì¸m¥²¶·¤@­P
¦]¸ê®Æªøµu¤£¤@¡A¤S§¨Âø¤¤¡B­^¤å»P¼Æ¦r
©Ò¥H¤£ºÞ§Ú¥ÎLen¡BLenB¥hºâ¦P¤@Äõªº³Ì¤jªø«×¡A¨ä¾l¸ÉªÅ¥Õªº¤è¦¡¬ÒµLªk¶êº¡
©Ò¥H·Q½Ð°Ý¦U¦ì¤j¤j¯à§_ª½±µ«ü©w°_©l¦ì¸m?
©ÎÁÙ¦³¨ä¥L¸Ñ¨M¤è¦¡?

·P®¦
ASUS

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-1-18 11:45 ½s¿è

¦^´_ 1# asus103


    §Ú¬O¤@­Ó·s¤â~ ¦ý¬O¦³²Â¤èªk¥i¥H«j±j¸Ñ¨M³o­Ó°ÝÃD
   
   ¦pªþ¥ó ¸ê®Æªøµu¤£¤@.rar (10.48 KB) °õ¦æ«á~ ¦A¦s¦¨¤å¦rÀÉ(tab¦r¤¸¤À¹j)

    ¨ä¥L¤j¤j¤]³\¦³§ó¦nªº³B²z¤è¦¡

   PS. ¥t¤@ºØ¤è¦¡¥i¬O¸ÕµÛ¦bACCESS¤¤ ±N¨C­ÓÄæ¦ì³]¦¨¦P¼Ëªº¤j¤p,¦A¶×¥X¦¨TEXTÀÉ,¤]¤@¼Ë¥i¥H¹F¨ì³o¼Ëªº®ÄªG
       ¤£¹L³o­Ó§Ú¨S¸Õ¹L,©p¥i¥H¸Õ¤@¤U
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2011-1-18 13:37): ½Ð¤W¶Ç§Aªº½d¨Ò»¡©ú

¦^´_ 2# hugh0620
hugh0620¤j¤j±z¦n
·PÁ±zªº¼ö¤ß¨ó§U
¨ä¹êÅý§Ú¶Ë¸£µ¬ªº¬O¤¤­^¤å²VÂø
¦]¬°¥þ§Î¡B¥b§Î­pºâªø«×¨Ã¤£¬Û¦P

¦A¦¸·PÁ±z
ASUS

TOP

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-1-18 15:37 ½s¿è

¦^´_ 3# asus103


    ¼Ó¥D~ ¦A¬Ý¬Ý~ ªþ¥ó~ ¸ê®Æªøµu¤£¤@7.rar (13.36 KB)

    À³¸Ó¥i¥H²Å¦X©pªº»Ý¨D~ ¤£¹L¼gªº«ÜÄê­Ë¬O¯uªº~
    ¦pªG¾A¦X~§Ú¬Û«H©p¥u­n§ï¦^°é´N¥i¥H¤F~
    §Ú´ú¸Õ¹LLEN»PLENB¦bEXCEL¨ç¼Æ¤¤»PVBA¤¤¨D¥X¨Óªº­È¬O¤£¤@¼Ë~
    ©Ò¥H~ ¦³¥[¤@­¶¥Î¨ç¼Æ¬O¥ý¨ú±oLENBªº­È,¦A±a¨ìVB¤¤¨Ï¥Î~
    §Ú¥u·|¥Î²Â¤èªk~  ©Ò¥H´N¤£­n¤Ó¶û±ó¤F~ µ¥¤j¤j­Ì¥Î§ó¦nªº¼gªk~ ©p´N¤£·|¬Ý¤£À´¤F~
    ¨ä¹ê§Úªº«ä¦ÒÅÞ¿è«Ü²³æ~
    1.¥þ«¬¤¤­^¤å³£¬O¨â­Ó¦r¤¸,©Ò¥H§Ú¦bEXCEL¥Î¨ç¼ÆLENB§â¦r¤¸¨D¥X~
    2.¦A¥ÎLEN¨D¥X¤£ºÞ¬O¥þ«¬©Î¥b«¬³£¬O¤@­Ó¦rºâ¤@­Ó¦r¤¸~
    3. lenb­È´îLENªº­È´Nª¾¹D¦³´X­Ó¦r¬O¥þ«¬,´X­Ó¦r¬O¥b«¬
   4.¦A«á³Ì¥ÎÆ[©À¥h§PÂ_µ{¦¡ªº¼gªk
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

totxt.rar (15.17 KB)
¤W¶Ç§Úªº¨Ò¤l
¤º§t¼Ð·Ç¿é¥XªºTXT
¦³³Ò¦U¦ì¶O¤ß¨ó§U
·P®¦¦A·P®¦
ASUS

TOP

¦^´_ 4# hugh0620
"VBA¦V«e½Ä"¤j¤j·PÁ±z
§Ú¤]·|¦A¦n¦n¬ã¨s±zªºµ{¦¡½Xªº
ÁÂÁÂ
ASUS

TOP

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-1-18 17:49 ½s¿è

¦^´_ 5# asus103


    §Ú¦³°µ¤F¤@¨Ç½Õ¾ã~  ¤£¹LÁÙ¬O¦³¨Ç¦a¤è¦³ÂI¿ù»~    ½Ð¬d¾\ªþÀÉ~ ¸ê®Æªøµu¤£¤@XC.rar (101.94 KB)
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 6# asus103
  1. Sub ex()
  2. Dim Ar()
  3. For Each A In [A1:D1]
  4. ad = Range(A, Cells(Cells.Rows.Count, A.Column).End(xlUp)).Address
  5.   ReDim Preserve Ar(s)
  6.   Ar(s) = Evaluate("MAX(LENb(" & ad & "))") '¬ö¿ý¦UÄ檺³Ì¤j¦r¤¸ªø«×
  7.   s = s + 1
  8. Next
  9. Open "ToText.txt" For Output As #1
  10. For r = 1 To Range("A" & Cells.Rows.Count).End(xlUp).Row
  11.    For i = 0 To 3
  12.      test = Cells(r, i + 1)
  13.      '¶i¦æ¥[¤JªÅ¥Õ¦r¤¸¡Aª½¨ì¦r¤¸ªø«×²Å¦X
  14.      Do Until Evaluate("LenB(""" & test & """)") = Ar(i) + 4 '4¬°Äæ¦ìªÅ¥Õ¶¡¹j
  15.      test = test & " "
  16.      Loop
  17.      mystr = mystr & test
  18.    Next
  19. Print #1, mystr
  20. mystr = ""
  21. Next
  22. Close #1
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh


    ¤j¤j¯u¬O¼F®`~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 8# Hsieh
Hsieh¤j¤j±z¦n¡G
±zªºµ{¦¡½X¯u¬O¯«¥G¨ä§Þªü
·P®¦

µ{¦¡½X¤¤³\¦h¨Æ¨Ã¤£©ú¥Õ¡AÁٽЫü±Ð
1.For Each A In [A1:D1]
  ad = Range(A, Cells(Cells.Rows.Count, A.Column).End(xlUp)).Address
  ad¤£¬OA1:D11¶Ü?¬°¦ó¨C¤@¦¸²¾°Ê¤@Äæ¦Ó¤£¬O¤@­ÓÀx¦s®æ
2.Ar(s) = Evaluate("MAX(LENb(" & ad & "))")
   ·Pı¤W¹³EXCEL¤¤°}¦Cªº¥Îªk¡A¦ý¹ê¦b´x´¤¤£¦í¬ªù©Ò¦b¡A¯à¸ÑÄÀ¤@¤U³o­Ó¥Îªk¶Ü?
3.Evaluate("LenB(""" & test & """)") ªº¥Îªk¤]¬Ý¤£À´
  §Ú§â¥¦§ï¦¨ LenB( test) «á³v¦æ°õ¦æ®ÉÁÙOK¡A¦ý³Ì«á¦ü¥GÅܦ¨µL½u°j°é¸õ¤£¥X¨Ó
  Evaluate()¤w¤j¤jªº¥Îªk¦ü¥G¥Nªí¨ç¼Æ¬O¶Ü?¦ý»¡©ú¤¤¥u¦³¥¦¬O"¤èªk"ªº¥Îªk
4.§Ú¥Îlenb()¦bµ{¦¡¤¤±o¨ìªº²Ä2Äæ³Ì¤j­È¬°26¡A¬°¦ó¤j¤j¯à±o¥¿½Tªº22

¬O§Úµ{«×¤Ó®t¤F¡A³o»ò¦h¬Ý¤£À´ªº¦a¤è
ÁٽФj¤j¦h¥[´£ÂI
·PÁ¦A·PÁÂ
ASUS

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD