Exceptions in Excel Interop

  • Thread starter Thread starter Neil Stephens
  • Start date Start date
N

Neil Stephens

We have a service written in VB.NET running on the .NET2.0 framework. Part
of it's function is to create Excel spreadsheets. This code works fine on
all but one server that it's running on, but on this one we get the error -

----------------------------------------
This command is unavailable because the license to use this application
has expired.
----------------------------------------
at Excel.ApplicationClass.set_EditDirectlyInCell(Boolean RHS)

The code causing the problem is -

xlApp = New Excel.Application
With xlApp
.EditDirectlyInCell = True
.ScreenUpdating = False
.DisplayAlerts = False
.IgnoreRemoteRequests = True
.AlertBeforeOverwriting = False
.AskToUpdateLinks = False
End With

As far as we can tell, the copy of Excel installed on the server is
correctly licensed and activated. If you run Excel from the desktop you
don't get any problems.

Anyone got any ideas what might cause this problem ?

Thanks,

Neil Stephens,
Foresite Systems.
 
Anyone got any ideas what might cause this problem ?

Can't say I've seen that before. Have you (or can you) reinstall Excel
on that particular server? That would probably fix the problem.

Thanks,

Seth Rowe
 
Back
Top