- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ 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- Public Sub ex1()
- Sheets("¤u§@ªí1").UsedRange.ClearContents
- Dim xlPath As Variant, xlFile As Variant
- Dim arr
- xlPath = ThisWorkbook.Path & "\"
- xlFile = "a.xlsx"
- Workbooks.Open (xlPath & xlFile)
- arr = Workbooks(xlFile).Worksheets("¤u§@ªí1").UsedRange
- Workbooks(xlFile).Close True
- Sheets("¤u§@ªí1").[A1].Resize(UBound(arr), UBound(arr, 2)) = arr
- End Sub
- Public Sub ex2()
- Sheets("¤u§@ªí1").UsedRange.ClearContents
- Dim xlPath As Variant, xlFile As Variant
- Dim Barr, Darr, Earr
- xlPath = ThisWorkbook.Path & "\"
- xlFile = "a.xlsx"
- Workbooks.Open (xlPath & xlFile)
- With Workbooks(xlFile).Worksheets("¤u§@ªí1")
- Barr = .Range("B1", .Cells(65535, "B").End(xlUp))
- Darr = .Range("D1", .Cells(65535, "D").End(xlUp))
- Earr = .Range("E1", .Cells(65535, "E").End(xlUp))
- End With
- Workbooks(xlFile).Close True
- With Sheets("¤u§@ªí1")
- .[A1].Resize(UBound(Barr)) = Barr
- .[B1].Resize(UBound(Darr)) = Darr
- .[C1].Resize(UBound(Earr)) = Earr
- End With
- End Sub
½Æ»s¥N½X |
|