Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try adding reference to
using Excel = Microsoft.Office.Interop.Excel; Here is my code: Excel.Application xlApp; Excel._Workbook xlWkBk; Excel.Workbooks xlBooks; xlApp = new Excel.Application(); //xlBooks = new Excel.Workbooks(); xlWkBk = xlApp.Workbooks.Open(textBox1.Text, 0, true, 5, System.Reflection.Missing.Value, System.Reflection.Missing.Value, true, Excel.XlPlatform.xlWindows, System.Reflection.Missing.Value, false, false, System.Reflection.Missing.Value, false, true, Excel.XlCorruptLoad.xlNormalLoad); Connection Strings: http://www.connectionstrings.com/ Accessing Excel Spreadsheet in C# http://www.c-sharpcorner.com//Code/2...essExcelDb.asp How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET http://support.microsoft.com/?kbid=316934 The C# Station ADO.NET Tutorial http://www.csharp-station.com/Tutori.../Lesson01.aspx Opening and Navigating Excel with C# http://www.c-sharpcorner.com/winforms/ExcelReadMG.asp http://www.codeproject.com/csharp/csharp_excel.asp Transforming excel Pivot tables into ADO.NET web forms http://www.codeguru.com/forum/showth...hreadid=384375 Pivot function (C#) http://weblogs.sqlteam.com/jeffs/articles/5091.aspx Understanding the Excel Object Model from a .NET Developer's Perspectiv http://msdn.microsoft.com/library/de...e&hidetoc=true Reading and Writing Excel using OLEDB http://www.codeproject.com/csharp/Excel_using_OLEDB.asp "SixSigmaGuy" wrote: Can someone tell me how to create an Excel Application object in C#? I can create a Word and PowerPoint Application object, but when I try to create one for Excel, I get the build error: "Cannot create an instance of the abstract class or interface 'interface'" After adding the appropriate references, I use the following code to create a Word and PowerPoint Application object: Word.Application wdApp = new Word.Application(); PowerPoint.Application ppApp = new PowerPoint.Application(); But when I try it with Excel, Excel.Application xlApp = new Excel.Application(); I get the build error I showed above. I've searched VS help and MSDN and haven't found any examples that do what I'm trying to do. I have references to: Excel Microsoft.Office.Core Office in my project. Is there some other reference I need? Thanks! BTW, I'm on a boat in the middle of the Atlantic for the next two weeks and I'm using a very slow satelitte connection that's costing me $42/hr. If I sent this to the wrong newsgroup, could you please forward it to the right one for me so I don't have to waste connect time? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cannot start the source application for this object in excel | Charts and Charting in Excel | |||
Excel Automation Add-In, Accessing the application object | Excel Programming | |||
"Excel.Application" Object Model | Charts and Charting in Excel | |||
Problem on the ASP using the Excel.Application Object | Excel Programming | |||
Diplaying Excel Application through Object Model | Excel Programming |