locked
Excel will longer open...... RRS feed

  • Question

  • User-511995934 posted

    i have been working on some code that involves opening some data in excel

    today, after running my code.......excel will no longer open. i see the icon on the taskbar but no amount of clicking it will open excel.

    anyone else ever encountered this?

    the code i was running:

            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Buffer = true;
            //
            HttpContext.Current.Response.AppendHeader("Content-Type", "application/ms-excel");
            HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=EmployeeDetails.xls");
            HttpContext.Current.Response.Write(sbDocBody.ToString());
            HttpContext.Current.Response.End();

    Wednesday, October 10, 2012 5:36 PM

All replies

  • User-821857111 posted

    Your issue has nothing to do with your code. It cannot affect your installation of Excel.

    Thursday, October 11, 2012 3:03 AM
  • User-511995934 posted

    it broke only after i ran that code

    i rebooted and it worked again. then i ran the code again. again it broke and now even rebooting doesn't fix it.

    Thursday, October 11, 2012 9:19 AM
  • User-821857111 posted

    Well, you can't write more ASP.NET code to fix it, unfortunately.

    Thursday, October 11, 2012 11:16 AM