Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Excel Spreadsheet with Infragistics

Posted on 2009-12-28
8
Medium Priority
?
838 Views
Last Modified: 2012-05-08
Experts,

How can I use Infragistics in Visual Basic.NET to open an a UltraGrid into an Excel spreadsheet?
0
Comment
Question by:NigelRocks
  • 4
  • 2
6 Comments
 
LVL 9

Expert Comment

by:teebon
ID: 26135307
Hi NigelRocks,

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

Author Comment

by:NigelRocks
ID: 26138159
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

0
 
LVL 9

Expert Comment

by:teebon
ID: 26142723
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?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:NigelRocks
ID: 26162728
This is in Windows Forms.  And yes, I'd like the data in the graph to be opened in an Excel spreadsheet.
0
 
LVL 9

Expert Comment

by:teebon
ID: 26289487
I'm providing a solution.
0
 
LVL 9

Accepted Solution

by:
teebon earned 2000 total points
ID: 26289492
Hi NigelRocks,

Sorry for late reply.
After saving the spreadsheet to a file, you may reopen the spreadsheet in your windows form:
http://xldennis.wordpress.com/2007/11/16/open-excel-workbooks-in-vbnet-solutions/

Let me know if it still doesn't work for you.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question