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

[µo°Ý] ¤p§Ì·Q±Ð¦U¦ì°ª¤â¦³Ãö©ó§ì¨ú¦h­Ó*.CSV ¤ºªº³¡¥÷¼Æ¾Ú

¦^´_ 12# leoman0002

¤£¬O«ÜÀ´¹ïÀ³Ãö«Y¡A´ú¸Õ¬Ý¬Ý®t²§¦b­þ?
  1. Sub ex()
  2. fd = ThisWorkbook.Path & "\"
  3. fs = Dir(fd & "*.csv")
  4. Do Until fs = ""
  5. With Workbooks.Open(fd & fs)
  6.    With .Sheets(1)
  7.    lot = Replace(.[B6].Value, "'", "")
  8.    lin = Replace(Split(lot, "-")(0), Mid(Split(lot, "-")(0), 3, 5), "")
  9.    ps = Split(lot, "-")(1)
  10.    drv = .[D4].Value
  11.    tm = IIf(.[H12] = "Bef", "[Before]", "[After]")
  12.    ts = .[F12].Value
  13.    ar1 = Array(lot, lin, ps)
  14.    ar2 = Array(drv, tm, ts, ts)
  15.    Set ar3 = .[F21:F24]
  16.    Dim ar(24)
  17.    For i = 27 To 34
  18.       For j = 1 To 3
  19.         ar(s) = .Cells(i, j * 2).Value
  20.         s = s + 1
  21.       Next
  22.     Next
  23.    End With
  24.    With ThisWorkbook.Sheets("Test Data")
  25.    Set a = .[A65536].End(xlUp).Offset(1, 0)
  26.    a.Resize(, 3) = ar1
  27.    a.Offset(, 6).Resize(, 4) = ar2
  28.    a.Offset(, 10) = ar3(1, 1)
  29.    a.Offset(, 17) = ar3(2, 1)
  30.    a.Offset(, 18) = ar3(3, 1)
  31.    a.Offset(, 19) = ar3(4, 1)
  32.    a.Offset(, 20).Resize(, 24) = ar
  33.    End With
  34.    .Close 0
  35. End With
  36. fs = Dir
  37. Loop
  38. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

©êºp§Ú¤£¤Ó·|¾ã²z¸ê®Æ =.= §Ú¤£ª¾¹D«ç»ò»¡©ú¤~¦n¡A§Ú§â¬ÛÃöªº¹ïÀ³¥´¦bEXCEL ³øªí¸Ì

¨ä¹ê¥H«e¦³¤H¼g¡A¦ý¬O«o¬O§tAccess ¸ê®Æ®w¤è¦¡¼g¡A§Ú­Ìªº¹q¸£..¥u­ã¥Î"WORD & EXCEL "
³Ì«á...§Ú­ÌÁÙ¬O¥Î¶Ç²Îªº"¤â¤u"....§Æ±æ¤j®a¯àÀ°À°¦£ ÁÂÁÂ

PS:¦pªG®³Access ¸ê®Æ®wª©§ï¦¨¤£¥ÎAccess ¸ê®Æ®wªº¤è¦¡·|¤£·|§ó³Â·Ð?

¸ê®Æ¶×¶°.rar (23.42 KB)

¦n¥i·RªºÄ_Ä_

TOP

¦^´_ 10# leoman0002

½Ð»¡©ú¹Ï¤ù¬õ®Øªº¸ê®Æ¸Ó¦p¦ó¹ïÀ³?

   
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

http://cht.tw/x/wa4z0  ¤U¸ü¦ì¸m

½×¾Âªº¾Þ§@ÁÙ¤£¤Ó¼ô...¥Î°ª¯Å¼Ò¦¡¥´ªº¶WÃìµ² =.= ³£¨S¥X¨Ó
¦n¥i·RªºÄ_Ä_

TOP

RE: ¤p§Ì·Q±Ð¦U¦ì°ª¤â¦³Ãö©ó§ì¨ú¦h­Ó*.CSV ¤ºªº³¡¥÷¼Æ¾Ú

¥»©«³Ì«á¥Ñ leoman0002 ©ó 2013-4-23 12:52 ½s¿è

§ó¥¿¤@¤U >"< §Æ±æ¦U¦ì¤j¤j¯à°÷¦³ªÅÀ°§Ú¬Ý¤@¤U  

³o¬O§Ú¥Ø«e¨Ï¥Îªº¥¨¶°(±`±`·|Åý¹q¸£·í¾÷)
³o¬Ocsv À£ÁYÀÉ  


¥Î½×¾Â¤W¶Çªº¤è¦¡±`±`¥X¿ù¡A§Ú¼È®É¥ý¥Î¶³ºÝµwºÐ¤èªº¦¡¡A³y¦¨¤£«K½Ð¦h¥]²[
¦n¥i·RªºÄ_Ä_

TOP

¦^´_ 7# Hsieh


    §Ú¤w¸g¤â°Ê±N­È¶ñ¤J"¸ê®Æ¶×¾ã.xls" ¡A§Ú´Nª¾¹D§Úªí¹Fªº·N«ä·|Åý¤H¬Ý¤£À´ :Q

§Æ±æmark15jill ¤j¤j ¦³ªÅÀ°§Ú¬Ý¤@¤U ^^  ·P¿E¤£ºÉ ^^

¸ê®Æ¶×¾ã.rar (4.42 KB)

¦n¥i·RªºÄ_Ä_

TOP

¦^´_ 5# leoman0002

§A§â123.csv¤º­nŪ¨ú³¡¤À¸Ó¦p¦ó¹ïÀ³¶ñ¼g¨ì¸ê®Æ·J¾ã.xls
¥Î¤H¤u¶ñ¤J«á¤W¶Ç¡A¤~ª¾¹D§A¸ê®Æ­n«ç»òÀx¦s
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# mark15jill


    ¯u¤£¦n·N«ä¡A¦]¬°¯uªºÁÙ¤£¤Ó¼ô±x¾Þ§@³y¦¨¤j®aªº§xÂZ

¯uªº«Ü¯Ô¤ß¦Û¤v»¡©úªº·N«ä¤j®a¬Ý¤£À´ >"<
¦n¥i·RªºÄ_Ä_

TOP

¦^´_ 4# GBKEE


    §Ú¤£¤Ó·|»¡©ú¡A§Ú¶K¤W¤@­Ó¹Ï¤ù¡A¶À¦â¼Ð¥Üªº¬O§Ú»Ý­nªº¼Æ¾Ú¡ACSV ÀɧڦbPO¤å®É¦³ªþ±a¤W¤F

CSVÀɬO©T©wªº®æ¦¡¨S¦³¿ù¡A¦]¬°ÀɦW·|ÀHµÛ¤é´Á¤£¦P¦Ó¦³©Ò§ïÅÜ¡A©Ò¥H¿ý»sªº¥¨¶°¨S¿ìªk¥Î(¥\¤O¤£°÷)

¤@¦¸§ì¨ú¦h­ÓCSV¨Ã±N¨ä­È¶×¤J¸ê®Æ¶×¾ãxls EXCEL Àɤ¤¤£ª¾¥i¤£¥i¦æ!!

123.JPG (209.96 KB)

123.JPG

¦n¥i·RªºÄ_Ä_

TOP

¦^´_ 2# leoman0002
CSVªº¸ê®Æ¬O©T©wªº¶Ü?
¬O­þ¨Ç¼Æ¾Ú­n¶K¤W¸ê®Æ¶×¾ãxls.xls¦ó³B,­n»¡©ú°Ú.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD