views:

165

answers:

2

The basic setup is that I have a web application that calls SQL Reporting Services to run reports. The reports have the option of returning in PDF or Excel format. The code in the background runs the report, gets the results and writes it out using httpResponse.BinaryWrite(). Most of the reports work fine. IE recognizes the excel file, fires up excel and opens the worksheet. HOWEVER, some reports don't cause excel to start. Some end up in some kind of excel widget that is running within IE. This is unsatisfactory.

The code to run the reports and display them is totally generic and used by all of the reports. So I'm thinking it has something to do with the report....but I don't know what that might be. At this point I'm really grasping in the dark.

It only happens when using Excel 2003. Excel 2007 works fine. I'm currently unable to get a development machine that is running Excel 2003 so it has been a bear to try and debug.

Any ideas?

A: 

Maybe You can try to push start excel using .NET code and than in that instance open generated excel file

adopilot
yep, I did go down that path for a while. Then I stopped because it was starting to feel like I was making the problem harder than it really was.
tidge
+1  A: 

Dammit! I should have known, as this has bit me in the past. Will answer here in case it helps anyone else. The problem was my report name containing characters that don't play nice in file names. I build a temporary file name using the name of the report. In this case my report title contains "Race/Ethnicity", so the name of the file that I'm streaming back contains a "/".

Excel 2007 is sophisticated enough to handle it. Excel 2003 seems to have problems. Possibly the interaction between IE and Excel 2003/2007. But both of my test machines are using IE7.

tidge