Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objSheet As Excel.Worksheet
objExcel.Visible = True
objWorkbook = objExcel.Workbooks.Open("c:\Dat.xlsx")
objWorkbook = objExcel.Workbooks.Add()
objSheet = objWorkbook.Worksheets(1)
objSheet.Cells(2, 2).Value = "something"
VB2005.net is complaining of:
Type Excel.Application is not define
Type Excel.Workbook is not define
Type Excel.Worksheet is not define
I have added the Microsoft Excel V12.0 object library reference.
My Dat.xlsx is a simple 2 rows by 5 columns of numbers, no empty cell.
Please help. Thank you.
Dim objWorkbook As Excel.Workbook
Dim objSheet As Excel.Worksheet
objExcel.Visible = True
objWorkbook = objExcel.Workbooks.Open("c:\Dat.xlsx")
objWorkbook = objExcel.Workbooks.Add()
objSheet = objWorkbook.Worksheets(1)
objSheet.Cells(2, 2).Value = "something"
VB2005.net is complaining of:
Type Excel.Application is not define
Type Excel.Workbook is not define
Type Excel.Worksheet is not define
I have added the Microsoft Excel V12.0 object library reference.
My Dat.xlsx is a simple 2 rows by 5 columns of numbers, no empty cell.
Please help. Thank you.