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

[µo°Ý] ¦Û°Ê§ì¨ú«ü©w¸ê®Æ§¨©Ò¦³Àɮ׸ê®Æ

[µo°Ý] ¦Û°Ê§ì¨ú«ü©w¸ê®Æ§¨©Ò¦³Àɮ׸ê®Æ

1.PNG 2.PNG

½Ð±Ð¤@¤Uºô¤j­Ì¡A¦p¦ó¦b¡u¸ê®Æ¾É¤J¡vexcelÀɤº«ö¤U¡i¸ê®Æ¾É¤J¡j«ö¶s«á¡A¦Û°Ê§ì¨ú¡y´ú¸Õ¡z¸ê®Æ§¨¸Ìªº©Ò¦³Àɮ׸ê®Æ¨ì¡u¸ê®Æ¾É¤J¡vexcelÀÉ¡C


°ÝÃD¦p¤U¡G
1.¡y´ú¸Õ¡z¸ê®Æ§¨¸Ìªº©Ò¦³ÀɮצWºÙ¡A°£¤F¶}ÀY¡uTEST¡v¬O©T©w¥~¡A«á­±ªº¤é´Á¡B½s¸¹¨C¤Ñ³£·|¤£¤@¼Ë¡A©Ò¥H«D©T©wÀɦW¡C
2.¡y´ú¸Õ¡z¸ê®Æ§¨¸ÌªºÀɮ׫D©T©w3­Ó¡A¦³®É¥u·|¦³1­ÓÀɮסA¦³®É¥u¦³2­Ó¡A¦ý³Ì¦h´N3­Ó¡C
3. ¨C­ÓÀÉ®×°£¤F¼ÐÃD¤£»Ý§ì¨ú¥~¡A²Ä¤G¦C¥H¤U©Ò¦³¸ê®Æ§¡»Ý§ì¨ú¦Ü¡u¸ê®Æ¾É¤J¡vÀɹïÀ³Äæ¡A¦ý3­ÓÀɮ׸ê®Æ¨S¦³¤À¥ý«á¤W¤U¡B­þ­Ó¥ý­þ­Ó«á¡A¥u­n³v¤@§ì¨ú¨C­ÓÀɮ׸ê®Æ¨Ã«ùÄò¦V¤U±ÀÅ|§Y¥i¡C
¨Ò¦p:
¥u¦³1­ÓÀɮ׮ɡA±N¸ÓÀɲĤG¦C¥H¤U¸ê®Æ§ì¨ú¦Ü¡u¸ê®Æ¾É¤J¡vÀɲĤG¦C¥H¤U¶K¤W¡C
¦³2­ÓÀɮ׮ɡA¥ý§ì¨ú²Ä1­ÓÀɲĤG¦C¥H¤U¸ê®Æ¡A¦A§ì¨ú²Ä2­ÓÀɲĤG¦C¥H¤U¸ê®Æ¦Ü¡u¸ê®Æ¾É¤J¡vÀɲÄX¦C¥H¤U¶K¤W¡C¡]X¦C¬°²Ä1­ÓÀɳ̫á¤@µ§¸ê®Æ¤U¤@ªÅ¥Õ¦C¡^
¦³3­ÓÀɮ׮ɡA¥ý§ì¨ú²Ä1­ÓÀɲĤG¦C¥H¤U¸ê®Æ¡A¦A§ì¨ú²Ä2­ÓÀɲĤG¦C¥H¤U¸ê®Æ¡A¦A§ì¨ú²Ä3­ÓÀɲĤG¦C¥H¤U¸ê®Æ¦Ü¡u¸ê®Æ¾É¤J¡vÀɲÄX¦C¥H¤U¶K¤W¡C¡]X¦C¬°²Ä2­ÓÀɳ̫á¤@µ§¸ê®Æ¤U¤@ªÅ¥Õ¦C¡^




¥H¤W~~~~~~¦]¬°ºô¸ô¤W¤@ª½§ä¤£¨ì¬ÛÃöªºVBA¼gªk¡A©Ò¥H§Æ±æ¤j®v­Ì¥i¥H¼ö¤ßÀ°¦£

´ú¸Õ.rar (10.41 KB)
*¦v¤k¤@ªTµL»~*

  1. Option Explicit
  2. Sub test12()
  3.     Dim p As String
  4.     Dim f As String
  5.     Dim ws As Worksheet
  6.     Dim wb As Workbook
  7.     Dim r As Range
  8.      
  9.     p = "D:\TEMPWS\"  'CVSÀɮתº¸ê®Æ§¨
  10.      
  11.     f = Dir(p & "*.csv")
  12.     If f = "" Then Exit Sub
  13.     Set ws = Workbooks.Open(p & f).Sheets(1)
  14.      
  15.     f = Dir()
  16.     Do While f <> ""
  17.         Set wb = Workbooks.Open(p & f)
  18.         Set r = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1)
  19.         wb.Sheets(1).Cells(1).CurrentRegion.Offset(1).Copy Destination:=r
  20.         wb.Close
  21.         f = Dir()
  22.     Loop     
  23.     Application.Goto ws.Cells(1)     
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# idnoidno


    i¤j~~~~~~§A¦n¼F®`³á!!!!!!!!!¯uªº¬O«D±`«D±`«D±`·PÁ§A¼ö¤ßÀ°¦£³á~~~~~~~
*¦v¤k¤@ªTµL»~*

TOP

§O«È®ð¡A¥u¬O­è¦n¦³µª®×¥i¥Hµ¹§A°Ñ¦Ò¡AÀ°¨ì¦£¬O§ÚªººÖ®ð°Õ

TOP

¦^´_ 4# idnoidno

i¤j~~~~¤W¦¸«D±`·PÁ§Aªº¼ö¤ßÀ°¦£¡A¤£¹L¤p©f¤S¦³·sªº°ÝÃD·Q°Ý°Ý¬Ý¦³¨S¸Ñ¡A¥i¥H¤]½Ð§A¦AÀ°§Ú¬Ý¬Ý¶Ü¡H¸ò§A¤W¦¸À°§Ú¸Ñªº¦³Ãö¡A¥u¬OÅܦ¨¾É¤J¸ê®Æ®É§Æ±æª½±µ¾É¤J­ì°õ¦æÀÉ¡AµM«á........¦h¤F¤@°ï§Æ±æ¦Û°Ê°õ¦æªº°ÝÃD




¸ê®Æ¾É¤J.rar (13.65 KB)
*¦v¤k¤@ªTµL»~*

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD