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

[µo°Ý] ±N¸ê®Æ¼g¤J¨ì¨ä¥L¦h­ÓEXCELÀÉ®×

·PÁÂlpk187!
¥¿¦b§V¤O²z¸Ñ§A¼gªºµ{¦¡¬[ºc

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-11-4 15:30 ½s¿è

¦^´_ 1# mark761222

­º¥ý¥²¶·»¡©ú¡A¨â­Óxlsªº¤u§@ªí¸ê®Æ¤£¥i¯à¦P¨B¡I¡I´Nºâ¦P®É§ó·s®É¡A¤]¤£¯àºÙ¬°¦P¨B¡I´Nºâµ{¦¡½X¼g¦baÀɮסA¤]¤@¼Ë¡A³£·|¦³¨Ò¥~ªº®É­Ô¡A©Ò¥H¥u¯à¥Hµ{¦¡¨ÓŪ¨úaÀɮתº³Ì·s¸ê®Æ¦Ó¤w¡A¤U­±µ{¦¡½X¤]¥u¬OŪ¨ú³Ì·s¸ê®Æ¡A¦Ó¤£¯àºÙ¤§¬°"¦P¨B"
¨ä2­Ó°ÝÃDµ{¦¡½X¦p¤U¡G
  1. Public Sub ex1()
  2.     Sheets("¤u§@ªí1").UsedRange.ClearContents
  3.     Dim xlPath As Variant, xlFile As Variant
  4.     Dim arr
  5.     xlPath = ThisWorkbook.Path & "\"
  6.     xlFile = "a.xlsx"
  7.     Workbooks.Open (xlPath & xlFile)
  8.     arr = Workbooks(xlFile).Worksheets("¤u§@ªí1").UsedRange
  9.     Workbooks(xlFile).Close True
  10.     Sheets("¤u§@ªí1").[A1].Resize(UBound(arr), UBound(arr, 2)) = arr
  11. End Sub
  12. Public Sub ex2()
  13.     Sheets("¤u§@ªí1").UsedRange.ClearContents
  14.     Dim xlPath As Variant, xlFile As Variant
  15.     Dim Barr, Darr, Earr
  16.     xlPath = ThisWorkbook.Path & "\"
  17.     xlFile = "a.xlsx"
  18.     Workbooks.Open (xlPath & xlFile)
  19.     With Workbooks(xlFile).Worksheets("¤u§@ªí1")
  20.         Barr = .Range("B1", .Cells(65535, "B").End(xlUp))
  21.         Darr = .Range("D1", .Cells(65535, "D").End(xlUp))
  22.         Earr = .Range("E1", .Cells(65535, "E").End(xlUp))
  23.     End With
  24.     Workbooks(xlFile).Close True
  25.     With Sheets("¤u§@ªí1")
  26.         .[A1].Resize(UBound(Barr)) = Barr
  27.         .[B1].Resize(UBound(Darr)) = Darr
  28.         .[C1].Resize(UBound(Earr)) = Earr
  29.     End With
  30. End Sub
½Æ»s¥N½X

TOP

¨â­Óxlsªº¤u§@ªí¸ê®Æ¦P¨B

°ÝÃD¤@
°²¦p§Ú¦³A.xlsx  »PB.xlsm (¥¨¶°ÀÉ)
A.xlsx ¦³¤u§@ªí1

B.xlsm ¦³¤u§@ªí1¡A­n¥h§ì¨ú©Ò¦³Aªº©Ò¦³¤u§@ªí1¤º®e¨ìB¤u§@ªí1 (¥u­nA.xlsx¸ê®Æ¦³§ó·sB´N·|§ó·s¸ê®Æ)

°ÝÃD¤G

°²¦p§Ú¦³A.xlsx  »PB.xlsm (¥¨¶°ÀÉ)
A.xlsx ¦³¤u§@ªí1

B.xlsm ¦³¤u§@ªí1¡A­n¥h§ì¨ú©Ò¦³A¤u§@ªí1¸Ì­±¾ã¦X¤º®e¦p B¾ã¦æ¡BD¾ã¦æ¡BE¾ã¦æ ¨ìB¤u§@ªí1ªº A¾ã¦æ¡BB¾ã¦æ¡BC¾ã¦æ (¥u­nA.xlsx¸ê®Æ¦³§ó·sB´N·|§ó·s¸ê®Æ)

³Â·Ð¦U¦ì¤j¤j¤F

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD