Link to home
Start Free TrialLog in
Avatar of NigelRocks
NigelRocks

asked on

Excel Spreadsheet with Infragistics

Experts,

How can I use Infragistics in Visual Basic.NET to open an a UltraGrid into an Excel spreadsheet?
Avatar of teebon
teebon
Flag of Singapore image

Hi NigelRocks,

Check this out (there's Visual Basic section):
http://devcenter.infragistics.com/Articles/ArticleTemplate.Aspx?ArticleID=2159
Avatar of NigelRocks
NigelRocks

ASKER

The code below already looks like what's in the article.  It exports the grid to a file, which is almost what I want.   However, what I'd really like to do is to open an Excel spreadsheet from the app that contains the data in the grid.
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
        Try

            Me.SaveFileDialogExport.Title = "Save Excel File"
            Me.SaveFileDialogExport.Filter = "Excel Spreadsheets (*.xls)|*.xls"

            ' Set the default files type to Excel Spreadsheets
            Me.SaveFileDialogExport.FilterIndex = 1
            ' Set dialog box so an error occurs if the dialogbox is cancelled
            'Me.SaveFileDialogExport. .CancelError = True
            Me.SaveFileDialogExport.ShowDialog()
            'ben 07/22/09. set a condition to check for the file name is empty or not. 
            If Me.SaveFileDialogExport.FileName <> "" Then
                Me.ugrdAgentsExcelExporter.Export(Me.ugAgents, Me.SaveFileDialogExport.FileName)

            End If

        Catch ex As Exception
            'Throw ex
            MessageBox.Show(ex.ToString)
        End Try
    End Sub

Open in new window

Hi NigelRocks,

Do you mean that you want to open Excel spreadsheet in the web browser OR you want MS Excel to be launched and open the spreadsheet?
This is in Windows Forms.  And yes, I'd like the data in the graph to be opened in an Excel spreadsheet.
I'm providing a solution.
ASKER CERTIFIED SOLUTION
Avatar of teebon
teebon
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial