I have ASP.NET web service, which is creating file in XML table format.
I need to convert this file into Excel 2003 format.
What can I use instead of Microsoft.Interop library?
UPDATE: I also need to copy format from the original file.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve found the answer by myself.
I could not use different libraries, because I had to open file in XML Table format and resave it to Excel 2003 format.
Maybe my experience in this question will help someone. I used Windows Server 2008 with IIS 7.0 and Excel Library Microsoft.Office.Interop.Excel version 12.
Microsoft says, that using Interop DLL may cause unpredictable result, but it’s NOT impossible.
The main problem of using Interop classes lies into access to launch DCOM applications by user, that starts web-service.
To make web-service works correct in my way I did next:
I opened “dcomcnfg” and disable authorization for all DCOM
components.
Another way is to find exactly your DCOM objects and give
permissions to local launch to the user, that starts the service.
Gave permissions to registry branch
HKEY_CLASSES_ROOT\CLSID\ID_OF_MICROSOFT_APPLICATION_CLASS
ID_OF_MICROSOFT_APPLICATION_CLASS = class, which contained in
web-server error while accessing to Interop DLL
It’s very strange, but important: I created folder
for 86x: C:\Windows\System32\config\systemprofile\Desktop
for 64x: C:\Windows\SysWOW64\config\systemprofile\Desktop
web-service use, including folder from item (3).
If your web-service works under NETWORK SERVICE try to change it to some local user, maybe it may help you.