I have all the references specified for using Excel and WebBrowser (Internet Tools .COM, etc.) and also use the following imports:
Imports Excel = Microsoft.Office.Interop.E
Public oDocument As Object
However, after placing a WebBrowser1 on a Windows Form, calling on a file that is e.g. myfile.xlsx, and using the code below, the Webbrowser1 simply shows an info icon, and nothing happens. Is there something I am missing? (Note that the msgbox in the NavigateComplete2 never fires).
Also, how can I only show the column and row headers along with the sheet data, thus killing all the Excel menu commands and tools? (I only want the user to see the gray-colored row and column headers along with the sheet data).
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim filename As String
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Object)
On Error Resume Next
oDocument = pDisp.Document