- ©«¤l
- 79
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 148
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOW7
- ³nÅ骩¥»
- EXCEL 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-5-21
- ³Ì«áµn¿ý
- 2023-3-13
|
Sub readData()
'数Õu读¨ú
'----------------------------------------------
Dim dataExcel, Workbook, sheet
Dim totalRow As Integer
Set dataExcel = CreateObject("Excel.Application")
Set Workbook = dataExcel.Workbooks.Open("E:\n读¨ú数Õuªº·½¤å¥ó.xlsx")
Set sheet = Workbook.Worksheets(1) '读¨ú²Ä¤@个sheet页ªº数Õu
totalRow = sheet.UsedRange.Find(what:="*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
For i = 2 To totalRow
Sheets("sheet1").Cells(i, 3) = sheet.Cells(i, 4)
Next i
Workbook.Close
MsgBox "读¨ú¦¨¥\¡I", vbSystemModal '读¨ú§¹¦Z弹®Ø´£¿ô
'----------------------------------------------
End Sub |
|