vb怎么读取excel指定单元格数据
发布网友
发布时间:2022-05-12 20:26
我来回答
共2个回答
热心网友
时间:2023-10-21 10:33
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Private Function ReadA2() As String
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("c:\12.xls")
Set xlSheet = xlBook.Worksheets("Sheet1")
你想要的 = xlSheet.cells(2, 1) '或者加上.Value
End Function
热心网友
时间:2023-10-21 10:34
提问者:匿名