I'm trying to move an application from VB to C# and need to Open an instance of Excel so i can past some data to a worksheet.

heres the code.

Excel.Application oXL = New Excel.Application;

Excel.Workbook oWB = New Excel.Workbook;

Excel.Worksheet oSheet = New Excel.Worksheet;

I'm getting red squiggly lines under the words "Excel" and when I hove the cursor over the squiggly lines it says "; expected"

I have a refernce to excel in the project.

does anyone know what I'm doing wrong



Using Office 2003 and VS2005

Re: Visual C# General [otp] Open Excel

Peter Ritchie

See the excel.programming newsgroup for Excell programming topics. Other Excel-related development newsgroups can be found at Office Developer Center: Excel Community