Click here to Skip to main content
15,909,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
While using
using Microsoft.Office.Interop.Excel;
using Microsoft;

when i use Excel.ApplicationClass in main it does not work.
i have to use Microsoft.Office.Interop.Excel.ApplicationClass
Is this necessary or am i missing something ?
Posted
Comments
Christian Graus 16-Jul-10 3:32am    
This seems like an odd question. No code posted, but you seem to be complaining that you had to use an extra class or namespace, but that your code is working so you don't have any real issue ?

1 solution

As far as I understand you have problems with the using statements...

The ApplicationClass class is in the Microsoft.Office.Interop.Excel namespace. Thus if you write the following:
using Microsoft.Office.Interop.Excel;

...then you can't use Excel.ApplicationClass later in the code, just use ApplicationClass without the Excel namespace... Or, if for some reason you want to write Excel.ApplicationClass, then you have to use the following using statement:
using Microsoft.Office.Interop;


I hope this helped... if not, please specify your problem better.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900