Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please tell me how to call Excel, Word in VC# Thank you
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00705062
Message ID:
00705298
Views:
9
You need to first create a reference in your project to the COM Microsoft Excel Object Library. Then you will have access to the object model inside of your project. Here is some sample code to use once you have your reference in your project:
Excel.Application oXL;
Excel.Workbooks oWBs;

oXL = new Excel.Application();
oWBs = oXL.Workbooks;
Here is an article about how to work with Excel in C# that you might find useful:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306023

>Dear All
>
>I just began to write the C# program.
>I want open a excel file to be my import data file.
>In VB I alway use the CreateObject() to call Excel.
>But now in C# I can't find the CreateObject Function
>Please anyone can tell about it?
>
>Thank you
>
>T.S.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform