hi
i have started a topic on this before but can seem to find the post in my profile.
anyway
i have code that read my excel file here is the code
how do i get that code to read a certain worksheet in my workbook. at the moment the code steps through each tab which is fine but i need to get it to look at certain tabs when i click on my radio button and find certain words in the worksheetCode:Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click If Not String.IsNullOrEmpty(txtFileName.Text) Then Try btnClose.Enabled = False Dim OExcelHandler As New ExcelHandler() Dim ds As DataSet = OExcelHandler.GetDataFromExcel(txtFileName.Text.Trim()) If ds IsNot Nothing Then dgvExcelData.SelectionMode = DataGridViewSelectionMode.FullRowSelect dgvExcelData.EditMode = DataGridViewEditMode.EditProgrammatically dgvExcelData.DataSource = ds.Tables(0) End If Catch ex As Exception Finally btnClose.Enabled = True End Try End If End Sub
anyone and ideas




Reply With Quote