Excel .Net Interop - .Net code not executing. Custom install of Office 2003

P

Phil Rayner

Hi,

The we are having is that once we install our custom Excel application on
the clients setup it fails to run the .Net code. The application is an Excel
spreadsheet which calls a bin directory with .Net DLLs in it. It runs fine
under office 2003 professional complete install.

The client is running active directory and have Office 2003 Standard rolled
out automatically. The client has a requirement that Access 2003 is NOT
installed, as they are currently in the process of testing the migration of
all their old Access 2000 databases to Access 2003. This will happen at a
later date.

We have been told by Microsoft that Office 2003 Standard DOES NOT support
running Excel.Net Interop applications. Is this really the case? Why?

Anyway...

The client has taken the following measures to try and circumvent the
problem.
1. Uninstall Office 2003 Standard.
2. Install .Net 1.1
3. Install Office 2003 Pro (Complete install)
4. Install "Enlighten Designs" custom software. (Excel .Net Inter-op
spreadsheet with .Net binaries)

This sometimes works, but not in every case. It does not seem to be a
reliable / consistent method for making it work.

The following steps seem to consistently fail to work:
1. Uninstall Office 2003 Standard.
2. Install .Net 1.1
3. Install Office 2003 Pro (Custom - No MS-Access, No Publisher)
4. Install "Enlighten Designs" custom software. (Excel .Net Inter-op
spreadsheet with .Net binaries)

We have tried numerous install and uninstall scenarios, including changing
the order of installation, and the components installed by Office 2003. None
of these approaches works 100% of the time. The client is unhappy with this
situation and it does not reflect well on us, or Microsoft, in our decision
to integrate .Net code with Microsoft Excel.

What I'm hoping for is an installation procedure that we can follow, that
will enable our customised Excel application to run in 100% of
installations.

Thanks in advance for your help

Flip
 
P

Peter Huang [MSFT]

Hi Flip,

Based on my understanding, you are trying to install the VSTO software.
I think you may need to read the KB link below about the requirement of
VSTO.
Prerequisites for the development computer

The following software is required to install Microsoft Visual Studio Tools
for Office: ? One of the following:? Microsoft Visual Basic .NET 2003
Standard.
? Microsoft Visual Studio .NET 2003 Professional.
? Microsoft Visual Studio .NET 2003 Enterprise Developer.
? Microsoft Visual Studio .NET 2003 Enterprise Architect.

? The Visual Basic language and/or the Visual C# language, which can be
installed with Visual Studio .NET.
? The MSDN Library installed during Visual Basic .NET or Visual Studio .NET
Setup, or during an update using Add or Remove Programs (required for
installing the Help content).
? Microsoft Office Professional Edition 2003.

Microsoft Visual Studio Tools for the Microsoft Office System Readme
http://support.microsoft.com/?id=828087

This newsgroup is mainly discussing development issue.
For your concern, I think it would better to consult Microsft Consulting
Service. Because it is hard to gurantee certain guide will 100% work for
all scenarios.
We need to troubleshoot what error has happened on the client the machine.
But the all the client's environment may vary.
You can directly contact our CSS for Advisory Services following the link
below:
http://support.microsoft.com/default.aspx?pr=AdvisoryService

Thanks for your understanding.
If you still have any other concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Phil Rayner

Hi Peter,

Thanks for your feedback. I have already read the knowledgebase article you
mentioned, however even after following the steps in this article we can not
make it work. We have raised an incident support ticket with Microsoft and
they have come back refering us to this article as well. We have not heard
any more from them even after informing them of the failure of this article
to resolve our issue.

I should have said that installing VSTO on our development machines is fine.
We are using Office profesional and VS 2003 Pro and are having no problems.

The problem occurs when we are trying to deploy on our clients workstation.

They already have Office 2003 Standard installed as part of their corporate
roll out.

I have been told I need to install Office 2003 Professional.
Uninstalling Office 2003 Standard, and installing Office 2003 Professional
doesn't work.

However using either Office Standard or Office Professional, I can make the
following demo work (I converted it to C# so it would run on a standard .Net
1.1 install without J#)
http://www.codeproject.com/dotnet/JExcel.asp
my version downloadable from:
http://www.enlightenhosting.com/mrp/NetExcel.zip

The main difference being of course that this is a .Net application that
controls excel, as opposed to an Excel workbook, that interacts with .Net

I find it interesting that this application works even with Excel from
Office standard. How is this so if Office standard doesn't support .Net
interop?

The issue we would like to resolve is taking a system that already has
Office standard on it, removing this (if necessary) and installing Office
Pro. Then making an excel spreadsheet with .Net interop run.

I have made available a little test Excel spreadsheet application. This
fails to fire any of the .Net events when installed on our clients machines.
You will need to set the .Net permissions on this to allow it to run from
the directory you put it in.
http://www.enlightenhosting.com/mrp/ProofOfConcept.zip

Thanks again for your help,

Flip
 
P

Peter Huang [MSFT]

Hi Flip,

Thanks for your quickly reply!
The code sample about J# is discussing the COM automation technique which
is somewhat different from the VSTO.

In the Automation scenario, the Winform application is the main app which
will invoke the methods of the Office application. While in the VSTO
scenario, the Office application started, and it loaded the .NET assembly
via VSTO. That can be considered as the .NET version "VBA" code.

Due the VSTO projects requirement in MSDN document is Office Professional
version, that is by design.

For the .NET security issue for the VSTO, that is necessary for any VSTO
application. That is commonly done via the caspol tool. This job should be
done when we want to deploy the project on client side.
Microsoft Visual Studio Tools for Office Training
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto200
3_tr/html/odc_VSTMGBLab5.asp

For your concern about deployment, I think it would better to be addressed
in the Microsoft Advisory Service in my last post.
This newsgroup is mainly talking about how to develop.

Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Phil Rayner

Hi Peter,

Can you please advise me of a more appropriate news group to post in? I have
contacted Microsoft Support and raised an incident ticket with them, but
they are not responding to my e-mails. We are Microsoft Certified partners
and have five incident tickets available to us.

On deeper investigation it seems the client is having issues with VSTO,
Excel (from Office Pro), when MS-Access XP (from Office XP) is already
installed.

Can you confirm if this is indeed a product limitation of Excel (Office 2003
Pro), that VSTO will fail to load when Office XP (MS-Access only) is
installed in parallel with Office 2003 Pro?

thanks again for your help,

Flip
 
P

Peter Huang [MSFT]

Hi

I think you may also try in the newsgroup below.
microsoft.public.vsnet.vstools.office

Also I do not think that the Office XP will prevent VSTO from working.
Based on my research, I did not find any similar case.
For your concern, that the Microsoft Support did not reply to you.

Have you tried to make a phone call to the Microsoft support directly?
Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Top