Open Client Side Excel file. RRS feed

  • Question

  • Hi ,

    i have a asp page with a print button.it download a excel file. 

    i want to open this file in client side via code.

    pls help me.

    Thursday, March 21, 2013 10:37 AM


  • Hi,

    you cannot open an excel file on the client side. All your server can do is offer the file to the client. The client (with the configuration there) is responsible for the action. So mime types could be blocked or the client might just ask the user to safe it or if the type is known then it might offer to open the file. It is even possible that the client knows how to open it and is configured that it opens the file directly (e.g. Acrobat Reader allows a configuration that a pdf is directly shown inside the browser).

    But your web application cannot ask the user to directly start an application. That would be a security risk. (Ok, it is not fully impossible. You could create an ActiveX control and when the clients install and trust it, an application can be directly started. But that needs a trust level. An example for such an application could be a microsoft download manager that is part of MSDN)

    With kind regards,


    • Proposed as answer by Patrice ScribeMVP Thursday, March 21, 2013 2:32 PM
    • Marked as answer by Mike Feng Wednesday, April 3, 2013 4:45 PM
    Thursday, March 21, 2013 12:36 PM