Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
I know very little about VB. I Need to code for navigating a URL on clicking link button such that navigated URL will contain an Excel file and that file should open on clicking the link button.
Posted 7-Jul-11 0:03am
Edited 7-Jul-11 0:49am
Slacker00770.5K
v2
Comments
Prerak Patel at 7-Jul-11 6:07am
   
Not clear. Elaborate more. Avoid txt speak in questions.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Assuming this is a windows application (and URL is a little misleading in that respect), look at the System.Diagnostics.Process class[^]
            Process.Start("F:\Temp\MySpreadSheet.xls")
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Private Sub OpenExcelFileForEditing(ByVal OutputPath As String)
    Dim excel As Microsoft.Office.Interop.Excel.Application
    Dim wb As Microsoft.Office.Interop.Excel.Workbook
 
    Try
        excel = New Microsoft.Office.Interop.Excel.Application
        wb = excel.Workbooks.Open(OutputPath)
        excel.Visible = True
        wb.Activate()
        txtPath.Text = OutputPath
    Catch ex As COMException
        MessageBox.Show("Error accessing Excel: " + ex.ToString())
    Catch ex As Exception
        MessageBox.Show("Error: " + ex.ToString())
    End Try
End Sub
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 369
1 Maciej Los 208
2 George Jonsson 144
3 Richard MacCutchan 140
4 Dave Kreskowiak 130


Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 7 Jul 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid