We are using Excel to convert SpreatSheetML to XLS in an ASP.NET webservice. Moreover, if the user checks the right checkboxes, we spawn a thread that uses Excel to print the spreadsheet.
Recently, we have deployed the app in a new environment, and then we started having problems: the first time someone tries to print, Excel seems to hang on the server - i.e. the call to the PrintOut
method on the workbook never returns.
But if we log in to the server as the application pool identity and open Excel, send something to the printer, and close it again, printing will work from then on!
I suspect that Excel is showing an invisible dialog
- the symptoms are the same as we had earlier, a time when Excel seemed to stall on a "cannot use object linking and embedding"-dialog that appeared when Excel opened.
I know that using server-side Office automation is bad, but this is a legacy app that is very hard to change, so please don't just advise me to re-design our solution.
Has anyone had any experiences with this kind of behavior?