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.