10 Answers, 1 is accepted
RadGridView supports only export to Excel functionality, however you cannot import data from Excel into RadGridView. You can find the Export to Excel example in our Quick Start Framework application (a.k.a. Examples), section RadGridView >> Export to Excel. As to the CSV format, you can copy and paste rows in CSV format from one RadGridView to another when both have the same data strcture. An example of the CSV approach you can find in this Knowledge Base article: Copy/Pasting rows in and between RadGridViews (CSV format)
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Dim fname As String = ""
If (OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then
fname = OpenFileDialog1.FileName
Dim TextLine As String = ""
Dim SplitLine() As String
If System.IO.File.Exists(fname) = True Then
Dim objReader As New System.IO.StreamReader(fname)
Do While objReader.Peek() <> -1
TextLine = objReader.ReadLine()
SplitLine = Split(TextLine, ",")
radgridview1.ColumnCount = SplitLine.Count
'if .RowCount = 0 then we are processing the first row
'only need this code if you have a header row
If radgridview1.RowCount = 0 Then
For i = 1 To SplitLine.Count - 1
.Columns(i).HeaderText = SplitLine(i).ToString
'stupid but the only way I could get the datagridview to populate correctly
'removes the header row
If radgridview1.RowCount > 1 Then
RadMessageBox.Show("File Does Not Exist")
Thank you for sharing your solution with the Telerik Community - we have updated your Telerik Points as well.
the Telerik team
This uses the CSV Reader by Sebastien Lorion located at CodeProject.
Thank you for sharing your solution with the community.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite.
Corrected connection string
Thank you for sharing the solution for the new Excel files with the xlsx extension. I am sure someone will benefit from it.