You must Sign In to post a response.
  • Category: .NET

    How to open open office spread sheet document in browser using asp .net c#

    Below is my code which opens a word or spread sheet document when user clicks the image in browser.But i need to open that word/spread sheet document in the browser itself.How can i do this can anyone help me out

    <asp:ImageButton ID="imagebutton1" runat="server"
    AlternateText="ImageButton 1"
    OnClick="imagebutton1_Click" />

    protected void imagebutton1_Click(object sender, ImageClickEventArgs e)

    System.Diagnostics.Process objDocProcess = new System.Diagnostics.Process();
    objDocProcess.EnableRaisingEvents = false;
    objDocProcess.StartInfo.FileName = Server.MapPath(@"OpenOfficeDoc\Test1.odt");
  • #768601
    Some of the ways:
    1. Upload that document to GoogleDrive. Share it and use that share link to open it in browser.
    2. Goto PC Settings:-> SYSTEM :-> Default apps :-> your extension (eg .odt) [For Windows 10]
    3. Open your file. Goto File menu:-> Options:-> Click on 'Browser View options'
    Also refer this link:

  • Sign In to post your comments