Hello,
I am trying to import/export Excel data with VB.NET based on examples I have found. Unfortunately, Excel.Application, Excel.Workbook, and Excel.Worksheet get underlined (they are not defined). Could you please tell me what I need to do differently?
Dim objExcel As New Excel.Application() ' Instance of Excel
Dim objWorkbook As Excel.Workbook 'workbook object
Dim objWorksheet As Excel.Worksheet 'worksheet object
I did add a reference via Project > Add Reference > selecting the "COM" tab > and then selecting "Microsoft Excel 11.0 Object Library" and clicking "ok"
I have the reference in my solution explorer window.
I haven't worked with references before, so I'm not sure what to do next. I thought that simply by adding the reference I would be good to go but that doesn't appear to be the case. I added the Excel 11.0 Library because I'm using Excel 2003.
Thank you in advance,
michael