Opening an Excel worksheet inside a Webbrowser.

Posted by rabindrarai on Stack Overflow See other posts from Stack Overflow or by rabindrarai
Published on 2010-06-06T10:09:34Z Indexed on 2010/06/06 10:12 UTC
Read the original article Hit count: 237

Filed under:

Hi, I have opened a workbook using WebBrowser. However, it opens the first worksheet in the workbook whereas I would like to open a worksheet based on a name that I provide.

Following is the code I used to open the workbook:

    public void OpenFile(string filename)
    {
        // Check the file exists
        if (!System.IO.File.Exists(filename)) 
            throw new Exception();
        m_ExcelFileName = filename;
        // Load the workbook in the WebBrowser control
        this.wbMain.Navigate(filename, false);
    }

I would like to thank you in advance for trying to help me.

© Stack Overflow or respective owner

Related posts about c#