I am using RadGrid with excel spreadsheet as the datasource, the data is displaying correctly in my grid.
But, while Adding new record/inserting data to excel spreadheet. I am not sure how to do that.
I have seen few examples but they are all showing exporting data to excel. But my requirement is just to add data to speadsheet from RadGrid
I am pulling data from the spreadsheet using the following code
But, while Adding new record/inserting data to excel spreadheet. I am not sure how to do that.
I have seen few examples but they are all showing exporting data to excel. But my requirement is just to add data to speadsheet from RadGrid
I am pulling data from the spreadsheet using the following code
Protected Sub uxRGMembersCleanup_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles uxRGMembersCleanup.NeedDataSource
Dim cnstr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath("~/App_Data/Test_Members.xlsx") & ";" & "Extended Properties=Excel 12.0"
Dim oledbConn As New OleDbConnection(cnstr)
Dim strSQL As String = "SELECT * FROM [Test_Members$]"
Dim cmd As New OleDbCommand(strSQL, oledbConn)
Dim ds As New DataSet()
Dim da As New OleDbDataAdapter(cmd)
da.Fill(ds)
uxRGMembersCleanup.DataSource = ds
'uxRGMembersCleanup.DataBind()
End Sub