Dim xlApp As New Excel.Application
Dim xlBooks As Excel.Workbooks = xlApp.Workbooks
Dim xlBook As Excel.Workbook = xlBooks.Open("C:\Documents and Settings\Administrator\桌面\訂單.xls")
Dim xlSheet As Excel.Worksheet = xlApp.ActiveSheet

DataGridView1.Columns.Add("Test", "Test")
DataGridView1.Item(0, 0).Value = xlSheet.Cells(3, 5).value

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()