This code is connecting to an Excel spreadsheet called "Test.xlsx" stored on the file system. It defines an OleDbConnection and OleDbDataAdapter to execute a SQL query on the spreadsheet. The query selects rows from the first sheet where the "Descripcion" column contains "Paypal", "Bretxa", or "Eroski". It fills a DataSet with the results and sets a DataGridView control's data source to display the results.
This code is connecting to an Excel spreadsheet called "Test.xlsx" stored on the file system. It defines an OleDbConnection and OleDbDataAdapter to execute a SQL query on the spreadsheet. The query selects rows from the first sheet where the "Descripcion" column contains "Paypal", "Bretxa", or "Eroski". It fills a DataSet with the results and sets a DataGridView control's data source to display the results.
This code is connecting to an Excel spreadsheet called "Test.xlsx" stored on the file system. It defines an OleDbConnection and OleDbDataAdapter to execute a SQL query on the spreadsheet. The query selects rows from the first sheet where the "Descripcion" column contains "Paypal", "Bretxa", or "Eroski". It fills a DataSet with the results and sets a DataGridView control's data source to display the results.
This code is connecting to an Excel spreadsheet called "Test.xlsx" stored on the file system. It defines an OleDbConnection and OleDbDataAdapter to execute a SQL query on the spreadsheet. The query selects rows from the first sheet where the "Descripcion" column contains "Paypal", "Bretxa", or "Eroski". It fills a DataSet with the results and sets a DataGridView control's data source to display the results.
Dim Adapteur As OleDbDataAdapter Dim MonDataSet As New DataSet Dim RequeteSQL As String
Dim connectionString As String = "Provider = Microsoft.ACE.OLEDB.12.0;Data
Source=\Test.xlsx;Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""" Connexion = New OleDbConnection(connectionString) RequeteSQL = "select * from [Feuil1$] WHERE Descripcion LIKE '%Paypal%' OR Descripcion LIKE '%Bretxa%' OR Descripcion LIKE '%Eroski%' ;" Adapteur = New OleDbDataAdapter(RequeteSQL, cnn) MonDataSet.Tables.Add"Feuil1") Adapteur.Fill(MonDataSet.Tables("Feuil1")) DataGridViewMouvements.DataSource = MonDataSet.Tables("Feuil1") ' ... ... ...