Hi
I am trying to build an array from an excel spread sheet, I can connect to the sheet fine and pull out a dataset, but I dont know how to populate the array, my code is below, would be grateful for any help.
Thanks
VB Code:
Dim myDataset As New DataSet() Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("/autoexcel/") & "excel/" & strFileNameOnly & ";" & _ "Extended Properties=Excel 8.0;" lblMessage.Text = strFileNameOnly ''You must use the $ after the object you reference in the spreadsheet Dim myData As New OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn) myData.TableMappings.Add("Table", "ExcelTest") myData.Fill(myDataset) Dim resultArray As Array resultArray = ?????????




Reply With Quote