Hi,
I know that when you fill a dataset with data from a database you can use the names of the columns of the tabel in the database to sort on..
ex:
Dim oConn As OleDbConnection
Dim OCmdItem As OleDbCommand
Dim dsItem As DataSet
Dim daItem As OleDbDataAdapter
Dim strSQL As "select ... from .... ORDER BY (!!!!!)columnName)...."
oCmd = new oledbcommand(strSQl, oConn)
daItem = new oledbdataadapter
daItem.selectCommand = oCmdItem
daItem.fill(dsItem)
But now my question comes, is it also possible to do this while importing from an excel file..
I have managed to import a dataset from an excel file, but it's just "select * from [excelfile] "
It should be ordered before I start to work with the data in the dataset..
=> Is this possible?
=> Is there an other way?
Please help
I know that when you fill a dataset with data from a database you can use the names of the columns of the tabel in the database to sort on..
ex:
Dim oConn As OleDbConnection
Dim OCmdItem As OleDbCommand
Dim dsItem As DataSet
Dim daItem As OleDbDataAdapter
Dim strSQL As "select ... from .... ORDER BY (!!!!!)columnName)...."
oCmd = new oledbcommand(strSQl, oConn)
daItem = new oledbdataadapter
daItem.selectCommand = oCmdItem
daItem.fill(dsItem)
But now my question comes, is it also possible to do this while importing from an excel file..
I have managed to import a dataset from an excel file, but it's just "select * from [excelfile] "
It should be ordered before I start to work with the data in the dataset..
=> Is this possible?
=> Is there an other way?
Please help