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"
    ImageAlign="left"
    ImageUrl="Images/Img.jpg"
    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");
    objDocProcess.Start();
    }
  • #768601
    Hi,
    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:
    https://support.office.com/en-us/article/Open-a-workbook-in-the-browser-5255a528-ddf8-4d2e-beda-2b34873ada1c


Sign In to post your comments