The setup we've got is this (I didn't write this of course far too clever for me):
A web app gets a load of data and writes it to a file as Excel data on a shared drive. There is also a second Excel file which has several worksheets with different report layouts as well as a VBA macro file.
The last thing the web app does is this:
Response.Clear();
Response.ContentType="application/x-msexcel";
Response.AddHeader("Content-Disposition", "attachment; filename=" + localFileName);
Response.WriteFile(fileName);
Response.Flush();
Response.Close();
Where the filename is the name of the VBA spreadsheet. I think this opens this sheet but I'm not sure.
The VBA macro is in the Auto_Open event so it runs as soon as the spreadsheet is opened.
The formatted file is then saved on the shared drive.
As I understand it the instance of Excel that is run is the one on the person's PC that is using the web app.
When I try using the web app from a laptop that has Office 2010 on it, it never comes back with the spreadsheet and just hangs.
If I open the VBA macro spreadsheet with Excel 2003 the first thing that happens is that a new worksheet called GetFile is created. The VBA then starts copying stuff from the other worksheets and only fails when it tries to open the data file.
When I do the same thing with Excel 2010 it creates a new workbook and falls over as soon as it tries to access the other worksheets.
I think that the same thing is happening when the web app opens the VBA spreadsheet, although I can't be sure as debug in Visual Studio won't go into Excel.
I can't find an option in 2010 that says anything like 'open new workbook / worksheet when...'
I've also drawn a blank on Google and the Microsoft on-line 2010 documentation.
Is this new behaviour in 2010? A bug, a set up problem, or something else
Bookmarks