tags:

views:

51

answers:

2

I am currently writing an application that will perform automation in Excel. I have MS Office (2007) installed on my work computer and the application is working fine referencing the the Microsoft Excel 12.0 Object Lirary.

The target machine has the Office installed but not registered. It is one of those preinstalled editions. Attempting to run the application on the target machine I get an error saying Office is not installed?

I'm assuming then you have to have a registed Office to use the object libraries? Is there anyway around this as I do not have a Office license key lying around and its quite expensive?

+2  A: 

See if you can run Excel manually on that machine. If you can do this, you should be able to automate it as well. If you cannot, don't expect to be able to somehow miraculously (and legally) to make it work through automation. Automating Office through its object library is no different than using it through the UI. You need to have a licensed and properly installed copy of Office in order to be able to use it.

Franci Penov
Yes I can't do anything with the Office apps, looks like you need to have a fully licensed Office to automate it with .NET languages. However another guy who has VB6 running was able to reference the libraries and use it without the license. Wonder why is that?
+1  A: 

Nothing comes for free.

Current licensing guidelines prevent Office applications from being used on a server to service client requests, unless those clients themselves have licensed copies of Office

What are you trying to automate/achieve? Don't you think OpenOffice would be of any use?

KMan
I did not get the impression that the op was trying to use this as a server process, which has a number other implications besides licencing. http://stackoverflow.com/questions/2653740/problems-with-office-automation-in-asp-net-i-can-use-alternatives-such-as-open-o/2659426#2659426. Rather the problem is that the installation of Office being used is not registered/activated.
Chris Taylor
That is a good suggestion I will definitely look into it in the future however right now I do not have access to target machine and am in no position to make request to switch to OpenOffice. But I suppose in future I can just automate files in .odf format and convert to .xls thanks!