Cannot declare Excel.application

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

My colleague can declare the Excel.application, (he added Excel11.0 library
into reference)
and I am fail, to declare it, I found that when I add the reference [It is
10.0 version]
Do I need to upgrade my office ?
Thanks
 
Agnes said:
My colleague can declare the Excel.application, (he added Excel11.0
library into reference)
and I am fail, to declare it, I found that when I add the reference [It is
10.0 version]

You may want to use the object browser to determine the exact namespace the
classes are part of after adding the reference.
 
Excel.Application is in any recent Excel object model, so Excel 10.0 has it.

Which is the error that you are getting?

Are you missing to add or import Microsoft.Office.Interop?

Does this declaration works?:

Dim objExcel As Microsoft.Office.Interop.Excel.Application

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
i Already add it as reference. and my error is
Cannot copy assembly 'Interop.Microsoft.Office.Core' to file
'H:\prjFreightSys\dtsclass\bin\Interop.Microsoft.Office.Core.dll'. µ{§ÇµLªk¦s¨úÀɮסA¦]¬°ÀÉ®×¥¿¥Ñ¥t¤@­Óµ{§Ç¨Ï¥Î¡C(That chinese word means, it is using by another program ....)
I still fail to add this reference in my PC.


Carlos J. Quintero said:
Excel.Application is in any recent Excel object model, so Excel 10.0 has
it.

Which is the error that you are getting?

Are you missing to add or import Microsoft.Office.Interop?

Does this declaration works?:

Dim objExcel As Microsoft.Office.Interop.Excel.Application

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

Agnes said:
My colleague can declare the Excel.application, (he added Excel11.0
library into reference)
and I am fail, to declare it, I found that when I add the reference [It
is 10.0 version]
Do I need to upgrade my office ?
Thanks
 
Agnes,

The answer is NO. You do not need to upgrade your copy of office just
include a reference to the EXCEL object library in the solution explorer.

I've got an application that works just fine even when th clients are using
different versions of office.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top