Excel automation - recent weird behaviour

J

James

Hi,

I support a legacy application. It has been running fine for several
years, then just this month, my excel automation no longer works.

I am running an asp application. It calls COM+ components which does
the Excel automation. It also retrieves data from an SQL 2000 server.

Since this is a legacy application it uses Excel 97 which has been
installed on the server. IIS, COM+ and SQL Server 2000 all reside on
the same Windows 2000 box which is up to date in terms of service
packs, etc.

I have a local account which is a machine administrator which COM+ uses
as the identity to run under. This local account used for COM+ has all
the appropriate settings in DCOMCNFG for Excel '97.

The weird behaviour is as follows: COM+ components which do not use
automation are fine. The ones which do hang on the creation of the
Excel object. Amazingly, I have found a strange workaround. After
rebooting the server, if I log into the box using the local account
which runs my COM+ packages, start excel, close excel, then log off, my
excel automation will work just fine. Rebooting the box will again
cause this hanging to happen until I do the workaround.

The VB6 code creating the Excel object is:

Dim objExcel As Excel.Application
....
Set objExcel = New Excel.Application
objExcel.DisplayAlerts = False

It actually hangs on the first Dim statement, and never gets to the
statement where the new Excel.Application object is being created. I
know this because where the ... is, is a database call, and by running
an SQL trace, I can see that the SQL statements are never executed.

Any thoughts?

Could the Dec 13 hotfixes be a factor here?

Thanks
James
 

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