.net – Is Office 2003 interop supported on Windows server 2008 ..

excel-interopnet

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 ..?

Best Answer

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..!

Related Topic