Last post Feb 06, 2009 02:39 AM by mudassarkhan
Feb 05, 2009 08:23 PM|Mastap|LINK
I have a c# web application which opens an excel file and modifies few cells and then saves it under different name.
However, if the excel file contains any macro, the application just hangs at the line where it has to populate the cells with new data. I have configured the DCOM config for MS Excel to use service ID as identity, given the service ID rights for local launch
and local activation. If you check task manager, it shows EXCEL process running under IUSER_xxx identity and it has the file locked.
If the excel file does not contain any macros, then it works fine.
I spent lot of time googling this but didnt find an answer and few people have posted this exact same problem with no solution. Can ANYONE, please let me know if this is inherint bug in excel or is this something that can be solved?
thanks in advance for any feedback..
Feb 05, 2009 09:47 PM|Paul Linton|LINK
Interestingly, Microsoft do not support running Office on a server. Maybe this is one of the reasons.
If you are logged in to the server and open the workbook do you get any prompts about macros or security? If so, you may need to reduce your Excel security level to low (and be aware of the consequences of this).
Another experiment would be to sign the macros and set Excel to trust macros signed by you.
Third possibilty. Do you have to have the macros in the workbook? I normally add macros to a workbook which does not have the data to be processed. The macro opens the workbook which has the data before processing it. That way there are no macros in
the workbook which has data. Not all business situations will allow that configuration but it may be a good option if you are stuck.
Feb 06, 2009 01:46 AM|Mastap|LINK
- i already tried setting macro security to low. didnt work
- i need to have the macros. In the application, user input some values and then these values are added to an excel file and this file is saved as a report. Certains users then open these excel files and run the macros to create final reports.
i have spent lot of time on this without any solution.
Feb 06, 2009 02:39 AM|mudassarkhan|LINK