Is Office 2003 interop supported on Windows server 2008 ..?

南楼画角 提交于 2019-11-29 23:32:04

问题


I am getting below error while trying to run an interop dependent program on Windows server 2008 its running fine on Win Server 2003 and XP:

System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs(.......)

According to Microsoft, Windows Server 2008 is not in list of suppoerted OS.

http://www.microsoft.com/downloads/en/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en

System Requirements

Supported Operating Systems:Windows 2000 Service Pack 3;Windows Server 2003;Windows XP

Can anybody please confirm this.. has anyone tried it ..?


回答1:


Found Answer.......!!!!!!!

Officially Microsoft Office 2003 Interop is not supported on Windows server 2008 by Microsoft.

But after a lot of permutations & combinations with the code and search, we came across one solution which works for our scenario.

The solution is to plug the difference between the way Windows 2003 and 2008 maintains its folder structure, because Office Interop depends on the desktop folder for file open/save intermediately. The 2003 system houses the desktop folder under systemprofile which is absent in 2008.

So when we create this folder on 2008 under the respective hierarchy as indicated below; the office Interop is able to save the file as required. This Desktop folder is required to be created under

C:\Windows\System32\config\systemprofile

AND

C:\Windows\SysWOW64\config\systemprofile

This worked for me...

  1. Also do check if .NET 1.1 is installed because its needed by Interop and ot preinstalled by Windows Server 2008

  2. Or you can also Use SaveCopyas() method ist just take onargument as filename string)

Thanks Guys..!




回答2:


.NET 1.1 is also a requirement, which I don't believe is on Windows Server 2008 (and really shouldn't be, just my opinion) which might be your problem.




回答3:


Well, in general, running interop on any server is usually not a good idea, since Office is not made to be part of a server solution. However, assuming that you can't change that, it should be possible to get it to run, but I have seen a lot of problems having various issues but the solutions seems to be different for different people.

This stackoverflow question has some answers, some of which might help you (it's about Win7, but it should still be relevant I'd think).



来源:https://stackoverflow.com/questions/4438121/is-office-2003-interop-supported-on-windows-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!